Search code examples
matlabparfor

How to handle Matlab license error when using parallel pooling


I am trying to run a 3rd party toolbox (Measures of Effect Size (MES) Toolbox) that is dependent on Statistics_Toolbox license. In a 'classical' for loop, the computation is done without any errors but whenever I run the computations in a parallel for loop, I get the following error:

Error using ncpci
tinv requires a Statistics_Toolbox license.

I have confirmed the existence of Statistics_Toolbox license both with ver command and license('test', 'Statistics_Toolbox') command. Is this an expected behaviour for the parallel pooling in Matlab?

Here is my system info:

MATLAB Version: 9.12.0.1884302 (R2022a)
Ubuntu 22.04


Solution

  • This is not expected behaviour. When you use parpool, the workers should have available any licences that you have in your desktop MATLAB session. This is detailed here for MATLAB Parallel Server - the same applies to local workers using only Parallel Computing Toolbox. I suggest you contact MathWorks Support to resolve this.