[slurm-users] prolog not passing env var to job

Brian Andrus toomuchit at gmail.com
Thu Mar 4 15:12:35 UTC 2021


It seems to me, if you are using srun directly to get an interactive 
shell, you can just run the script once you get your shell.


You can set the variables and then run srun. It automatically exports 
the environment.

If you want to change a particular one (or more), use something like 
--export=ALL,MYVAR=othervalue

do 'man srun' and look at the --export option


Brian Andrus




On 3/3/2021 9:28 PM, Chin,David wrote:
> ahmet.mercan at uhem.itu.edu.tr wrote:
> > Prolog and TaskProlog are different parameters and scripts. You should
> > use the TaskProlog script to set env. variables.
>
> Can you tell me how to do this for srun? E.g. users request an 
> interactive shell:
>
> srun -n 1 -t 600 --pty /bin/bash
>
> but the shell on the compute node does not have the env variables set.
>
> I use the same prolog script as TaskProlog, which sets it properly for 
> jobs submitted
> with sbatch.
>
> Thanks in advance,
> Dave Chin
>
> --
> David Chin, PhD (he/him)   Sr. SysAdmin, URCF, Drexel
> dwc62 at drexel.edu  215.571.4335 (o)
> For URCF support: urcf-support at drexel.edu
> https://proteusmaster.urcf.drexel.edu/urcfwiki
> github:prehensilecode
>
>
> ------------------------------------------------------------------------
> *From:* slurm-users <slurm-users-bounces at lists.schedmd.com> on behalf 
> of mercan <ahmet.mercan at uhem.itu.edu.tr>
> *Sent:* Friday, February 12, 2021 16:27
> *To:* Slurm User Community List <slurm-users at lists.schedmd.com>; Herc 
> Silverstein <herc.silverstein at schrodinger.com>; 
> slurm-users at schedmd.com <slurm-users at schedmd.com>
> *Subject:* Re: [slurm-users] prolog not passing env var to job
> External.
>
> Hi;
>
> Prolog and TaskProlog are different parameters and scripts. You should
> use the TaskProlog script to set env. variables.
>
> Regards;
>
> Ahmet M.
>
>
>
> Drexel Internal Data
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20210304/d025d3c5/attachment.htm>


More information about the slurm-users mailing list