Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update all our XML files + next XML version will be 4.1, not 5
[simgrid.git] / examples / smpi / replay_multiple / generate_multiple_deployment.sh
index 5b1ceed..e454081 100755 (executable)
@@ -114,7 +114,7 @@ APPLICATIONTMP=$(echo ${PROC_ARGS}|cut -d' ' -f2 -s)
 cat > ${APPLICATIONTMP} <<APPLICATIONHEAD
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
+<platform version="4.1">
 APPLICATIONHEAD
 
 ##---- cache hostnames of hostfile---------------
@@ -143,7 +143,7 @@ if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then
         
         if [ $NUMPROCSMINE != $(echo "$line"|cut -d' ' -f3) ];
         then
-          echo "declared num of processes for instance $instance : ${array[2]} is not the same as the one in the replay files : $NUMPROCSMINE. Please check consistency of these information"
+          echo "declared num of processes for instance $instance : $(echo "$line"|cut -d' ' -f3) is not the same as the one in the replay files : $NUMPROCSMINE. Please check consistency of these information"
           exit 1
         fi
         
@@ -168,7 +168,7 @@ if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then
 ##  hostfile has less than i lines.
 ##----------------------------------------------------------
 
-##---- generate <process> tags------------------------------
+##---- generate <actor> tags------------------------------
         do
            if [ -n "${HOSTFILE}" ]; then
                j=$(( ${NUMPROCS} % ${NUMHOSTS} +1))
@@ -180,13 +180,13 @@ if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then
                host="${hostname}"
             fi
         
-            echo "  <process host=\"${host}\" function=\"${instance}\"> <!-- function name used only for logging -->" >> ${APPLICATIONTMP}
+            echo "  <actor host=\"${host}\" function=\"${instance}\"> <!-- function name used only for logging -->" >> ${APPLICATIONTMP}
             echo "    <argument value=\"${instance}\"/> <!-- instance -->" >> ${APPLICATIONTMP}
             echo "    <argument value=\"${i}\"/> <!-- rank -->" >> ${APPLICATIONTMP}
             echo "    <argument value=\"$(echo $hosttrace|cut -d' ' -f$(($i+1)))\"/>" >> ${APPLICATIONTMP}
            
             echo "    <argument value=\"${sleeptime}\"/> <!-- delay -->" >> ${APPLICATIONTMP}
-            echo "  </process>" >> ${APPLICATIONTMP}
+            echo "  </actor>" >> ${APPLICATIONTMP}
             NUMPROCS=$(( ${NUMPROCS} +1))
         done
         # return IFS back to newline for "for" loop
@@ -198,7 +198,7 @@ if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then
     IFS=$IFS_OLD
     IFS_OLD=
 else
-    printf "File not found: %s\n", "${APP_TRACES[0]:-\${APP_TRACES[0]\}}" >&2
+    printf "File not found: %s\n", ${DESCRIPTIONFILE} >&2
     exit 1
 fi