At OSC we have a few GRESes that require the prolog to make changes on the system as root if the job requests the GRES. One such gres is the "ime" GRES which is for DDN's burst buffer. We need to have a user say --gres=ime and then be able to detect that in the prolog and start the IME service on the compute node as well as stop the daemon at job in end the epilog. We already force IME jobs to be exclusive to avoid starting/stopping the daemon when other jobs may be using the IME burst buffer. Based on discussions during OSC's consulting with SchedMD it seems like we may need to implement a SPANK plugin or PrEP plugin.
Hi Currently, you don’t have direct (without sending requests to slurmctld) access to gres info on spank or prolog script level. This info is available for PrEp plugin. In 20.02 prolog is called from "prep/script" plugin, this allows forwarding gres info to prolog script as environment variables. Another solution can be the creation of its PrEp plugin. Let me know if you are interested in passing to prolog some new environments, or you need some assistance on developing PrEp plugin. Dominik
Sending environment variables to the prolog sounds simpler, though I am not sure how that would be done. How would passing new environment variables be done? Any help on that aspect would be appreciated.
This was solved in another case: https://bugs.schedmd.com/show_bug.cgi?id=9389 I am using CLI filter plugin and job submit plugin to set SLURM_JOB_GRES environment variable and then reading that environment variable in SPANK plugin to set SPANK_GRES which is accessible in prolog. The C plugins are here: https://github.com/treydock/slurm/tree/gres_env/src/plugins/cli_filter/gres_env I am currently using Lua cli_filter plugin to replace the C cli_filter/gres_env plugin but kept the C approach in case we run into issues with Lua approach. *** This ticket has been marked as a duplicate of ticket 9389 ***