Have you already seen if SrunProlog or TaskProlog could be useful for your case?
The documentation is here:
https://slurm.schedmd.com/prolog_epilog.html
--
Fabio
From: Bhaskar Chakraborty via slurm-users <slurm-users@lists.schedmd.com>
Sent: Monday, October 28, 2024 6:56 PM
To: slurm-users@schedmd.com
Subject: [EXTERNAL] [slurm-users] Job pre / post submit scripts
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless
you can confirm the sender and know the content is safe. |
Hi,
Is there an option in slurm to launch a custom script at the time of job submission through sbatch
or salloc? The script should run with submit user permission in submit area.
The idea is that we need to enquire something which characterises our job’s requirement like CPU
slots, memory etc from a central server and we do need read access to user area prior to that.
In our use case the user doesn’t necessarily know beforehand what kind of resource his job needs.
(Hence, the need for such a script which will contact the server with user area info.)
Based on it we can modify the job a little later. A post submit script, if available, would inform us the slurm job id as well, it would get called just after the job has entered the system and prior to its scheduling.
Thanks,
Bhaskar.