<html style="direction: ltr;">
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1255">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="preferred-charset"
bgcolor="#FFFFFF" text="#000000">
Hello everyone,<br>
Sorry for might be a trivial question for most of you.<br>
<br>
I am trying to understand cpu allocation in slurm.<br>
The goal is to launch a batch job on one node. while the batch
itself will run several jobs in parallel each allocated a subset of
the cpus given to the batch.<br>
<br>
We've tried the following:<br>
<br>
#!/bin/bash<br>
#SBATCH --nodelist=server5<br>
#SBATCH --sockets-per-node=2<br>
#SBATCH --cores-per-socket=10<br>
nproc &<br>
srun --ntasks=1 --cpus-per-task=2 echo "nproc is `nproc` " & <br>
srun --ntasks=1 --cpus-per-task=4 echo "nproc2 is `nproc` " &
<br>
wait<br>
<br>
result is:<br>
20<br>
nproc is 20<br>
nproc2 is 20<br>
<br>
(lines order might be different, it doen't matter at this point)<br>
<br>
desired output is:<br>
20<br>
nproc is 2<br>
nproc2 is 4<br>
(lines order might be different, it doen't matter at this point)<br>
<br>
So the quetsion is:<br>
How can one send a few jobs running in parallel with different cpus
allocation on the same node?<br>
<br>
Thanks in advance, Nadav<br>
</body>
</html>