X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e903bd53c57711fbe9b6fc940efd48d4c8970949..278b810c564b6261bb08b57f4c9ee4a1553d74de:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index ec20d10f9f..a61487afcb 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -16,13 +16,15 @@ NETWORK_LATENCY="${DEFAULT_NETWORK_LATENCY}" NUMPROCS="${DEFAULT_NUMPROCS}" POWER="${DEFAULT_POWER}" -SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=network/model:SMPI --cfg=TCP_gamma:4194304" +SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP_gamma:4194304" #usage to print the way this script should be called function usage () { echo "usage:" echo "$0 [-quiet] [-keep-temps]" echo " [-np ] -platform -hostfile [-map] program [program-options]" + echo " [-keep-temps] # don't remove the generated files after execution" + echo " [-map] # display the machine on which each process rank is mapped" echo " [-trace] # activate tracing" echo " [-trace-grouped] # group MPI processes by location" echo " [-trace-resource] # trace resource utilization" @@ -129,14 +131,18 @@ shift ##----------------------------------- -# test if we have something to execute, otherwise show usage and exit -if [ -z ${EXEC} ] -then - echo "Program is missing" +# Basic checks on the provided arguments +if [ -z ${EXEC} ] ; then + echo "You must provide a program to execute." usage exit 1 fi +if [ -z ${HOSTFILE} ] ; then + echo "No hostfile specified." + usage + exit 1 +fi ##-------------------------------- DEFAULT or SPECIFIED PLATFORM -------------------------------------- @@ -229,7 +235,7 @@ do else host="${hostnames[$j]}" fi - echo " " >> ${APPLICATIONTMP} + echo " " >> ${APPLICATIONTMP} echo " " >> ${APPLICATIONTMP} for ARG in $*; do echo " " >> ${APPLICATIONTMP} @@ -269,6 +275,7 @@ if [ -n "${KEEP}" ] ; then echo ${EXEC} ${SIMOPTS} ${TRACEOPTIONS} ${PLATFORMTMP} ${APPLICATIONTMP} fi ${EXEC} ${SIMOPTS} ${TRACEOPTIONS} ${PLATFORMTMP} ${APPLICATIONTMP} +status=$? if [ -z "${KEEP}" ] ; then if [ -z "${PLATFORM}" ]; then @@ -276,3 +283,5 @@ if [ -z "${KEEP}" ] ; then fi rm ${APPLICATIONTMP} fi + +exit $status