X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fc0a76c21f0bceb0314aee5d62f785ea8009495e..382edfa5dc55f3cc055b5816ecb6ad1afe6f69b1:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 8fdc7da7d1..9dfb521d3f 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -350,7 +350,11 @@ fi for i in ${SEQ} do if [ -n "${HOSTFILE}" ]; then - j=$(( $i % ${NUMHOSTS} + 1 )) + if [ ${NUMHOSTS} = 0 ] ; then + j= 0 + else + j=$(( $i % ${NUMHOSTS} + 1 )) + fi fi ##---- optional display of ranks to process mapping if [ -n "${MAPOPT}" ]; then