Run matlab parallel parpool.m in a python wrapper
2 次查看(过去 30 天)
显示 更早的评论
Hi, Matlab experts:
I have a question to use local parallel pool, I set up the configuration and the code to call it: myPool = gcp('nocreate'); % If no pool, do not create new one.
myPool = gcp('nocreate'); % If no pool, do not create new one.
if isempty(myPool)
myPool = parpool(poolsize);
end
It works in matlab script or from terminal to call it, but I have problem to call it from a python wrapper, which gave me errors:
Standard error:
MATLAB code threw an exception:
Failed to start a parallel pool. (For information in addition to the causing error, validate the profile 'local' in the Cluster Profile Manager.)
File:/Applications/MATLAB_R2016a.app/toolbox/distcomp/cluster/parpool.m
Name:/Users/junhao.wen/Hao/Project/NODDI/NODDI_toolbox_v0.9/fitting/batch_fitting.m
Line:47
File:Users/junhao.wen/Hao/Project/NODDI/scripts/noddiprocessing.m
Name:/Users/junhao.wen/test/NODDI/working_dir/NoddiMatlab/nodditoolbox/mapflow/_nodditoolbox1/pyscript.m
Line:112
File:arpool
Name:batch_fitting
Line:110
File:oddiprocessing
Name:pyscript
Line:103
File:3
Name::
Line:6
I do not know why, is it because that Matlab parallel pool does not support in python or other language wrapper??
Thanks very much.
Hao
0 个评论
回答(1 个)
Sharan Paramasivam Murugesan
2017-8-21
This could be due to a bug in R2016a. Try the patch available at
If the patch does not help, provide the cluster logs. Log files exist on every system running in the cluster. By default on Windows these files are located in C:\temp\mdce and in /var/log/mdce on UNIX. The default location for the logs is in the file matlabroot\toolbox\distcomp\bin\mdce_def.bat on Windows and matlabroot/toolbox/distcomp/bin/mdce_def.sh on UNIX.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!