Your easiest option would be to modify the Slurm code to export whatever additional environment variables that you want, which should be pretty simple. See the function _build_env() in src/slurmd/slurmd/req.c. If you make changes and send us the patch, we can include it in the canonical code base.

Moe Jette
SchedMD LLC

On 2013-11-20 05:05, Albert Solernou wrote:
Hi,
I'd like to write a prolog script that changes the GPU compute mode of
the allocated GPU card(s). This change can only be done by root. My
initial idea was that the prolog scipt would use an environment variable
as a switch.

The problem that I face are:
- prolog or prologctld have a reduced amount of environment variables.
Specifically, they miss "CUDA_VISIBLE_DEVICE" assigned by the GRes
plugin, as well as any user environment flag.


Is there an easy workaround? Will I have to patch the current GRes
plugin or to tinker with a new spank plugin?

Any help is welcome!

Regards,
Albert

Reply via email to