scaling a parfor to a more than one node on a cluster
5 次查看(过去 30 天)
显示 更早的评论
Hello everybody,
my purpose is to run an "outer" function which runs several times a specific function in a parfor loop
function my_outer_function
parpool('local',numworkers)
...
parfor id = 1 : n
[ temp1, temp2, temp3] = myfunction (id) ;
out1(id).x = temp1.x;
out1(id).y = temp1.y;
out2(id).x = temp2.x;
...
end
...
end
where out1, out2, ... and temp1, temp2, ... are struct type data.
When the outer function runs in a HPC on a single node and opens a parpool in 'local' mode, it opens a parpool at the beginning and keeps it open for the whole running time, everything works okay.
But I cannot figure out a way to make it working on more nodes, i.e. by opening a parpool on 2 or more nodes... is it possible? Do you have any suggestion, please?
Thanks
Patrizio
To specify the nature of the problem: I'm computing 'id' independent calculations of a physical quantity, then I collect the data and integrate them. Each 'id' calculation can run independently on a worker.
0 个评论
采纳的回答
Raymond Norris
2021-12-27
Ciao Patrizio,
We've worked with Cineca directly in the past. To begin with, yes we need to resolve the MATLAB Parallel Server license. Secondly, there are serveral implementations of MATLAB Parallel Server at Cineca. The one you're pointing to is slightly out of date (I can tell by the documentation). I looked online for the other, but can't find it at the moment.
If you can wait until after the new year, we can schedule a time to get you setup. Please reach me offline.
Thanks,
Raymond
0 个评论
更多回答(1 个)
Raymond Norris
2021-12-27
Parallel Computing Toolbo provides a "local" profile, for running multi-core jobs on the machine running the MATLAB client. If you want processes to run across multiple nodes, you'll need to use MATLAB Parallel Server along with a scheduler to submit jobs. If you don't have a scheduler, MATLAB Parallel Server provides one (MJS). In doing so, you'll create a new profile, described the documentaiton, which instructs MATLAB how to communicate to the scheduler. Technical Support can walk you through the process of creating a new profile and submitting jobs to the scheduler.
另请参阅
类别
在 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!