Get walltime in a PBS job script -


when submitting job script pbs queuing system, walltime specified automatically or user e.g. via

#pbs -l walltime=1:00:00 

the question if time can accessed job script. there environment variable or other way walltime.

in end, job script should decide time time if there enough time left more work job not killed queuing system.

update:

at least if user has specified walltime in resources list, can propose following workaround (working bash)

read _ _ pbs_walltime  <<< `qstat -f $pbs_jobid | grep "resource_list.walltime"` 

which parses walltime qstat output , places value in pbs_walltime variable. accordingly, command

echo $pbs_walltime 

will yield like

1:00:00 

this stored in environment variable $pbs_walltime.

of course, torque, i'm not sure pbs queuing system using.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -