If I supply a
--constraint=<arg>
option to an sbatch/salloc/srun, does the arg appear inside any object that a Lua CLI Filter could access?
I've tried this basic check
if is_unset(options['constraint']) then slurm_errorf('constraint is unset ') end
and seen that that object is, indeed, unset.
Kevin
Hi Kevin,
On 19/08/2024 08:15, Kevin Buckley via slurm-users wrote:
If I supply a
--constraint=<arg>
option to an sbatch/salloc/srun, does the arg appear inside any object that a Lua CLI Filter could access?
Have a look if you can spot them in: function slurm_cli_pre_submit(options, pack_offset) env_json = slurm.json_env() slurm.log_info("ENV: %s", env_json) opt_json = slurm.json_cli_options(options) slurm.log_info("OPTIONS: %s", opt_json) end
I thought all options could be access in the cli filter.
Ward
On 2024/08/19 15:11, Ward Poelmans via slurm-users wrote:
Have a look if you can spot them in: function slurm_cli_pre_submit(options, pack_offset) env_json = slurm.json_env() slurm.log_info("ENV: %s", env_json) opt_json = slurm.json_cli_options(options) slurm.log_info("OPTIONS: %s", opt_json) end
I thought all options could be access in the cli filter.
Cheers Ward, however, I'd already dumped the options array (OK: it's Lua so make that: table) and not see anything, hence wondering if constraints might be in their own object/array/table.
But no matter: something I spotted in the options["args"] array/table has since given me something reproducible to "key off", so that I can take a different path through the filter logic, when that is seen, which is what I was hoping to do by passing a constraint in.
There's usually more than one way to skin a cat: and this cat is now skinless!
Cheers again, Kevin