PBSPro qsub output error file directed to path wit

2020-07-26 02:44发布

I'm using PBSPro and am trying to use qsub command line to submit a job but can't seem to get the output and error files to be named how I want them. Currently using:

  qsub -N ${subjobname_short} \
       -o ${path}.o{$PBS_JOBID} -e ${path}.e${PBS_JOBID}
       ... submission_script.sc

Where $path=fulljobname      (i.e. more than 15 characters)

I'm aware that $PBS_JOBID won't be set until after the job is submitted...

Any ideas?

Thanks

2条回答
手持菜刀,她持情操
2楼-- · 2020-07-26 03:13

The solution I came up with was following the qsub command with a qalter command like so:

jobid=$(qsub -N ${subjobname_short} submission_script.sc)
qalter -o ${path}.o{$jobid} -e ${path}.e${jobid} ${jobid}

This way, PBS Pro does not need to resolve the variables, as it failed to do so in our install (this may be a configuration issue)

查看更多
Juvenile、少年°
3楼-- · 2020-07-26 03:32

If you want the ${PBS_JOBID} to be resolved by PBSPro, you need to escape it on the command line:

qsub -o \$PBS_JOBID 

Otherwise, bash will attempt to resolve $PBS_JOBID before it gets to the qsub command. I don't know if $subjobname_short and $path are actual environment variables or ones you want pbs to resolve, but if you want pbs to resolve them you'll also need to escape these ones or place it inside the job script.

NOTE: I also notice that your -o argument says {$PBS_JOBID} and I'm pretty sure you want ${PBS_JOBID}. I don't know if that's a typo in the question or what you tried to pass to qsub.

查看更多
登录 后发表回答