I've been reading the Spank use-env plugin documentation, and there aren't
any example about modifying env vars from the code of SLURM.

My purpose was to create and to set a env var with a value calculated  in
my select plugin.

Thank you
El 10/07/2012 17:31, "Moe Jette" <[email protected]> escribió:

>
> There is spank documentation in a man page (see "man spank"). There
> are several examples of spank plugins here:
> http://code.google.com/p/slurm-spank-plugins/
> of particular note, see:
> http://code.google.com/p/slurm-spank-plugins/wiki/UseEnv
>
> Quoting Sergio Iserte Agut <[email protected]>:
>
> > Could somebody help me?
> >
> > I'm still with the problem of how to write an environmental variable.
> >
> > I look forward to hearing from you soon.
> >
> > Thank you.
> >
> > 2012/7/4 Sergio Iserte Agut <[email protected]>
> >
> >>  Than you Andrej for your idea, I think it's very interesting, but I'm
> >> getting started in this field and I'm not sure about what you are
> meaning
> >>
> >> > ... we're setting the SPANK variable in job data by some controller
> >>> plugin ... you can easily find details ...  it's some env_array_*
> >>
> >>
> >> There a lot of functions with this beginning, I'm wondering if you were
> >> referring to some functions in *env.c* like* env_array_for_job()*.
> >> Anyway, I haven't found the part of code where I can do that you're
> >> telling me.
> >>
> >> Kind regards!
> >>
> >>
> >> 2012/7/3 Andrej N. Gritsenko <[email protected]>
> >>
> >>>
> >>>     Hello!
> >>>
> >>>
> >>>
> >>> Sergio Iserte Agut has written on Tuesday,  3 July, at  6:49:
> >>>
> >>> >I've followed your advise and I've achived to find a function, called
> >>>
> >>> >"setup_particulars(), in "env.c" which allows me to create and to set
> an
> >>>
> >>> >environmental variable using the function "setenvf().
> >>>
> >>> >I'm not really sure about how to do it, but I've seen that it call the
> >>>
> >>> >function "select_g_select_jobinfo_get()" in order to get the value for
> >>> the
> >>>
> >>> >environmental variable. And that I've done.
> >>>
> >>> >I've implemented the "select_p_select_jobinfo_get()" in my select
> plugin
> >>>
> >>> >and the variables which it needs. But, I don't get the correct value
> in
> >>> my
> >>>
> >>> >env. var.
> >>>
> >>> >Moreover I've put debug lines to see the behaviour and the call flow.
> But
> >>>
> >>> >this debug lines aren't shown in my log files! That's why I'm getting
> >>> lost.
> >>>
> >>>
> >>>
> >>> >If you need more information, let me know!
> >>>
> >>>
> >>>
> >>> >Thank you for your time.
> >>>
> >>>
> >>>
> >>>     You cannot set environment in the controller and think it can be
> ever
> >>>
> >>> available for job since enviromnent for job is set by srun/sbatch only.
> >>>
> >>>     You can do it the way we do it - we're setting the SPANK variable
> in
> >>>
> >>> job data by some controller plugin and then retrieve it in slurmd
> plugin
> >>>
> >>> using RPC REQUEST_SPANK_ENVIRONMENT. I think you can easily find
> details
> >>>
> >>> for both operations in header files - it's some env_array_* function
> and
> >>>
> >>> slurm_send_recv_controller_msg().
> >>>
> >>>
> >>>
> >>>     With the best wishes.
> >>>
> >>>     Andriy.
> >>>
> >>
> >>
> >>
> >> --
> >> *--
> >> *
> >> *Sergio Iserte Agut, assistant researcher,*
> >> *High Performance Computing & Architecture, University Jaume I (Spain)*
> >>
> >>
> >>
> >
> >
> > --
> > *--
> > *
> > *Sergio Iserte Agut, assistant researcher,*
> > *High Performance Computing & Architecture, University Jaume I (Spain)*
> >
>
>

Reply via email to