MATLAB Answers

parpool local taking 600 seconds

20 views (last 30 days)
Alonso Zamora
Alonso Zamora on 9 Jan 2021
Answered: Debarghya Kundu on 15 Jan 2021
I am trying to start a local parallel pool with parpool in 2016b and the process is taking nearly 600 seconds!
I ran the Profiler on the command "parpool('local',2)" and the results showed that the slowdown is coming from the function getJobInitData which is under toolbox/distcomp/cluster/+parallel,+internal/+apishared/private
Based on the usual advise found online, I triple-checked the license paths, confirming that there is only an MLM_LICENSE_FILE environment variable and there is no LM_LICENSE_FILE variable.
It is also worth mentioning that when I run createJob(cluster) or createCommunicatingJob(cluster,'Type','pool'), I do not see a problem. The problem is when opening a pool with parpool.
What other things should I look into?

  1 Comment

Edric Ellis
Edric Ellis on 11 Jan 2021
I would suggest contacting MathWorks support directly to help resolve this.

Sign in to comment.

Answers (1)

Debarghya Kundu
Debarghya Kundu on 15 Jan 2021
It is likely that this issue is due to network licensing. To confirm this, try the following:
1) Locate the MLM_LICENSE_FILE environment variable, as specified here:
2) Copy the value of MLM_LICENSE_FILE up to ";" . It should be something like this:
27000@<servername>,27000@<servername>2,27000@<servername>3, where <servername> is set according to your organization name
3) Navigate to "<matlabroot>/bin" in the file explorer.
4) Right-click "matlab.EXE" and make a new desktop shortcut for it. Do not use an existing shortcut, as there may be permissions issues.
5) Right-click the shortcut and select "Properties".
6) In the Target field, add -c and then paste your previously copied values. It should look like this:
"C:\Program Files\MATLAB\R2019b\bin\matlab.exe" -c27000@<servername>,27000@<servername>2,27000@<servername>3
7) Click "Apply" and launch MATLAB from the shortcut.
This should resolve most issues with parallel pool. If using the -c option with the MLM_LICENSE_FILE did not seem to help, Please run the following command and send us the result at Technical Support.
>> tic; system_dependent('lmfeaturelist', 2); toc
This will time a special type of license check that occurs before parallel work.
If a startup.m is trying to open a prompt, it will cause a hang. The portions of the startup that are opening in a prompt can be enclosed in an if structure to correct this:
if (usejava('desktop'))
%code here
end

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!