Hi Micheal, This doesn't seem to work as advertised.  The options never get 
sent to the job.  Testing with SLURM_JOB_NAME exhibits the same issues. Do you 
or anyone else have any other ideas? Kelly  On 04/24/14, Michael 
Gutteridge<[email protected]> wrote: Ah- the task prolog is a little 
interesting:   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.                
http://slurm.schedmd.com/prolog_epilog.htmlSo what you want is:#!/bin/bashecho 
"export SLURM_DISTRIBUTION=block:block"Though I've never modified a Slurm 
environment variable, so there may be other things at work.MOn Thu, Apr 24, 
2014 at 8:04 AM, <[email protected]> wrote:Hi, In particular we were 
looking at SLURM_DISTRIBUTION, SLURM_CPU_BIND and the like.  Looking those for 
both sbatch and srun.  A simple script was created for the Prolog and 
taskProlog options: #!/bin/bash export SLURM_DISTRIBUTION=block:block When we 
set it prior to sbatch or srun like so export SLURM_DISTRIBUTION=block:block 
srun -N 2 sleep 5 it works just fine. ThanksKelly  On 04/24/14, Michael 
Gutteridge<[email protected]> wrote: Just to clarify- you mean set 
environment variables for processes running in a Slurm job?  Not setting or 
altering the SLURM_* environment variables set automatically, right?Task 
prologs should work for this purpose- they're working for us OK[1].  There is 
also the use_env SPANK plugin[2] which we've used with some success as well... 
I think it does much of what you'd like to accomplish.IIRC, these things work 
differently between sbatch and srun, which are you using? srun has the 
--task-prolog=<path> option.  What happens when you use that?   sbatch has an 
option "--export-file" which might have some utility for your purpose, but I've 
never used itMaybe post your task prolog?BestM[1] 
https://groups.google.com/d/msg/slurm-devel/dHqcT_DtD-Y/NuUD47UU6NwJ[2] 
http://code.google.com/p/slurm-spank-plugins/wiki/UseEnvOn Wed, Apr 23, 2014 at 
6:07 PM, <[email protected]> wrote:Hello All, I've been looking for a way 
to set default SLURM environment variables for all users.  I'm newish to SLURM 
and tried using Prolog and Task Prolog with no avail.  The goal is to not write 
a plugin.  Is the best way to set them outside of SLURM in the user's 
environment and have them overwrite via the command line if desired? Thank you 
in advance for any and all suggestions! Kelly -- Hey! Somebody punched the 
foley guy!   - Crow, MST3K ep. 508   -- Hey! Somebody punched the foley guy!   
- Crow, MST3K ep. 508  

Reply via email to