Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
check that specified platform and hostfile exist.
authorgenaud <genaud@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 24 Jun 2009 21:59:23 +0000 (21:59 +0000)
committergenaud <genaud@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 24 Jun 2009 21:59:23 +0000 (21:59 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6348 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/smpi/smpirun.in

index df12da4..a57e61a 100755 (executable)
@@ -29,10 +29,18 @@ while true; do
     ;;
    "-platform")
        PLATFORM="$2"
     ;;
    "-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"
        shift 2
     ;;
    "-hostfile")
        HOSTFILE="$2"
+      if [ ! -f ${HOSTFILE} ]; then
+               echo "[$0] ** error: the file '${HOSTFILE}' does not exist. Aborting."
+               exit 1
+      fi
        shift 2
     ;;
 
        shift 2
     ;;
 
@@ -51,6 +59,11 @@ done
 EXEC="$1"
 shift
 
 EXEC="$1"
 shift
 
+##-----------------------------------
+
+
+
+
 ##-------------------------------- DEFAULT or SPECIFIED PLATFORM --------------------------------------
 if [ -z "${PLATFORM}" ]; then  
        PLATFORMTMP="$(mktemp tmpXXXXXX)"
 ##-------------------------------- DEFAULT or SPECIFIED PLATFORM --------------------------------------
 if [ -z "${PLATFORM}" ]; then  
        PLATFORMTMP="$(mktemp tmpXXXXXX)"