X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/31995feaea3e1ba5e1d3398e0497b85749625739..3c072dea92bbf0e4df46b1d8d56cd62e68883b33:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 0fda9b4c3f..ce3b1c5396 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -43,14 +43,9 @@ while true; do fi shift 2 ;; - + "-map") - MAPOPT="on" - shift 1 - ;; - - "-quiet") - QUIET="true" + MAPOPT="true" shift 1 ;; @@ -68,7 +63,7 @@ while true; do exit ;; - "--cfg="*) + "--cfg="*|"--log="*) SIMOPTS="$SIMOPTS $1" shift 1 ;; @@ -145,15 +140,28 @@ 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} )) fi ##---- optional display of ranks to process mapping - if [ -n ${MAPOPT} ]; then + if [ -n "${MAPOPT}" ]; then echo "[rank $i] -> ${hostnames[$j]}" fi @@ -175,17 +183,14 @@ cat >> ${APPLICATIONTMP} <