[slurm-users] prolog not passing env var to job
Herc Silverstein
herc.silverstein at schrodinger.com
Fri Feb 12 21:12:33 UTC 2021
Hi,
I have a prolog script that is being run via the slurm.conf Prolog=
setting. I've verified that it's being executed on the compute node.
My problem is that I cannot get environment variables that I set in this
prolog to be set/seen in the job. For example the prolog:
#!/bin/bash
...
export CUDA_MPS_PIPE_DIRECTORY=blah
...
is not part of the job's env vars. Someone had suggested that a "print"
statement needs to be used. So I tried:
print export CUDA_MPS_PIPE_DIRECTORY=blah
but this doesn't work either. Is this is really just for print-ing as
its name implies? Or is that how one actually has to do it and somehow
the syntax I'm using isn't quite right?
The documentation says:
/The task prolog is executed with the same environment as the user tasks
to be initiated. The standard output of that program is read and
processed as follows:/
/export name=value//sets an environment variable for the user task//
/ /unset name//clears an environment variable from the user task//
/ /print ...//writes to the task's standard output.//
//The above functionality is limited to the task prolog script./
Basically, I'd like to know how to get an arbitrary environment variable
passed on to the job via the prolog.
We are using slurm 20.02.5 on CentOS 7.
Thanks,
Herc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20210212/8fe3325a/attachment.htm>
More information about the slurm-users
mailing list