Do you have the Parallel Computing Toolbox installed?
'parpool(2)' fails
9 views (last 30 days)
Show older comments
Hi, I am testing some MATLAB code via GitHub Action. Strange bug occurs when I was testing `parpool(2)` with MATLAB R2021b and R2022a on Mac and Ubuntu as follows.
Error using parpool
Undefined function 'pCurrentTaskIsPartOfAPool' for input arguments of type
'double'.
Error in solveAllProblems (line 68)
parpool(numJobs);
The code is fine with the latest verion of MATLAB.
Any comment helps.
2 Comments
Answers (1)
Sandeep Mishra
on 17 Jan 2025
Hi Cunxin,
I tried to execute the GitHub Action and observed the same error message on all OS (Windows, Ubuntu and Mac) for MATLAB R2022b.
The issue arises because parpools with batch licensing are not supported in MATLAB versions prior to R2023a.
To resolve this, I recommend upgrading to MATLAB R2023a or later, which supports the use of parpools with batch licensing.
I hope this helps you!
See Also
Categories
Find more on Parallel Computing Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!