Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After submitting a .m batch job with Slurm, can I edit my .m file without changing my original submission?

Say I want to run a job on the cluster: job1.m

Slurm handles the batch jobs and I'm loading Mathematica to save the output file job1.csv

I submit job1.m and it is sitting in the queue. Now, I edit job1.m to have different variables and parameters, and tell it to save data to job1_edited.csv. Then I re-submit job1.m.

Now I have two batch jobs in the queue.

What will happen to my output files? Will job1.csv be data from the original job1.m file? And will job1_edited.csv be data from the edited file? Or will job1.csv and job1_edited.csv be the same output?

:(

Thanks in advance!

like image 228
Alyssa Avatar asked Aug 26 '15 00:08

Alyssa


People also ask

How do I submit a batch job in Slurm?

Note: the term "job" is used throughout this documentation to mean a "batch job". There are two ways of submitting a job to SLURM: Submit via a SLURM job script - create a bash script that includes directives to the SLURM scheduler. Submit via command-line options - provide directives to SLURM via command-line ...

How do I Requeue a job in Slurm?

slurm allows to requeue a job upon preemption, but not when running into a timelimit. Occasionally, you want to resubmit a job automatically, possibly with a different timelimit or continuing the incomplete calculation. To do so, you need to the trap the signal sent to the job upon reaching the timelimit.

How many jobs can Slurm handle?

Please note that the hard maximum number of jobs that the SLURM scheduler can handle is 10000. It is best to limit your number of submitted jobs at any given time to less than half this amount in the case that another user also wants to submit a large number of jobs.

What does #sbatch mean?

Advanced Slurm: Execution: sbatch. sbatch is a means of asynchronously submitting a batch file (from which tasks will be executed) to execute on allocated resources.


1 Answers

I am assuming job1.m is a Mathematica job, run from inside a Bash submission script. In that case, job1.m is read when the job starts so if it is modified after submission but before job start, the modified version will run. If it is modified after the job starts, the original version will run.

If job1.m is the submission script itself (so you run sbatch job1.m), that script is copied in a spool directory specific to the job so if it is modified after the job is submitted, it still will run the original version.

In any case, it is better, for reproducibility and traceability, to make use of a workflow manager such as Fireworks, or Bosco

like image 103
damienfrancois Avatar answered Sep 25 '22 02:09

damienfrancois