scaling a parfor to a more than one node on a cluster
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
PatrizioGraziosi
el 26 de Dic. de 2021
Respondida: Raymond Norris
el 27 de Dic. de 2021
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 comentarios
Respuesta aceptada
Raymond Norris
el 27 de Dic. de 2021
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 comentarios
Más respuestas (1)
Raymond Norris
el 27 de Dic. de 2021
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.
Ver también
Categorías
Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!