[slurm-users] spank plugin for sbatch

444 views
Skip to first unread message

Tueur Volvo

unread,
Feb 1, 2018, 5:30:22 AM2/1/18
to slurm...@schedmd.com
Hello i read tutorial of spank plugin :
https://slurm.schedmd.com/spank.html

and i create my plugin with the example renice in tutorial.

But my plugin work only with srun.
the option --renice not exist for sbatch command, why ?
Can you help me ?

Jeffrey Frey

unread,
Feb 1, 2018, 9:03:21 AM2/1/18
to Slurm User Community List, slurm...@schedmd.com
I had to figure this one out myself a few months ago. See src/common/plugstack.c:


/*
* Do not load static plugin options table in allocator context.
*/
if (stack->type != S_TYPE_ALLOCATOR)
plugin->opts = plugin_get_sym(p, "spank_options");


In the ALLOCATOR context you must register any CLI options using spank_options_register() inside your slurm_spank_init(). See e.g.


https://github.com/jtfrey/ud_slurm_addons/blob/master/spank/gridengine_compat.c


and the slurm_spank_init() function therein. The documentation page doesn't mention the fact that if you named your option list "spank_options" the plugin loader will automatically register them in non-ALLOCATOR contexts.
::::::::::::::::::::::::::::::::::::::::::::::::::::::
Jeffrey T. Frey, Ph.D.
Systems Programmer V / HPC Management
Network & Systems Services / College of Engineering
University of Delaware, Newark DE 19716
Office: (302) 831-6034 Mobile: (302) 419-4976
::::::::::::::::::::::::::::::::::::::::::::::::::::::





Tueur Volvo

unread,
Feb 2, 2018, 6:47:23 AM2/2/18
to Slurm User Community List
thank youJeffrey, it's work !
Reply all
Reply to author
Forward
0 new messages