X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/94d27836eb04e8d1d000a07d97bec8fc9e3a9990..c901cc841ae6556dbee2375605fe927c18cd0d50:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index c5a4b17383..278a49eca4 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -140,9 +140,22 @@ fi ## hostfile has less than i lines. ##---------------------------------------------------------- +HAVE_SEQ="`which seq`" +HAVE_JOT="`which jot`" + +if [ -n "${HAVE_SEQ}" ]; then + SEQ=`${HAVE_SEQ} 0 $((${NUMPROCS}-1))` +else + cnt=0 + while (( $cnt < ${NUMPROCS} )) ; do + SEQ="$SEQ $cnt" + cnt=$((cnt + 1)); + done +fi + ##---- generate tags------------------------------ -for i in `seq 0 $((${NUMPROCS}-1))` +for i in ${SEQ} do if [ -n "${HOSTFILE}" ]; then j=$(( $i % ${NUMHOSTS} ))