Sbatch: error: Batch job submission failed: Node count specification invalid

GROMACS version: 2021.7
GROMACS modification:

Hi everyone!

I have this script:

#!/bin/bash

#SBATCH -N76

#SBATCH --ntasks-per-node=4

#SBATCH --cpus-per-task=8

#SBATCH --time=24:00:00

#SBATCH --gres=gpu:4

#SBATCH --account=IscrC_GROMODEX

#SBATCH --partition=boost_usr_prod

#SBATCH --output=remd.out

#SBATCH --error=remd.err

#SBATCH --mail-type=ALL

#SBATCH --mail-user=*******

#SBATCH --job-name=REMD

#load gromacs module

module load profile/chem-phys

module load spack

module load gromacs/2021.7–openmpi–4.1.4–gcc–11.3.0-cuda-11.8

export OMP_NUM_THREADS=8

mpirun -np 4 gmx_mpi mdrun -s remd -multidir remd* -replex 500 -nb gpu -ntomp 8 -pin on -reseed -1 -maxh 24

This is for a REMD simulation using GROMACS.

I receive this error when I run “sbatch nome_file.sh”

→ sbatch: error: Batch job submission failed: Node count specification invalid

I have 76 directories “remdN” (0<=N<76) in which there is the respective remd.tpr

Maybe due to limitations of your cluster, 76 nodes cannot be allocated at the same time? Note that to run 76 replicas, you don’t need to have 76 nodes, but 76 MPI ranks are sufficient. Does it work if you ask for 19 or 38 nodes?

I guess there is also another problem in your job script: with mpirun -np 4 you can only run 4 replicas. I think it should read mpirun -np 76.

I have written:

#!/bin/bash
#SBATCH -N19
#SBATCH --ntasks-per-node=4
#SBATCH --cpus-per-task=8
#SBATCH --time=24:00:00
#SBATCH --gres=gpu:4
[…]

export OMP_NUM_THREADS=8

mpirun -np 76 gmx_mpi mdrun -s remd -multidir remd* -replex 500 -nb gpu -ntomp 8 -pin on -reseed -1 -maxh 24

It seems to be working now.
Thank you so much!