From: genaud Date: Wed, 24 Jun 2009 21:59:23 +0000 (+0000) Subject: check that specified platform and hostfile exist. X-Git-Tag: SVN~1292 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3e55187b3483204da82352c769fee9522e87eadc check that specified platform and hostfile exist. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6348 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index df12da4842..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,6 +59,11 @@ done EXEC="$1" shift +##----------------------------------- + + + + ##-------------------------------- DEFAULT or SPECIFIED PLATFORM -------------------------------------- if [ -z "${PLATFORM}" ]; then PLATFORMTMP="$(mktemp tmpXXXXXX)"