Skip to content
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

Submitit with SLURM sub-scheduling #1734

Open
giorgos117 opened this issue Apr 20, 2023 · 2 comments
Open

Submitit with SLURM sub-scheduling #1734

giorgos117 opened this issue Apr 20, 2023 · 2 comments

Comments

@giorgos117
Copy link

Is it possible to use submitit with SLURM sub-scheduling? I work on a system where each new SLURM job allocates at least one node. If possible, I would like to use submitit with SLURM sub-scheduling to get e.g. 4 small SLURM jobs per node.

Best,

George

@gwenzek
Copy link
Contributor

gwenzek commented Apr 25, 2023

Hi, I'm not aware of this SLURM feature, could you share some link to docs and example slurm commands ?
In general submitit has escape hatches to pass arbitrary CLI argument to slurm so if you know the right sbatch/srun command, you should be able to write them with submitit

@giorgos117
Copy link
Author

Hello and thanks for the reply,

With the following script, 4 small jobs run in a single node:

`#!/bin/bash -l
#SBATCH --time=1:0:0
#SBATCH --account=def-your-project-account
#SBATCH --nodes=1
#SBATCH -p cpu
#SBATCH -q test
#SBATCH --ntasks=4 # number of tasks
#SBATCH --ntasks-per-node=4 # number of tasks per node
#SBATCH --cpus-per-task=32 # number of cores per task

srun -n 1 --exact ./test-task1 > output1.txt &
srun -n 1 --exact ./test-task2 > output2.txt &
srun -n 1 --exact ./test-task3 > output3.txt &
srun -n 1 --exact ./test-task4 > output4.txt &`

I couldn't find a relevant link from the SLURM docs, so I include one from the docs of an HPC system:

https://docs.lxp.lu/first-steps/handling_jobs/#sub-scheduling

Can I make submitit include multiple srun commands in the sbatch file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants