X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/10a7f95aedfe591594bf993e663e28956bdbaeee..3c072dea92bbf0e4df46b1d8d56cd62e68883b33:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index e9660c2300..ce3b1c5396 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -43,20 +43,30 @@ while true; do fi shift 2 ;; - + "-map") - MAPOPT="on" + MAPOPT="true" + shift 1 + ;; + + "-keep-temps") + KEEP="true" shift 1 ;; "-help" | "--help" | "-h") echo "usage:" - echo "$0 [-np ] -platform -hostfile [-map] program [program-options]" + echo "$0 [-quiet] [-keep-temps] [-np ] -platform -hostfile [-map] program [program-options]" echo "or (deprecated usage):" - echo "$0 [-np ] [-bandwidth ] [-latency ] program [program-options]" + echo "$0 [-quiet] [-keep-temps] [-np ] [-bandwidth ] [-latency ] program [program-options]" echo exit ;; + + "--cfg="*|"--log="*) + SIMOPTS="$SIMOPTS $1" + shift 1 + ;; *) break ;; @@ -130,16 +140,29 @@ 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 - echo "[rank $j] -> ${hostnames[$j]}" + if [ -n "${MAPOPT}" ]; then + echo "[rank $i] -> ${hostnames[$j]}" fi if [ -z "${hostnames[$j]}" ]; then @@ -160,11 +183,14 @@ cat >> ${APPLICATIONTMP} <