Sorry- don't know what to tell you, but it does work.  I've just installed
a task prolog on my test cluster (version 2.6.2) that sets
SLURM_DISTRIBUTION.  Perhaps double check that your slurm.conf is set up to
enable the plugin, that it is available on all your nodes and is
executable, all those sorts of things.  Maybe turn up debugging on one of
the nodes to make sure its getting executed- around three or four I think
sufficient to show execution of the task prolog.

Beyond that, I don't have further ideas on how to set variables in the job
environment.


M



On Thu, May 8, 2014 at 9:47 AM, <[email protected]> wrote:

>  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.html
>
> So what you want is:
>
> #!/bin/bash
> echo "export SLURM_DISTRIBUTION=block:block"
>
> Though I've never modified a Slurm environment variable, so there may be
> other things at work.
>
> M
>
>
> On 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.
>>
>> Thanks
>> Kelly
>>
>>
>> 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 it
>>
>> Maybe post your task prolog?
>>
>> Best
>>
>> M
>>
>> [1] https://groups.google.com/d/msg/slurm-devel/dHqcT_DtD-Y/NuUD47UU6NwJ
>> [2] http://code.google.com/p/slurm-spank-plugins/wiki/UseEnv
>>
>>
>>
>>
>> On 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
>



-- 
Hey! Somebody punched the foley guy!
   - Crow, MST3K ep. 508

Reply via email to