X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5dd85c99128764c5afb400e2f7009757f82f8c2c..3e55187b3483204da82352c769fee9522e87eadc:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 29e4c87a73..a57e61aa4a 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -29,10 +29,18 @@ while true; do ;; "-platform") PLATFORM="$2" + if [ ! -f ${PLATFORM} ]; then + echo "[$0] ** error: the file '${PLATFORM}' does not exist. Aborting." + exit 1 + fi shift 2 ;; "-hostfile") HOSTFILE="$2" + if [ ! -f ${HOSTFILE} ]; then + echo "[$0] ** error: the file '${HOSTFILE}' does not exist. Aborting." + exit 1 + fi shift 2 ;; @@ -51,10 +59,14 @@ done EXEC="$1" shift +##----------------------------------- + + + + ##-------------------------------- DEFAULT or SPECIFIED PLATFORM -------------------------------------- if [ -z "${PLATFORM}" ]; then PLATFORMTMP="$(mktemp tmpXXXXXX)" - #PLATFORMTMP="pla.xml" cat > ${PLATFORMTMP} < @@ -117,6 +129,7 @@ for (( i=${NUMPROCS}; $i ; i=$i-1 )) do host="${hostnames[$j]}" fi echo " " >> ${APPLICATIONTMP} + echo " " >> ${APPLICATIONTMP} for ARG in $*; do echo " " >> ${APPLICATIONTMP} done @@ -130,9 +143,6 @@ for (( i=${NUMPROCS}; $i ; i=$i-1 )) do else host="${hostnames[$j]}" fi - -# echo " " >> ${APPLICATIONTMP} -# echo " " >> ${APPLICATIONTMP} done cat >> ${APPLICATIONTMP} <