Skip to content
Snippets Groups Projects
Commit 43148a71 authored by Juan Escobar's avatar Juan Escobar
Browse files

Juan 06/03/2020: add numabind_core_slurm , for bind on core with srun/slurm

parent 46bbe4d3
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#NB_CORE=128
Numactl='numactl'
export IP=${SLURM_PROCID}
if [ "x${IP}" != "x" ]
then
export LIP=${SLURM_LOCALID}
export NP=${SLURM_NTASKS}
export NN=${SLURM_NNODES}
export NPN=$(( NP / NN ))
export NB_CORE=${SLURM_JOB_CPUS_PER_NODE/(*)/}
export NPC=$(( NB_CORE / NPN ))
CORE=$(( LIP * NPC ))
#echo IP=${IP} LIP=${LIP} NP=${NP} NN=${NN} NPN=${NPN} NPC=${NPC} HOST=`hostname` NB_CORE=${NB_CORE} CORE=${CORE}
#
# execution
#
exec ${Numactl} --physcpubind ${CORE} $*
else
exec ${Numactl} --physcpubind 0 $*
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment