Hi all,

I have a couple of questions about SPANK plugins development that I hope
you can solve. They are kind of newbie and easy ones, so I've grouped them
in a single mail.

- Is it possible to modify the execution ARGV of an application from inside
a SPANK plugin? Like,

-> user call: srun --spank_plugin myCode
->SPANK: add "myWrapper"
->executed by srun: myWrapper myCode.

I've tried by modifying the item returned by a "spank_get_item (sp,
S_JOB_ARGV,...) call in slurm_spank_task_init, but the changes won't be
reflected on the execution. Any suggestion?

-Is it possible to know whether the user executed srun/sbatch with a given
parameter created by a SPANK plugin? I mean, to know whether the user
executed
srun --spank_plugin myCode
or
srun myCode ?

My current approach would be to create a global variable in the SPANK
plugin,
static int spank_plugin =1; //did the user say --spank_plugin?

and set it to zero in the function defined in spank_option. This way, id
the user

That does work for some time, because if in slurm_spank_task_init I start
with
  if (spank_plugin !=0)//no spank_plugin, exit
    return (0);

it would behave as desired.

However, in the slurm_spank_job_epilog the behavior will be different, as
the variable always has the default value, so I guess I am missing
something.

besides this particular case, it would be really useful for me if some kind
of state can be maintained along the execution of the job in SPANK plugin,
like a global variable accesible by all the methods storing a value and so.


Thanks for your help,

Manuel




-- 
Dr. Manuel Rodríguez-Pascual
skype: manuel.rodriguez.pascual
phone: (+34) 913466173 // (+34) 679925108

CIEMAT-Moncloa
Edificio 22, desp. 1.25
Avenida Complutense, 40
28040- MADRID
SPAIN

Reply via email to