<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p> </p>
<div class="moz-text-html" lang="x-unicode">
<p>Hi,</p>
<p>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:<br>
</p>
<p>#!/bin/bash<br>
</p>
<p>...<br>
</p>
<p>export CUDA_MPS_PIPE_DIRECTORY=blah</p>
<p>...<br>
</p>
<p>is not part of the job's env vars. Someone had suggested that
a "print" statement needs to be used. So I tried:</p>
<p>print export CUDA_MPS_PIPE_DIRECTORY=blah</p>
<p>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?</p>
<p>The documentation says:</p>
<p><i>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:</i></p>
<p> <i><span class="commandline">export name=value</span></i><i>
sets an environment variable for the user task</i><i><br>
</i> <i><span class="commandline">unset name</span></i><i>
clears an environment variable from the user task</i><i><br>
</i> <i><span class="commandline">print ...</span></i><i>
writes to the task's standard output.</i><i><br>
</i><i> The above functionality is limited to the task prolog
script.</i></p>
<p>Basically, I'd like to know how to get an arbitrary environment
variable passed on to the job via the prolog.<br>
</p>
<p>We are using slurm 20.02.5 on CentOS 7.</p>
<p>Thanks,</p>
<p>Herc<br>
</p>
</div>
</body>
</html>