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.mer...@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
dw...@drexel.edu 215.571.4335 (o)
For URCF support: urcf-supp...@drexel.edu
https://proteusmaster.urcf.drexel.edu/urcfwiki
github:prehensilecode
------------------------------------------------------------------------
*From:* slurm-users <slurm-users-boun...@lists.schedmd.com> on behalf
of mercan <ahmet.mer...@uhem.itu.edu.tr>
*Sent:* Friday, February 12, 2021 16:27
*To:* Slurm User Community List <slurm-users@lists.schedmd.com>; Herc
Silverstein <herc.silverst...@schrodinger.com>;
slurm-us...@schedmd.com <slurm-us...@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