发送多个具有不同运行时参数的 qsub 作业

Send multiple qsub jobs with different runtime parameters

昨晚,我发送了大量 qsub 具有相同可执行文件但输入参数不同的作业。大多数工作都在排队,等待其他工作完成。今天早上,我意识到队列中的所有作业都使用了我输入文件的最后一个实例。

解决此问题的标准方法是什么?我是否应该为每个作业提供一个输入文件并编译我的代码以便它读取正确的文件?或者是否有 better/more 可靠的解决方案?

您可以创建一个主 PBS 脚本,循环遍历不同的输入参数,并行或顺序执行它们:

这只是为每个作业提供 executable 一个不同的输入数字 (IN),您应该根据需要将其更改为循环一个或多个输入参数。

# PBS -l mppwidth=2048

NIN=10 # number of input parameters

for IN in `seq -w 1 $NIN`; do
   cd "sub_job_${IN}"
   executable $IN # runs jobs sequentially (you might have to prefix this with aprun)
done

或并行:

# PBS -l mppwidth=2048
# ^^ these should now be shared among the jobs.

NIN=10 # number of input parameters

for IN in `seq -w 1 $NIN`; do
   cd "sub_job_${IN}"
   executable $IN & # runs the job in the background, you might 
                    # have to prefix this with `aprun -n .. -N ..` or something
                    # so that each job only uses a portion of the total
                    # requested CPUs.
done
wait # wait for all jobs to finish