[torqueusers] setting a variable in prologue

Garrick Staples garrick at usc.edu
Wed Mar 22 12:11:07 MST 2006


On Wed, Mar 22, 2006 at 01:37:13PM -0500, Aquarijen alleged:
> Hi All,
> 
> So I wrote a prologue script to create a working directory local to
> the nodes running a job.  Currently, I can refrence it in my pbs
> script by "/tmp/temp_pbs_$JOBID"  and all is well.  But I'd like to
> provide just one variable to the user to use - something like
> "$scratchdir" so that I can change underlying mount points at will
> without having to tell users to change from, say,
> "/tmp/temp_pbs_$JOBID" to "/scratch/temp_pbs_$JOBID" in all their
> scripts and programs.  I tried just exporting it as a variable in the
> prologue script, but it doesn't resolve in the pbs submit script -
> only in the prologue script itself.  I would appreciate help from you
> creative folks on how to do something so that I can change the
> underlying filesystem without hearing the screams of users.

TORQUE 2.0.0 already has a similar feature.  Look for "tmpdir" in the
pbs_mom manpage.

Basicly, if you put '$tmpdir /tmp' in your MOM config, then it will make
a /tmp/$PBS_JOBID for you.  The path is accessible in job and pelog
scripts as $TMPDIR.

-- 
Garrick Staples, Linux/HPCC Administrator
University of Southern California
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20060322/37be3dc6/attachment.bin


More information about the torqueusers mailing list