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

三世轮回 提交于 2020-01-04 01:11:06

问题


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!


回答1:


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



来源:https://stackoverflow.com/questions/32216228/after-submitting-a-m-batch-job-with-slurm-can-i-edit-my-m-file-without-changi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!