[torqueusers] setting a variable in prologue

Aquarijen aquarijen at gmail.com
Wed Mar 22 13:35:02 MST 2006

Hi Garrick,

I see that in the pbs_mom man page the variable that you refer to... 
So, I went to my /var/spool/pbs/mom_priv directory and made my config
look like this:

$logevent 127
$loglevel 6
$pbsserver b08l02
$tmpdir /scratch
$usecp *:/home /home
$restricted b08l02,b08l01,b07l01,b07l02,b06l01,b06l02,b05l01,b05l02

It is the same as how it looked before except I added the "$tmpdir
/scratch" to it.  Scratch is set up like a /tmp - the sticky bit is
set.  I pushed the config to all the nodes and restarted all the
pbs_moms and even the pbs_server.

In my simple submit script I do:
#!/bin/bash -l
#PBS -S /bin/bash
#PBS -m ae
#PBS -M tippensjl at ornl.gov
#PBS -N parallel-worlds-jen
#PBS -q workq
#PBS -l nodes=2:ppn=2
#PBS -l walltime=00:00:30,mem=1mb
echo "Current working directory is `pwd`"
echo Tmp dir is $TMPDIR
mpiexec /home/2vt/jenstests/message-passing-parallel-worlds/a.out

But the variable for $TMPDIR is empty.  Am I missing something?

Thanks for all the help you give on this list.


On 3/22/06, Garrick Staples <garrick at usc.edu> wrote:
> 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
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers

More information about the torqueusers mailing list