Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions offload/utils/gpurun/gpurun
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,26 @@ if [ -z "$_num_local_ranks" ] && [ ! -z $SLURM_CPUS_ON_NODE ] ; then
_num_local_ranks=$SLURM_CPUS_ON_NODE
_local_rank_num=$SLURM_LOCALID
fi

if [ "$_use_numactl_rocr" == "1" ] ; then
numactl --cpunodebind $ROCR_VISIBLE_DEVICES --membind $ROCR_VISIBLE_DEVICES $*
exit $?
_cmd_binary=`which numactl`
if [ $? == 0 ] ; then
numactl --cpunodebind $ROCR_VISIBLE_DEVICES --membind $ROCR_VISIBLE_DEVICES $*
exit $?
else
$*
exit $?
fi
fi
if [ "$_use_numactl_ompi" == "1" ] ; then
numactl --cpunodebind $OMPI_COMM_WORLD_LOCAL_RANK --membind $OMPI_COMM_WORLD_LOCAL_RANK $*
exit $?
_cmd_binary=`which numactl`
if [ $? == 0 ] ; then
numactl --cpunodebind $OMPI_COMM_WORLD_LOCAL_RANK --membind $OMPI_COMM_WORLD_LOCAL_RANK $*
exit $?
else
$*
exit $?
fi
fi
# If none of the above MPIs, assume gpurun is wrapper for single process on single GPU
if [ -z "$_num_local_ranks" ] ; then
Expand Down