Literal job arrays are built into Slurm: https://slurm.schedmd.com/job_array.html
Alternatively, if you wanted to allocate a set of CPUs for a parallel task, and then run a set of single-CPU tasks in the same job, something like: #!/bin/bash #SBATCH --ntasks=30 srun --ntasks=${SLURM_NTASKS} hostname is one way of doing it. If that’s not what you’re looking for, some other details would be needed. -- Mike Renfro, PhD / HPC Systems Administrator, Information Technology Services 931 372-3601 / Tennessee Tech University > On Dec 18, 2018, at 11:03 AM, Alfredo Quevedo <maquevedo....@gmail.com> wrote: > > Dear slurm users, > > I would like to know if it is possible to prepare a slurm submission > script in a way that initially CPU resources are requested (lets say 30 > CPUs), and afterwards, the assigned resources are used to launch an > array of 30 single CPU jobs array? I would greatly appreciate any hint > in this respect > > Thanks in advance > > Alfredo > >