X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3c072dea92bbf0e4df46b1d8d56cd62e68883b33..a1b9570ff3273725b1843dfadc6c13d229ac3dbb:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index ce3b1c5396..85059a9624 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -13,6 +13,8 @@ NETWORK_LATENCY="${DEFAULT_NETWORK_LATENCY}" NUMPROCS="${DEFAULT_NUMPROCS}" POWER="${DEFAULT_POWER}" +SIMOPTS="--cfg=network/model:SMPI --cfg=TCP_gamma:4194304" + while true; do case "$1" in "-np" | "-n") @@ -43,7 +45,7 @@ while true; do fi shift 2 ;; - + "-map") MAPOPT="true" shift 1 @@ -54,7 +56,7 @@ while true; do shift 1 ;; - "-help" | "--help" | "-h") + "-help" | "--help" | "-h") echo "usage:" echo "$0 [-quiet] [-keep-temps] [-np ] -platform -hostfile [-map] program [program-options]" echo "or (deprecated usage):" @@ -62,9 +64,12 @@ while true; do echo exit ;; - + "--cfg="*|"--log="*) - SIMOPTS="$SIMOPTS $1" + for OPT in ${1#*=} + do + SIMOPTS="$SIMOPTS ${1%%=*}=$OPT" + done shift 1 ;; *) @@ -82,7 +87,7 @@ shift ##-------------------------------- DEFAULT or SPECIFIED PLATFORM -------------------------------------- -if [ -z "${PLATFORM}" ]; then +if [ -z "${PLATFORM}" ]; then PLATFORMTMP="$(mktemp tmpXXXXXX)" cat > ${PLATFORMTMP} < tags------------------------------ -for i in ${SEQ} +for i in ${SEQ} do if [ -n "${HOSTFILE}" ]; then j=$(( $i % ${NUMHOSTS} )) - fi + fi ##---- optional display of ranks to process mapping if [ -n "${MAPOPT}" ]; then - echo "[rank $i] -> ${hostnames[$j]}" + echo "[rank $i] -> ${hostnames[$j]}" fi if [ -z "${hostnames[$j]}" ]; then @@ -190,7 +194,7 @@ ${EXEC} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} if [ -z "${KEEP}" ] ; then if [ -z "${PLATFORM}" ]; then - rm ${PLATFORMTMP} + rm ${PLATFORMTMP} fi rm ${APPLICATIONTMP} fi