[GE users] mpich sge and exporting env vars

michael bane michael.bane at manchester.ac.uk
Wed Jun 14 13:57:09 BST 2006


To clarify I execute 'qsub this.sh' where this.sh is something like

        #! /bin/bash
        #$ -pe mpich 2
        #$ -l s_rt=1:00:00,h_rt=1:20:00 
        #$ -V
        export M3DATA=${HOME}/models-3/data/TESTING/par
        NPROCS=2; BASE=...;EXEC=...
        mpirun -batch -np $NPROCS -machinefile $TMPDIR/machines
        $BASE/$EXEC
        
but $EXEC when running doesn't know the value of M3DATA (and there's
about a hundred more such env vars in the real script)

Ta, Michael

On Wed, 2006-06-14 at 12:48 +0000, Gruhn Daniel J Contractor AF/A9IT
wrote:
> Michael,
> 
> If your script executes qsub to queue out your job, then #$ -V will have no
> effect.  This only works for a script that is actually submitted by qsub to
> the grid.
> 
> Dan
> 
> //SIGNED//
> Daniel J.Gruhn, CTR (Group W Inc.)
> HQ USAF/A9IT
> Studies & Analyses, Assesments and Lessons Learned
> 
> -----Original Message-----
> From: michael bane [mailto:michael.bane at manchester.ac.uk] 
> Sent: Wednesday, June 14, 2006 8:26 AM
> To: users at gridengine.sunsource.net
> Subject: RE: [GE users] mpich sge and exporting env vars
> 
> The cluster is down at the moment so cannot check this, but I've had #$ -V
> at the top of my qsub script. Is this the correct place or does it have to
> be placed once the env vars have been set in the script?
> 
> I was wondering if it's anything to do with mpich1...
> 
> More once the cluster is back
> Ta, Michael
> 
> On Wed, 2006-06-14 at 07:18 -0500, McCalla, Mac wrote:
> > Hi,
> > 
> > You can also try qsub option -V if you want to ship the entire 
> > environment variable set to the job, Or if there is a standard 
> > environment used by all jobs you can wrap the start of the compute 
> > nodes Sgeexecd in it.
> > 
> > HTH,
> > 
> > Mac Mccalla
> > 
> > -----Original Message-----
> > From: Gerd Marquardt [mailto:marquardt at rrzn.uni-hannover.de]
> > Sent: Wednesday, June 14, 2006 6:07 AM
> > To: users at gridengine.sunsource.net
> > Subject: Re: [GE users] mpich sge and exporting env vars
> > 
> > michael bane wrote:
> > > I'm new to SGE but not a stranger to mpich. I've had a look in the 
> > > archives and elsewhere but cannot find a solution to my problem but 
> > > hope somebody here can point me in the right direction.
> > >
> > > We have a Linux cluster running SGE and with mpich1 available. I 
> > > have a code that makes heavy use of environment variables. However, 
> > > when I try and run this under SGE using mpich it falls over since 
> > > the running
> > 
> > > executable claims to have no knowledge of the environment variables 
> > > even thought they are set in the qsub script.
> > >
> > > Thanks in advance,
> > >   
> > Try the qsub-Option:
> >    -v  variable[=value]
> > 
> > --
> >  Gerd Marquardt
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> > For additional commands, e-mail: users-help at gridengine.sunsource.net
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> > For additional commands, e-mail: users-help at gridengine.sunsource.net
> > 
> --
> Michael Bane
> Centre for Atmospheric Science
> University of Manchester, U.K.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
> 
-- 
Michael Bane
Centre for Atmospheric Science
University of Manchester, U.K.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list