MATLAB: Error using parpool with threads in 2020a

MATLABMATLAB CompilerParallel Computing Toolboxparpoolr2020athreaded

I have compiled a code that uses parpool("threads"), in 2020a, my code works as expected when run inside of matlab. However, once the code is compiled, and executed with the latest 2020a runtime, it reports:
Unable to resolve the name parallel.ThreadPool.createPool.
Any ideas? This seems to be from a Java installation, right?

Best Answer

Hi Francesc. Support for threaded pools in deployed applications is a future enhancement. In the meantime, consider the following workaround
if isdeployed
p = parpool('local');
else
p = parpool('threads');
end