File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -203,13 +203,26 @@ if [ -z "$_num_local_ranks" ] && [ ! -z $SLURM_CPUS_ON_NODE ] ; then
203203 _num_local_ranks=$SLURM_CPUS_ON_NODE
204204 _local_rank_num=$SLURM_LOCALID
205205fi
206+
206207if [ " $_use_numactl_rocr " == " 1" ] ; then
207- numactl --cpunodebind $ROCR_VISIBLE_DEVICES --membind $ROCR_VISIBLE_DEVICES $*
208- exit $?
208+ _cmd_binary=` which numactl`
209+ if [ $? == 0 ] ; then
210+ numactl --cpunodebind $ROCR_VISIBLE_DEVICES --membind $ROCR_VISIBLE_DEVICES $*
211+ exit $?
212+ else
213+ $*
214+ exit $?
215+ fi
209216fi
210217if [ " $_use_numactl_ompi " == " 1" ] ; then
211- numactl --cpunodebind $OMPI_COMM_WORLD_LOCAL_RANK --membind $OMPI_COMM_WORLD_LOCAL_RANK $*
212- exit $?
218+ _cmd_binary=` which numactl`
219+ if [ $? == 0 ] ; then
220+ numactl --cpunodebind $OMPI_COMM_WORLD_LOCAL_RANK --membind $OMPI_COMM_WORLD_LOCAL_RANK $*
221+ exit $?
222+ else
223+ $*
224+ exit $?
225+ fi
213226fi
214227# If none of the above MPIs, assume gpurun is wrapper for single process on single GPU
215228if [ -z " $_num_local_ranks " ] ; then
You can’t perform that action at this time.
0 commit comments