0

My goal : I would like to launch multiple codes, nodes by nodes and allocated 100% each nodes

epic*        up   infinite      4    alloc lio[1-2]

And what I get :

epic*        up   infinite      4    mix lio[1-3,5]

my script :

#!/bin/bash
#SBATCH -A pt
#SBATCH -p epic
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=16
#SBATCH -J concentration
#SBATCH --array=1-4

. /usr/share/Modules/init/bash
module purge
module load openmpi-gcc/4.0.4-pmix_v2

MAXLEVEL=14
Ranf=8000
case $SLURM_ARRAY_TASK_ID in
  1) phi='0.01'
     ;;
  2) phi='0.008'
     ;;
  3) phi='0.005'
     ;;
  4) phi='0.001'
    ;;
esac

mkdir RBnf-P=$phi
cp RBnf `pwd`/RBnf-P=$phi/
cd RBnf-P=$phi
srun --mpi=pmix_v2 -J Ra${phi} ./RBnf $Ranf $MAXLEVEL $Phi

Each computation needs 16 process per node and each node have 32 process.

I have 4 computations to make.

My question : How can I allocated at 100% only 2 nodes ?

Because my script will use 4 nodes. So each nodes will be used at 50% of it's capacity (4 * 16/32). I would like to have my codes running on only 2 nodes at 100% of their capacity (2 * 32/32). With this script slurm will allocate an other node instead of fill a node already used. That's why I have "mix" node and I want only 2 nodes "alloc".

Have you any ideas ?

Suntory
  • 305
  • 2
  • 15
  • See this answer: https://stackoverflow.com/questions/39186698/what-does-the-ntasks-or-n-tasks-does-in-slurm?rq=1 – pcamach2 May 19 '22 at 12:11
  • I'm sorry but I don't understand how this answer could help me. I found the option --exclude in srun command but I don't think it's the best solution. – Suntory May 23 '22 at 06:36
  • I don't think we're reading the same words here. You are specifying only a minimum number of tasks per node and one node for each job, but your options do not set maximums on CPU. Unless you request the batch to use only those two nodes - or conversely restrict access to other nodes (e.g. setting up partitions of two nodes) - it is not clear from the information you presented why only two nodes would be used. – pcamach2 May 23 '22 at 23:19
  • Oh ok thank you. I have re-edit my post. So how can I specifying only 2 nodes for all my job ? – Suntory May 24 '22 at 06:22

1 Answers1

0

I found why I couldn't allocated node by node.

The option "oversubscribe" in the slurm.conf file wasn't specified. That's why I get nodes "mix" and not at 100% allocated.

https://slurm.schedmd.com/cons_res_share.html

Now I automatically use two nodes.

Suntory
  • 305
  • 2
  • 15