[gridengine users] export of environment variables from start_proc_args
SLIM H.A.
h.a.slim at durham.ac.uk
Thu Jul 5 11:53:32 UTC 2012
Thanks Reuti,
> You could provide a startup_method for the queue(s) in question:
>
> #!/bin/sh
> export OMP_NUM_THREADS=$NSLOTS
> exec "$@"
"@$" would expand to the startup_method arguments but these are absent? The documentation about the starter_method is not clear to me, are the "job arguments" the command_args to command in qsub?
Thanks
Henk
> -----Original Message-----
> From: Reuti [mailto:reuti at staff.uni-marburg.de]
> Sent: 04 July 2012 15:37
> To: SLIM H.A.
> Cc: users at gridengine.org
> Subject: Re: [gridengine users] export of environment variables from
> start_proc_args
>
> Hi,
>
> Am 04.07.2012 um 14:57 schrieb SLIM H.A.:
>
> > I want to constrain the number of OpenMP threads in a job from within
> GridEngine. The user should set this to $NSLOTS in the job script but can this
> be enforced by including this in a PE start script?
> >
> > I set a start_proc_args script "startopenmp.sh" with argument $pe_slots in
> an openmp PE and the script contains the line
> >
> > export OMP_NUM_THREADS=$1
>
> The start_proc_args is an independent script started before the actual job.
> Nothing is inherited to the executed jobscript.
>
> You could provide a startup_method for the queue(s) in question:
>
> #!/bin/sh
> export OMP_NUM_THREADS=$NSLOTS
> exec "$@"
>
> Thsi will also work without requesting a PE, as $NSLOTS will then evaluate
> to 1.
>
> The problem with -v is, that it's evaluated at submission time, but not
> during execution.
>
> -- Reuti
>
>
> > and then run a simple test job that prints the environment.
> OMP_NUM_THREADS has not been set. Is there a way to achieve this
> otherwise?
> >
> > Thanks
> >
> > Henk
> >
> > _______________________________________________
> > users mailing list
> > users at gridengine.org
> > https://gridengine.org/mailman/listinfo/users
More information about the users
mailing list