Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 15 Nov 2016 22:35:26 +0000 (23:35 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 15 Nov 2016 22:35:26 +0000 (23:35 +0100)
doc/doxygen/getting_started.doc
src/simgrid/sg_config.cpp
src/smpi/smpi_base.cpp
src/smpi/smpi_bench.cpp
src/smpi/smpirun.in

index 1426d49..4ef1c69 100644 (file)
@@ -6,31 +6,31 @@ SimGrid is a framework to simulate distributed computer systems.
 
 It can be used to either assess abstract algorithms, or to profile and
 debug real distributed applications.  SimGrid enables studies in the
-domains of (data-)Grids, Clusters, IaaS Clouds, High Performance
-Computing, Volunteer Computing and Peer-to-Peer.
+domains of (data-)Grids, IaaS Clouds, Clusters, High Performance
+Computing, Volunteer Computing and Peer-to-Peer systems.
 
-Technically speaking, SimGrid is a library. It is not a graphical 
-interface nor a command-line simulator running user scripts. You
-interact with SimGrid by writting programs with the exposed functions
-to build your own simulator.
+Technically speaking, SimGrid is a library. It is neither a graphical
+interface nor a command-line simulator running user scripts. The
+interaction with SimGrid is done by writing programs with the exposed
+functions to build your own simulator.
 
-SimGrid have many features, many options and many possibilities. The
+SimGrid offers many features, many options and many possibilities. The
 documentation aims at smoothing the learning curve. But nothing's
 perfect, and this documentation is really no exception here. Please
-help us improving it by reporting the issues that you see and
+help us improving it by reporting any issue that you see and
 proposing the content that is still missing.
 
-SimGrid is a Free Software distributed under the LGPL licence. It
-means that you are welcome to use it as you wish, or even to modify
-and distribute your version (as long as your version is as free as
-ours). It also means that SimGrid is developed by a vivid community of
-users and developers. We hope that you will come and join us!
+SimGrid is a Free Software distributed under the LGPL licence. You are
+thus welcome to use it as you wish, or even to modify and distribute
+your version (as long as your version is as free as ours). It also
+means that SimGrid is developed by a vivid community of users and
+developers. We hope that you will come and join us!
 
 SimGrid is the result of over 15 years of research from several
-groups, both in France and in the USA. It benefited of many fundings
+groups, both in France and in the USA. It benefited of many funding
 from various research instances, including the ANR, Inria, CNRS,
 University of Lorraine, University of Hawai'i at Manoa, ENS Rennes and
-many others. Many thanks to our generous donators!
+many others. Many thanks to our generous sponsors!
 
 @section starting_components Typical Study based on SimGrid
 
index a56881a..f21667e 100644 (file)
@@ -595,6 +595,8 @@ void sg_config_init(int *argc, char **argv)
     xbt_cfg_register_boolean("smpi/privatize-global-variables", "no", nullptr, "Whether we should privatize global variable at runtime.");
     xbt_cfg_register_alias("smpi/privatize-global-variables", "smpi/privatize_global_variables");
 
+    xbt_cfg_register_boolean("smpi/grow-injected-times", "yes", nullptr, "Whether we want to make the injected time in MPI_Iprobe and MPI_Test grow, to allow faster simulation. This can make simulation less precise, though.");
+
 #if HAVE_PAPI
     xbt_cfg_register_string("smpi/papi-events", nullptr, nullptr, "This switch enables tracking the specified counters with PAPI");
 #endif
index 453d854..b7af999 100644 (file)
@@ -686,7 +686,7 @@ int smpi_mpi_test(MPI_Request * request, MPI_Status * status) {
       nsleeps=1;//reset the number of sleeps we will do next time
       if (*request != MPI_REQUEST_NULL && ((*request)->flags & PERSISTENT)==0)
       *request = MPI_REQUEST_NULL;
-    }else{
+    } else if (xbt_cfg_get_boolean("smpi/grow-injected-times")){
       nsleeps++;
     }
   }
@@ -812,7 +812,8 @@ void smpi_mpi_iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
   }
   else {
     *flag = 0;
-    nsleeps++;
+    if (xbt_cfg_get_boolean("smpi/grow-injected-times"))
+      nsleeps++;
   }
   smpi_mpi_request_free(&request);
 
index c6af124..50cd907 100644 (file)
@@ -175,7 +175,7 @@ static void* shm_map(int fd, size_t size, shared_data_key_type* data) {
 
   mem = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
   if(mem == MAP_FAILED) {
-    xbt_die("Could not map fd %d with size %zu: %s", fd, size, strerror(errno));
+    xbt_die("Could not map fd %d with size %zu: %s.\n If you are running a lot of processes, you may be exceeding the amount of mappings allowed per process. \n On linux systems, this value can be set by using sudo sysctl -w vm.max_map_count=newvalue .\n Default value is 65536", fd, size, strerror(errno));
   }
   snprintf(loc, PTR_STRLEN, "%p", mem);
   meta.size = size;
index 80611b0..ad8aabe 100755 (executable)
@@ -68,6 +68,8 @@ EXTOPT=""
 WRAPPER=""
 HOSTFILE=""
 HOSTFILETMP=0
+MAPOPT=0
+REPLAY=0
 
 unset pid
 
@@ -166,7 +168,7 @@ while true; do
            shift 1
            ;;
         "-map")
-           MAPOPT="true"
+           MAPOPT=1
             shift 1
             ;;
         "-trace")
@@ -382,6 +384,7 @@ if [ "${EXTOPT}" = "smpi_replay" ]; then
     if [ -n "${APP_TRACES}" ] && [ -f "${APP_TRACES}" ]; then
         hosttraces=$(cat ${APP_TRACES} | tr '\n\r' '  ' )
         NUMTRACES=$(cat ${APP_TRACES} | wc -l)
+        REPLAY=1
     else
         printf "File not found: %s\n" "${APP_TRACES:-\${APP_TRACES\}}" >&2
         exit 1
@@ -406,35 +409,36 @@ else
     done
 fi
 
+set -- $hostnames
+
 ##---- generate <process> tags------------------------------
+#prepare arguments at once
+for ARG in $PROC_ARGS; do
+  ARGS="$ARGS""<argument value=\"${ARG}\"/>
+"
+done
+
 for i in ${SEQ}
 do
-    if [ -n "${HOSTFILE}" ]; then
-       j=$(( $i % ${NUMHOSTS} + 1 ))
-    fi
+    j=$(( $i % ${NUMHOSTS} + 1 ))
+    host=$(eval "echo \${$j}")
+
     ##---- optional display of ranks to process mapping
-    if [ -n "${MAPOPT}" ]; then
-       echo "[rank $i] -> $(echo $hostnames|cut -d' ' -f$j)"
+    if [ ${MAPOPT} = 1 ]; then
+      echo "[rank $i] -> $host"
     fi
 
-    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
+    echo "  <process host=\"${host}\" function=\"$i\"> <!-- function name used only for logging -->
+    <argument value=\"1\"/> <!-- instance -->
+    <argument value=\"$i\"/> <!-- rank -->" >> ${APPLICATIONTMP}
+    if [ ${REPLAY} = 1 ]; 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
+    echo ${ARGS} >> ${APPLICATIONTMP}
     fi
     echo "  </process>" >> ${APPLICATIONTMP}
 done