Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorscastelli <stephane.castelli@inria.fr>
Wed, 4 Jun 2014 18:27:06 +0000 (20:27 +0200)
committerscastelli <stephane.castelli@inria.fr>
Wed, 4 Jun 2014 18:27:06 +0000 (20:27 +0200)
Conflicts:
src/smpi/smpiff.in

doc/manpage/smpicc.1
doc/manpage/smpicxx.1 [new file with mode: 0644]
src/smpi/smpicc.in
src/smpi/smpicxx.in
src/smpi/smpif90.in
src/smpi/smpiff.in
src/smpi/smpirun.in
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp

index 2a79ffe..8eb82be 100644 (file)
@@ -4,9 +4,9 @@ smpicc \- SMPI C wrapper compiler
 .SH SYNOPSIS
 smpicc …
 .SH DESCRIPTION
-smpicc is just a wrapper around the compiler used to build simgrid, adding the right flags in order to use the simgrid library and SMPI, the MPI implementation within it. Any arguments filled to smpicc will be passed to the underlying compiler directly, of which the \fB\-\-version\fR argument should give the name and the version. Please refer to its documentation in case of trouble.
+smpicc is just a wrapper around the compiler used to build simgrid, adding the right flags in order to use the simgrid library and SMPI, the MPI implementation within it. Any arguments filled to smpicc will be passed to the underlying compiler directly, of which the \fB\-\-version\fR argument should give the name and the version. Please refer to its documentation in case of trouble.
 .SH ENVIRONMENT VARIABLES
-All environment variables taken into account by the compiler will be used, but note that setting CC has no effect.
+All environment variables taken into account by the underlying compiler will be used, but note that the compiler can not be modified.
 .SH AUTHORS
 The SimGrid team (simgrid-devel@lists.gforge.inria.fr)
 .SH COPYRIGHT AND LICENCE
@@ -14,4 +14,5 @@ Copyright (c) 2014. The SimGrid Team. All rights reserved.
 
 This program is free software; you may redistribute it and/or modify it under the terms of GNU LGPL (v2.1) license.
 .SH SEE ALSO
-.B smpirun\fR(1)
+.BR smpirun (1),
+.BR smpicxx (1)
diff --git a/doc/manpage/smpicxx.1 b/doc/manpage/smpicxx.1
new file mode 100644 (file)
index 0000000..4d0735e
--- /dev/null
@@ -0,0 +1,18 @@
+.TH smpicxx 1
+.SH NAME
+smpicxx \- SMPI C++ wrapper compiler
+.SH SYNOPSIS
+smpicxx …
+.SH DESCRIPTION
+smpicc is just a wrapper around the C++ compiler used to build simgrid, adding the right flags in order to use the simgrid library and SMPI, the MPI implementation within it. Any arguments filled to smpicc will be passed to the underlying compiler directly, of which the \fB\-\-version\fR argument should give the name and the version. Please refer to its documentation in case of trouble.
+.SH ENVIRONMENT VARIABLES
+All environment variables taken into account by the underlying compiler will be used, but note that the compiler can not be modified.
+.SH AUTHORS
+The SimGrid team (simgrid-devel@lists.gforge.inria.fr)
+.SH COPYRIGHT AND LICENCE
+Copyright (c) 2014. The SimGrid Team. All rights reserved.
+
+This program is free software; you may redistribute it and/or modify it under the terms of GNU LGPL (v2.1) license.
+.SH SEE ALSO
+.BR smpirun (1),
+.BR smpicc (1)
index d18e0f1..db70796 100755 (executable)
@@ -6,6 +6,8 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
 CC=@CMAKE_C_COMPILER@
 
 INCLUDEARGS="@includeflag@"
@@ -40,10 +42,15 @@ while [ $# -gt 0 ]; do
             fi
             list_add CMDARGS "${SRCFILE}"
             ;;
+        '-version' | '--version' | '-v')
+            # -e is not recognised by MS-DOS...
+            echo -e $SIMGRID_VERSION
+            exit 0
+            ;;           
         *)
             list_add CMDARGS "${ARG}"
-      ;;
-  esac
+            ;;
+    esac
 done
 
 list_set CMDLINE "${CC}"
index 1f2cb32..7026936 100755 (executable)
@@ -6,20 +6,22 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
-CC=@CMAKE_CXX_COMPILER@
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
+CXX=@CMAKE_CXX_COMPILER@
 
 INCLUDEARGS="@includeflag@"
 CMAKE_LINKARGS="-L@libdir@"
 
 @SMPITOOLS_SH@
 
-list_set CFLAGS
+list_set CXXFLAGS
 list_set LINKARGS
 if [ "@WIN32@" != "1" ]; then
-    list_add CFLAGS "-Dmain=smpi_simulated_main_"
+    list_add CXXFLAGS "-Dmain=smpi_simulated_main_"
     list_add LINKARGS "-lsimgrid"
 else
-    list_add CFLAGS "-include" "@includedir@/smpi/smpi_main.h"
+    list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_main.h"
     list_add LINKARGS "@libdir@\libsimgrid.dll"
 fi
 
@@ -40,14 +42,18 @@ while [ $# -gt 0 ]; do
             fi
             list_add CMDARGS "${SRCFILE}"
             ;;
+        "-version" | "--version" | "-v")
+            echo -e $SIMGRID_VERSION
+            exit 0
+            ;;
         *)
             list_add CMDARGS "${ARG}"
       ;;
   esac
 done
 
-list_set CMDLINE "${CC}"
-list_add_not_empty CMDLINE "${CFLAGS}"
+list_set CMDLINE "${CXX}"
+list_add_not_empty CMDLINE "${CXXFLAGS}"
 list_add_not_empty CMDLINE ${INCLUDEARGS}
 list_add_not_empty CMDLINE ${CMAKE_LINKARGS}
 list_add_not_empty CMDLINE "${CMDARGS}"
index c160a99..d0f37bb 100644 (file)
@@ -6,6 +6,8 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
 F90=@GFORTRAN_EXE@
 
 INCLUDEARGS="@includeflag@"
@@ -43,6 +45,11 @@ while [ $# -gt 0 ]; do
             SRCFILE="${TMPFILE}"
             list_add CMDLINE "${SRCFILE}"
             ;;
+        '-version' | '--version' | '-v')
+            # -e is not recognised by MS-DOS...
+            echo -e $SIMGRID_VERSION
+            exit 0
+            ;;           
         *)
             list_add CMDLINE "${ARG}"
             ;;
index e97d6c2..54e63ee 100644 (file)
@@ -6,10 +6,18 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
+<<<<<<< HEAD
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
+prefix="@exec_prefix@"
+smpicc="$prefix/bin/smpicc"
+smpif2c="$prefix/bin/smpif2c"
+=======
 F77=@GFORTRAN_EXE@
 
 INCLUDEARGS="@includeflag@"
 CMAKE_LINKARGS="-L@libdir@"
+>>>>>>> 167177a9f2980982c1bb3f89ec90fc1937395cd5
 
 @SMPITOOLS_SH@
 
@@ -43,6 +51,11 @@ while [ $# -gt 0 ]; do
             SRCFILE="${TMPFILE}"
             list_add CMDLINE "${SRCFILE}"
             ;;
+        '-version' | '--version' | '-v')
+            # -e is not recognised by MS-DOS...
+            echo -e $SIMGRID_VERSION
+            exit 0
+            ;;           
         *)
             list_add CMDLINE "${ARG}"
             ;;
index a27daaa..7f1407b 100755 (executable)
@@ -8,6 +8,8 @@
 
 @CMAKE_SMPI_COMMAND@
 
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
 DEFAULT_LOOPBACK_BANDWIDTH="498000000"
 DEFAULT_LOOPBACK_LATENCY="0.000004"
 DEFAULT_NETWORK_BANDWIDTH="$((26 * 1024 * 1024))"
@@ -25,7 +27,7 @@ SIMOPTS="--cfg=maxmin/precision:1e-3 --cfg=surf/precision:1e-9 --cfg=network/mod
 
 #usage to print the way this script should be called
 usage () {
-cat <<EOF
+    cat <<EOF
 Usage: $0 [OPTIONS] -platform <xmldesc> -hostfile <hostfile> program [program-options]
 Options:
   -keep-temps                # don't remove the generated files after execution
@@ -61,122 +63,127 @@ WRAPPER=""
 HOSTFILE=""
 
 while true; do
-  case "$1" in
-   "-np" | "-n")
-      NUMPROCS="$2"
-      shift 2
-    ;;
-   "-bandwidth")
-      NETWORK_BANDWIDTH="$2"
-      shift 2
-    ;;
-   "-latency")
-      NETWORK_LATENCY="$2"
-      shift 2
-    ;;
-   "-platform")
-       PLATFORM="$2"
-      if [ ! -f "${PLATFORM}" ]; then
+    case "$1" in
+        "-np" | "-n")
+            NUMPROCS="$2"
+            shift 2
+            ;;
+        "-bandwidth")
+            NETWORK_BANDWIDTH="$2"
+            shift 2
+            ;;
+        "-latency")
+            NETWORK_LATENCY="$2"
+            shift 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"
-      if [ ! -f "${HOSTFILE}" ]; then
+            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
-    ;;
+            fi
+           shift 2
+            ;;
 
-   "-machinefile")
-       HOSTFILE="$2"
-      if [ ! -f "${HOSTFILE}" ]; then
+        "-machinefile")
+           HOSTFILE="$2"
+            if [ ! -f "${HOSTFILE}" ]; then
                echo "[$0] ** error: the file '${HOSTFILE}' does not exist. Aborting."
                exit 1
-      fi
-       shift 2
-    ;;
-
-   "-ext")
-      EXTOPT="$2"
-      shift 2
-   ;;
-
-   "-map")
-       MAPOPT="true"
-      shift 1
-   ;;
-
-   "-trace")
-      TRACE_ACTIVE="true"
-      shift 1
-   ;;
-
-   "-trace-ti")
-      TRACE_ACTIVE="true"
-      TRACE_TI_ACTIVE="true"
-      shift 1
-   ;;
-
-   "-trace-comment")
-      TRACE_COMMENT="$2"
-      shift 2
-   ;;
-
-   "-trace-comment-file")
-      TRACE_COMMENT_FILE="$2"
-      shift 2
-   ;;
-
-   "-trace-file")
-      TRACE_FILENAME="$2"
-      shift 2
-   ;;
-
-   "-trace-grouped")
-      TRACE_GROUPED="true"
-      shift 1
-   ;;
-
-   "-trace-resource")
-      TRACE_RESOURCE="true"
-      shift 1
-   ;;
-
-   "-trace-viva")
-       TRACE_VIVA="true"
-         shift 1
-   ;;
-
-   "-keep-temps")
-       KEEP="true"
-      shift 1
-   ;;
-
-   "-wrapper")
-      WRAPPER="$2"
-      shift 2
-      ;;
-
-   "-help" | "--help" | "-h")
-      usage
-      exit
-   ;;
-
-   "--cfg="*|"--log="*)
-     for OPT in ${1#*=}
-     do
-       SIMOPTS="$SIMOPTS ${1%%=*}=$OPT"
-     done
-     shift 1
-   ;;
-    *)
-      break
-    ;;
-  esac
+            fi
+           shift 2
+            ;;
+
+        "-ext")
+            EXTOPT="$2"
+            shift 2
+            ;;
+
+        "-map")
+           MAPOPT="true"
+            shift 1
+            ;;
+
+        "-trace")
+            TRACE_ACTIVE="true"
+            shift 1
+            ;;
+
+        "-trace-ti")
+            TRACE_ACTIVE="true"
+            TRACE_TI_ACTIVE="true"
+            shift 1
+            ;;
+
+        "-trace-comment")
+            TRACE_COMMENT="$2"
+            shift 2
+            ;;
+
+        "-trace-comment-file")
+            TRACE_COMMENT_FILE="$2"
+            shift 2
+            ;;
+
+        "-trace-file")
+            TRACE_FILENAME="$2"
+            shift 2
+            ;;
+
+        "-trace-grouped")
+            TRACE_GROUPED="true"
+            shift 1
+            ;;
+
+        "-trace-resource")
+            TRACE_RESOURCE="true"
+            shift 1
+            ;;
+
+        "-trace-viva")
+           TRACE_VIVA="true"
+           shift 1
+            ;;
+
+        "-keep-temps")
+           KEEP="true"
+            shift 1
+            ;;
+
+        "-wrapper")
+            WRAPPER="$2"
+            shift 2
+            ;;
+
+        "-help" | "--help" | "-h")
+            usage
+            exit 0
+            ;;
+
+        "-version" | "--version" | "-v")
+            echo -e $SIMGRID_VERSION
+            exit 0
+            ;;
+
+        "--cfg="*|"--log="*)
+            for OPT in ${1#*=}
+            do
+                SIMOPTS="$SIMOPTS ${1%%=*}=$OPT"
+            done
+            shift 1
+            ;;
+        *)
+            break
+            ;;
+    esac
 done
 
 if [ -n "$WRAPPER" ]; then
@@ -188,19 +195,19 @@ shift
 
 # steel --cfg and --logs options
 while [ $# -gt 0 ]; do
-  case "$1" in
-   "--cfg="*|"--log="*)
-     for OPT in ${1#*=}
-     do
-       SIMOPTS="$SIMOPTS ${1%%=*}=$OPT"
-     done
-     shift 1
-   ;;
-    *)
-      PROC_ARGS="${PROC_ARGS:+$PROC_ARGS }$1"
-      shift      
-    ;;
-  esac
+    case "$1" in
+        "--cfg="*|"--log="*)
+            for OPT in ${1#*=}
+            do
+                SIMOPTS="$SIMOPTS ${1%%=*}=$OPT"
+            done
+            shift 1
+            ;;
+        *)
+            PROC_ARGS="${PROC_ARGS:+$PROC_ARGS }$1"
+            shift      
+            ;;
+    esac
 done
 
 
@@ -250,44 +257,44 @@ fi
 
 ##-------------------------------- DEFAULT or SPECIFIED PLATFORM --------------------------------------
 if [ -z "${PLATFORM}" ]; then
-       PLATFORMTMP="$(mktemp tmpXXXXXX)"
+    PLATFORMTMP="$(mktemp tmpXXXXXX)"
 
-       cat > ${PLATFORMTMP} <<PLATFORMHEAD
+    cat > ${PLATFORMTMP} <<PLATFORMHEAD
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 <platform version="3">
 <AS id="AS0" routing="Full">
 PLATFORMHEAD
 
-i=${NUMPROCS}
-while [ $i -gt 0 ]; do
-  echo "  <host id=\"host$i\" power=\"${POWER}\"/>" >> ${PLATFORMTMP}
-  echo "  <link id=\"loop$i\" bandwidth=\"${LOOPBACK_BANDWIDTH}\" latency=\"${LOOPBACK_LATENCY}\"/>" >> ${PLATFORMTMP}
-  echo "  <link id=\"link$i\" bandwidth=\"${NETWORK_BANDWIDTH}\" latency=\"${NETWORK_LATENCY}\"/>" >> ${PLATFORMTMP}
-  i=$((i - 1))
-done
+    i=${NUMPROCS}
+    while [ $i -gt 0 ]; do
+        echo "  <host id=\"host$i\" power=\"${POWER}\"/>" >> ${PLATFORMTMP}
+        echo "  <link id=\"loop$i\" bandwidth=\"${LOOPBACK_BANDWIDTH}\" latency=\"${LOOPBACK_LATENCY}\"/>" >> ${PLATFORMTMP}
+        echo "  <link id=\"link$i\" bandwidth=\"${NETWORK_BANDWIDTH}\" latency=\"${NETWORK_LATENCY}\"/>" >> ${PLATFORMTMP}
+        i=$((i - 1))
+    done
 
-i=${NUMPROCS}
-while [ $i -gt 0 ]; do
-  j=${NUMPROCS}
-  while [ $j -gt 0 ]; do
-    if [ $i -eq $j ]; then
-      echo "  <route src=\"host$i\" dst=\"host$j\"><link_ctn id=\"loop$i\"/></route>" >> ${PLATFORMTMP}
-    else
-      echo "  <route src=\"host$i\" dst=\"host$j\"><link_ctn id=\"link$i\"/><link_ctn id=\"link$j\"/></route>" >> ${PLATFORMTMP}
-    fi
-    j=$((j - 1))
-  done
-  i=$((i - 1))
-done
+    i=${NUMPROCS}
+    while [ $i -gt 0 ]; do
+        j=${NUMPROCS}
+        while [ $j -gt 0 ]; do
+            if [ $i -eq $j ]; then
+                echo "  <route src=\"host$i\" dst=\"host$j\"><link_ctn id=\"loop$i\"/></route>" >> ${PLATFORMTMP}
+            else
+                echo "  <route src=\"host$i\" dst=\"host$j\"><link_ctn id=\"link$i\"/><link_ctn id=\"link$j\"/></route>" >> ${PLATFORMTMP}
+            fi
+            j=$((j - 1))
+        done
+        i=$((i - 1))
+    done
 
-cat >> ${PLATFORMTMP} <<PLATFORMFOOT
+    cat >> ${PLATFORMTMP} <<PLATFORMFOOT
 </AS>
 </platform>
 PLATFORMFOOT
 
 else
-       PLATFORMTMP=${PLATFORM}
+    PLATFORMTMP=${PLATFORM}
 fi
 ##-------------------------------- end DEFAULT or SPECIFIED PLATFORM --------------------------------------
 
@@ -304,19 +311,19 @@ APPLICATIONHEAD
 
 ##---- cache hostnames of hostfile---------------
 if [ -n "${HOSTFILE}" ] && [ -f ${HOSTFILE} ]; then
-  hostnames=$(cat ${HOSTFILE} | tr '\n\r' '  ')
-  NUMHOSTS=$(cat ${HOSTFILE} | wc -l)
+    hostnames=$(cat ${HOSTFILE} | tr '\n\r' '  ')
+    NUMHOSTS=$(cat ${HOSTFILE} | wc -l)
 fi
 
 if [ "${EXTOPT}" = "smpi_replay" ]; then
-  APP_TRACES=$PROC_ARGS
-  if [ -n "${APP_TRACES}" ] && [ -f "${APP_TRACES}" ]; then
-     hosttraces=$(cat ${APP_TRACES} | tr '\n\r' '  ' )
-     NUMTRACES=$(cat ${APP_TRACES} | wc -l)
-  else
-     printf "File not found: %s\n", "${APP_TRACES:-\${APP_TRACES\}}" >&2
-     exit 1
-  fi
+    APP_TRACES=$PROC_ARGS
+    if [ -n "${APP_TRACES}" ] && [ -f "${APP_TRACES}" ]; then
+        hosttraces=$(cat ${APP_TRACES} | tr '\n\r' '  ' )
+        NUMTRACES=$(cat ${APP_TRACES} | wc -l)
+    else
+        printf "File not found: %s\n", "${APP_TRACES:-\${APP_TRACES\}}" >&2
+        exit 1
+    fi
 fi
 
 ##----------------------------------------------------------
@@ -329,47 +336,47 @@ fi
 HAVE_SEQ="`which seq 2>/dev/null`"
 
 if [ -n "${HAVE_SEQ}" ]; then
-       SEQ=`${HAVE_SEQ} 0 $((${NUMPROCS}-1))`
+    SEQ=`${HAVE_SEQ} 0 $((${NUMPROCS}-1))`
 else
-      cnt=0
-       while (( $cnt < ${NUMPROCS} )) ; do
-           SEQ="$SEQ $cnt"
-           cnt=$((cnt + 1));
-       done
+    cnt=0
+    while (( $cnt < ${NUMPROCS} )) ; do
+       SEQ="$SEQ $cnt"
+       cnt=$((cnt + 1));
+    done
 fi
 
 ##---- generate <process> tags------------------------------
 
 for i in ${SEQ}
 do
-  if [ -n "${HOSTFILE}" ]; then
+    if [ -n "${HOSTFILE}" ]; then
        j=$(( $i % ${NUMHOSTS} + 1 ))
-  fi
-  ##---- optional display of ranks to process mapping
-  if [ -n "${MAPOPT}" ]; then
+    fi
+    ##---- optional display of ranks to process mapping
+    if [ -n "${MAPOPT}" ]; then
        echo "[rank $i] -> $(echo $hostnames|cut -d' ' -f$j)"
-  fi
+    fi
 
-  if [ -z "$(echo $hostnames|cut -d' ' -f$j)" ]; then
+    if [ -z "$(echo $hostnames|cut -d' ' -f$j)" ]; then
        host="host"$($j)
-  else
-       host="$(echo $hostnames|cut -d' ' -f$j)"
-  fi
-  echo "  <process host=\"${host}\" function=\"$i\"> <!-- function name used only for logging -->" >> ${APPLICATIONTMP}
-  echo "    <argument value=\"1\"/> <!-- instance -->" >> ${APPLICATIONTMP}
-  echo "    <argument value=\"$i\"/> <!-- rank -->" >> ${APPLICATIONTMP}
-  if [ "${EXTOPT}" = "smpi_replay" ]; then
-    if  [ ${NUMTRACES} -gt 1 ]; then
-      echo "    <argument value=\"$(echo $hosttraces|cut -d' ' -f$j)\"/>" >> ${APPLICATIONTMP}
     else
-      echo "    <argument value=\"$(echo $hosttraces|cut -d' ' -f1)\"/>" >> ${APPLICATIONTMP}
+       host="$(echo $hostnames|cut -d' ' -f$j)"
     fi
-  else 
-    for ARG in $PROC_ARGS; do
-       echo "    <argument value=\"${ARG}\"/>" >> ${APPLICATIONTMP}
-    done
-  fi
-  echo "  </process>" >> ${APPLICATIONTMP}
+    echo "  <process host=\"${host}\" function=\"$i\"> <!-- function name used only for logging -->" >> ${APPLICATIONTMP}
+    echo "    <argument value=\"1\"/> <!-- instance -->" >> ${APPLICATIONTMP}
+    echo "    <argument value=\"$i\"/> <!-- rank -->" >> ${APPLICATIONTMP}
+    if [ "${EXTOPT}" = "smpi_replay" ]; then
+        if  [ ${NUMTRACES} -gt 1 ]; then
+            echo "    <argument value=\"$(echo $hosttraces|cut -d' ' -f$j)\"/>" >> ${APPLICATIONTMP}
+        else
+            echo "    <argument value=\"$(echo $hosttraces|cut -d' ' -f1)\"/>" >> ${APPLICATIONTMP}
+        fi
+    else 
+        for ARG in $PROC_ARGS; do
+            echo "    <argument value=\"${ARG}\"/>" >> ${APPLICATIONTMP}
+        done
+    fi
+    echo "  </process>" >> ${APPLICATIONTMP}
 done
 
 cat >> ${APPLICATIONTMP} <<APPLICATIONFOOT
@@ -379,65 +386,65 @@ APPLICATIONFOOT
 
 ##---------------------- SMPI TRACING OPTIONS ---------------------------------
 if [ -n "${TRACE_ACTIVE}" ]; then
-  #define trace filename
-  if [ -n "${TRACE_TI_ACTIVE}" ]; then
-    if [ -z "${TRACE_FILENAME}" ]; then
-      TRACE_FILENAME="smpi_simgrid.txt"
-    fi
-    TRACEOPTIONS="--cfg=tracing:yes --cfg=tracing/filename:${TRACE_FILENAME} --cfg=tracing/smpi:yes --cfg=tracing/smpi/format:TI --cfg=tracing/smpi/computing:yes"
-  else
-    if [ -z "${TRACE_FILENAME}" ]; then
-      TRACE_FILENAME="smpi_simgrid.trace"
+    #define trace filename
+    if [ -n "${TRACE_TI_ACTIVE}" ]; then
+        if [ -z "${TRACE_FILENAME}" ]; then
+            TRACE_FILENAME="smpi_simgrid.txt"
+        fi
+        TRACEOPTIONS="--cfg=tracing:yes --cfg=tracing/filename:${TRACE_FILENAME} --cfg=tracing/smpi:yes --cfg=tracing/smpi/format:TI --cfg=tracing/smpi/computing:yes"
+    else
+        if [ -z "${TRACE_FILENAME}" ]; then
+            TRACE_FILENAME="smpi_simgrid.trace"
+        fi
+        TRACEOPTIONS="--cfg=tracing:yes --cfg=tracing/filename:${TRACE_FILENAME} --cfg=tracing/smpi:yes"
     fi
-    TRACEOPTIONS="--cfg=tracing:yes --cfg=tracing/filename:${TRACE_FILENAME} --cfg=tracing/smpi:yes"
-  fi
 
-  if [ -n "${TRACE_COMMENT}" ]; then
-    TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/comment:${TRACE_COMMENT}"
-  fi
+    if [ -n "${TRACE_COMMENT}" ]; then
+        TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/comment:${TRACE_COMMENT}"
+    fi
 
-  if [ -n "${TRACE_COMMENT_FILE}" ]; then
-    TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/comment_file:${TRACE_COMMENT_FILE}"
-  fi
+    if [ -n "${TRACE_COMMENT_FILE}" ]; then
+        TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/comment_file:${TRACE_COMMENT_FILE}"
+    fi
 
-  if [ -n "${TRACE_GROUPED}" ]; then
-    TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/smpi/group:yes"
-  fi
+    if [ -n "${TRACE_GROUPED}" ]; then
+        TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/smpi/group:yes"
+    fi
 
-  if [ -n "${TRACE_RESOURCE}" ]; then
-    TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes"
-  fi
+    if [ -n "${TRACE_RESOURCE}" ]; then
+        TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes"
+    fi
 
-  if [ -n "${TRACE_VIVA}" ]; then
-    TRACEOPTIONS="${TRACEOPTIONS} --cfg=viva/categorized:smpi_cat.plist --cfg=viva/uncategorized:smpi_uncat.plist"
-  fi
+    if [ -n "${TRACE_VIVA}" ]; then
+        TRACEOPTIONS="${TRACEOPTIONS} --cfg=viva/categorized:smpi_cat.plist --cfg=viva/uncategorized:smpi_uncat.plist"
+    fi
 fi
 ##---------------------- end SMPI TRACING OPTIONS ---------------------------------
 
 export SMPI_GLOBAL_SIZE=${NUMPROCS}
 if [ -n "${KEEP}" ] ; then
-  echo ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP}
-  if [ ${HOSTFILETMP} = 1 ] ; then
-    echo "Generated hostfile ${HOSTFILE} keeped."
-  fi
-  if [ ${UNROLLEDHOSTFILETMP} = 1 ] ; then
-    echo "Generated unrolled hostfile ${UNROLLEDHOSTFILE} keeped." 
-  fi
+    echo ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP}
+    if [ ${HOSTFILETMP} = 1 ] ; then
+        echo "Generated hostfile ${HOSTFILE} keeped."
+    fi
+    if [ ${UNROLLEDHOSTFILETMP} = 1 ] ; then
+        echo "Generated unrolled hostfile ${UNROLLEDHOSTFILE} keeped." 
+    fi
 fi
 ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP}
 status=$?
 
 if [ -z "${KEEP}" ] ; then
-   if [ -z "${PLATFORM}" ]; then
+    if [ -z "${PLATFORM}" ]; then
        rm ${PLATFORMTMP}
-   fi
-   if [ ${HOSTFILETMP} = 1 ] ; then
+    fi
+    if [ ${HOSTFILETMP} = 1 ] ; then
         rm ${HOSTFILE}
-   fi
-   if [ ${UNROLLEDHOSTFILETMP} = 1 ] ; then
+    fi
+    if [ ${UNROLLEDHOSTFILETMP} = 1 ] ; then
         rm ${UNROLLEDHOSTFILE}
-   fi
-   rm ${APPLICATIONTMP}
+    fi
+    rm ${APPLICATIONTMP}
 fi
 
 exit $status
index 6a64cb3..cc093ad 100644 (file)
@@ -25,29 +25,35 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf,
 
 /* This function is a pimple that we ought to fix. But it won't be easy.
  *
- * The surf_solve() function does properly return the set of actions that changed.
- * Instead, each model change a global data, and then the caller of surf_solve must
- * pick into these sets of action_failed and action_done.
+ * The surf_solve() function does properly return the set of actions that
+ * changed. Instead, each model change a global data, and then the caller of
+ * surf_solve must pick into these sets of action_failed and action_done.
  *
- * This was not clean but ok as long as we didn't had to restart the processes when the resource comes back up.
- * We worked by putting sentinel actions on every resources we are interested in,
- * so that surf informs us if/when the corresponding resource fails.
+ * This was not clean but ok as long as we didn't had to restart the processes
+ * when the resource comes back up.
+ * We worked by putting sentinel actions on every resources we are interested
+ * in, so that surf informs us if/when the corresponding resource fails.
  *
- * But this does not work to get Simix informed of when a resource comes back up, and this is where this pimple comes.
- * We have a set of resources that are currently down and for which simix needs to know when it comes back up.
- * And the current function is called *at every simulation step* to sweep over that set, searching for a resource
- * that was turned back up in the meanwhile. This is UGLY and slow.
+ * But this does not work to get Simix informed of when a resource comes back
+ * up, and this is where this pimple comes. We have a set of resources that are
+ * currently down and for which simix needs to know when it comes back up.
+ * And the current function is called *at every simulation step* to sweep over
+ * that set, searching for a resource that was turned back up in the meanwhile.
+ * This is UGLY and slow.
  *
- * The proper solution would be to not rely on globals for the action_failed and action_done swags.
- * They must be passed as parameter by the caller (the handling of these actions in simix may let you
- * think that these two sets can be merged, but their handling in SimDag induce the contrary unless this
- * simdag code can check by itself whether the action is done of failed -- seems very doable, but yet more
- * cleanup to do).
+ * The proper solution would be to not rely on globals for the action_failed and
+ * action_done swags. They must be passed as parameter by the caller (the
+ * handling of these actions in simix may let you think that these two sets can
+ * be merged, but their handling in SimDag induce the contrary unless this
+ * simdag code can check by itself whether the action is done of failed -- seems
+ * very doable, but yet more cleanup to do).
  *
- * Once surf_solve() is passed the set of actions that changed, you want to add a new set of resources back up
- * as parameter to this function. You also want to add a boolean field "restart_watched" to each resource, and
- * make sure that whenever a resource with this field enabled comes back up, it's added to that set so that Simix
- * sees it and react accordingly. This would kill that need for surf to call simix.
+ * Once surf_solve() is passed the set of actions that changed, you want to add
+ * a new set of resources back up as parameter to this function. You also want
+ * to add a boolean field "restart_watched" to each resource, and make sure that
+ * whenever a resource with this field enabled comes back up, it's added to that
+ * set so that Simix sees it and react accordingly. This would kill that need
+ * for surf to call simix.
  *
  */
 
@@ -99,7 +105,8 @@ s_surf_model_description_t surf_plugin_description[] = {
      {NULL, NULL,  NULL}      /* this array must be NULL terminated */
 };
 
-/* Don't forget to update the option description in smx_config when you change this */
+/* Don't forget to update the option description in smx_config when you change
+   this */
 s_surf_model_description_t surf_network_model_description[] = {
   {"LV08",
    "Realistic network analytic model (slow-start modeled by multiplying latency by 10.4, bandwidth by .92; bottleneck sharing uses a payload of S=8775 for evaluating RTT). ",
index 4270a6e..eef00fb 100644 (file)
@@ -627,7 +627,6 @@ public:
 
   /**
    * @brief Get the state set in which the action is
-   * @details [TODO]
    *
    * @return The state set in which the action is
    */
@@ -650,10 +649,9 @@ private:
 
   /**
    * @brief Share the resources to the actions
-   * @details [TODO]
    *
    * @param now [TODO]
-   * @return in how much time the next action may terminatedescription]
+   * @return In how much time the next action may terminate
    */
   double shareResources(double now);