-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepending extra scheduler commands in scripts #3198
Comments
This is indeed a limitation for SLURM (for other like SGE it is OK to put scheduler commands in |
Hi @adegomme , does the In any case,
|
Agreed with comment 2 of Leo and on the use of the custom_scheduler_commands (that are there exactly for this reason). I am not sure that swapping the order of prepend text and environment variables is a good solution. One thing that is probably missing instead (and we could convert this issue to this): allow to define custom_scheduler_commands in the computer configuration, so you can define them once and for all for a computer (now this is not possible IIRC, you can only define the prepend text). |
Hi,
I want to setup a code (or a computer) with slurm, and set the project/partition parameters once and for all in the setup phase.
For this I set some prepend_text when asked during the code setup
#SBATCH --account=xxx
#SBATCH --partition=yyy
This works well. But if in my project I setup environment variables through the metadata, they get inserted in the resulting submission script before these lines, which are then ignored by slurm.
The script then looks like
#SBATCH --cpus-per-task=4
#SBATCH --time=00:30:00
#ENVIRONMENT VARIABLES BEGIN###
export OMP_NUM_THREADS='1'
#ENVIRONMENT VARIABLES END###
#SBATCH --account=xxx
#SBATCH --partition=yyy
The only option I see then is to give the queue_name and account options to the scheduler through the calcjob, hence having to write them explicitely in my notebooks everytime I want to create a calculator, which is not very practical as they are not meant to change.
Would it be possible to insert the variables after the prepend_text in the submission scripts ? Or maybe adding an "extra scheduler commands" in the scheduler plugins ? I could subclass the slurm one, but I would prefer doing otherwise.
The text was updated successfully, but these errors were encountered: