X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/94d27836eb04e8d1d000a07d97bec8fc9e3a9990..aec4a150a2f7c9a328729b08d727ddf41817d941:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index c5a4b17383..ce3b1c5396 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -63,7 +63,7 @@ while true; do exit ;; - "--cfg="*) + "--cfg="*|"--log="*) SIMOPTS="$SIMOPTS $1" shift 1 ;; @@ -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} ))