How to Assign One Node Among Specific Nodes in Slurm?

I want to submit a job using one node among a specific nodelist. Suppose, nodes 151-154 are my specific node. So, Here is my script:

#!/bin/sh
#SBATCH --job-name=k89a1
#SBATCH --nodes=1
#SBATCH --time=60-00:00:00
#SBATCH --gres=gpu:1
#SBATCH --cpus-per-task=1
#SBATCH --error=job.%J.err
#SBATCH --output=job.%J.out
#SBATCH --nodelist=node[151-154]

However, sbatch: error: invalid number of nodes (-N 2-1)

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article