How do I submit a large number of very similar jobs?
There are a few tricks that can help you to submit large numbers of similar jobs (as in HTC) that will make your life easier.
The user should be careful if your program needs a random number seed, e.g. for Monte Carlo simulation. Your program should handle it properly, to avoid using the same pseudo seed multiple times.
We can start with the simple C++ program we introduced in here. We then create a submission template, called example3a-template.slurm
,
And here is our submit.sh
srcipt,
The scipt will loop from 0 to 20. In each loop, it will
prepare submission script from the template.
sed
editor is used to find a patternINPUT1
and then replace it with $x ,submit jobs to the Slurm cluster,
delete submission script.
After your submission is done, you can check your jobs using squeue
Last updated