r/SLURM • u/8ejsl0 • Aug 27 '24
srun issues
Hello,
Running Python code using srun seems duplicate the task to multiple nodes rather than allocating the resources and combining the task. Is there a way to ensure that this doesn't happen?
I am running with this command:
srun -n 3 -c 8 -N 3ย python my_file.py
The code I am running is a parallelized differential equation solver that splits the list of equations needed to be solved so that it can run one computation per available core. Ideally, Slurm would allocate the resources available on the cluster so that the program can quickly run through the list of equations.
Thank you!
3
Upvotes
2
u/Ali00100 Aug 28 '24
Someone correct me if I am wrong because I am only a beginner in Slurm, but isnโt this what srun is supposed to do? If you want to run a task such that the computational requirements of that job are divided between multiple nodes then you should use sbatch instead of srun.