parpool use existing slurm job
Mostrar comentarios más antiguos
If I've already started an interactive Slurm job with 5 nodes, how can I start a parpool using the resources allocated to that existing job?
Respuesta aceptada
Más respuestas (2)
Venkat Siddarth Reddy
el 15 de En. de 2024
Editada: Venkat Siddarth Reddy
el 15 de En. de 2024
0 votos
I understand that you are trying to create a parallel pool using the resources of a running Slurm job.
To achieve this,you will need to set up a Slurm profile in MATLAB, as this will enable "parpool" function to access the Slurm cluster.
Additionally, you will need to use the "MATLAB Parallel Server" since you're aiming to utilize multiple nodes of the cluster.
For more information on Slurm profiles and using the MATLAB Parallel Server with Slurm jobs, please refer to the following documentation:
- https://www.mathworks.com/help/matlab-parallel-server/install-and-configure-matlab-parallel-server-for-slurm-1.html
- https://it.stonybrook.edu/help/kb/using-matlabs-parallel-server-for-multi-core-and-multi-node-jobs
- https://www.mathworks.com/matlabcentral/answers/1749950-running-parfor-on-multiple-nodes-using-slurm
I hope this helps!
1 comentario
Frank
el 15 de En. de 2024
Edric Ellis
el 16 de En. de 2024
clus = parcluster('mySlurmProfile') % set up as per Venkat's post
job = batch(clus, 'myScriptThatUsesParfor', Pool=20);
- Launch a job on your SLURM cluster with 21 workers
- When the job starts, the first worker becomes a non-interactive "client", and the remaining 20 are connected up as a parpool for use by that client
- That first worker executes your program myScriptThatUsesParfor
- Any parfor loops etc. inside that script use the 20 workers
Is that the sort of thing you want to achieve?
Categorías
Más información sobre Third-Party Cluster Configuration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!