PBS programming

廉价感情. 提交于 2020-01-05 14:06:44

问题


some short and probably stupid questions about PBS:

1- I submit jobs using

qsub job_file

is it possible to submit a (sub)job inside a job file?

2- I have the following script:

qsub job_a
qsub job_b

For launching job_b, it would be great to have before the results of job_a finished. Is it possible to put some kind of barrier or some otehr workaround so job_b is not launched until job_a finished?

Thanks


回答1:


Answer to the first question:

Typically you're only allowed to submit jobs from the host where the PBS server is running, but it depends how your PBS system is set up.

Answer to the second question:

You can use dependencies. Read about the -W option in the qsub documentation. Here's an example bash script:

dependency_id=$(qsub job_a)
qsub -W depend=afterok:$dependency_id job_b

job_b will start after job_a has finished successfully.




回答2:


Yes, It is possible to submit a job from another job, though it has some caveats.

-Your moms must have client commands (qsub) in the path

-$USECP will attempt to copy the files from the node that the 1st job is running on.

-Be careful submitting jobs from other jobs because you can easily crash pbs_server if your submit script calls too many qsubs.

You can have jobs b - z dependent on job 'a' with the following syntax

qsub foo.sh -W depend=afterok:jobA

Job arrays might also be a good solution.

http://docs.adaptivecomputing.com/torque/help.htm#topics/2-jobs/multiJobSubmission.htm



来源:https://stackoverflow.com/questions/2366521/pbs-programming

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