parpool local taking 600 seconds
3 次查看(过去 30 天)
显示 更早的评论
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/482743/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/482748/image.png)
1 个评论
回答(1 个)
Debarghya Kundu
2021-1-15
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parallel Computing Fundamentals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!