This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cloud:advanced_torque [2013/12/13 14:41]
rwilson [Unique output files]
cloud:advanced_torque [2013/12/13 14:50]
rwilson [Unique output files]
Line 17: Line 17:
 echo "​$PBS_JOBID"​ echo "​$PBS_JOBID"​
 </​code>​ </​code>​
-then you will see something like:+then you will see something like this in the output file:
 <​code>​ <​code>​
 +You can use the contents of **$PBS_JOBID** if you need some unique string to name directories or files.
 +For instance, if you want to create many files, do it in a directory, as this keeps everything in one
 +place and allows easy deletion when required:
 +mkdir /​tmp/​$PBS_JOBID
 +cd /​tmp/​$PBS_JOBID
 +    <create many files>
 +    <store results somewhere>​
 +rm -Rf /​tmp/​$PBS_JOBID
 +If the full value of **$PBS_JOBID** is too long for your purposes you can shorten it by
 +extracting just the job number:
 +JOBNUM=$(echo $PBS_JOBID | cut -d. -f1)
 </​code>​ </​code>​
 +Here **JOBNUM** would contain just "​**390505**"​.
cloud/advanced_torque.txt · Last modified: 2013/12/13 14:50 by rwilson
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki