Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'bittorrent'
authorNicolas Bonichon <bonichon@labri.fr>
Thu, 25 Apr 2013 15:35:23 +0000 (17:35 +0200)
committerNicolas Bonichon <bonichon@labri.fr>
Thu, 25 Apr 2013 15:35:23 +0000 (17:35 +0200)
12 files changed:
README.coding
buildtools/Cmake/CompleteInFiles.cmake
doc/Doxyfile.in
doc/doxygen/options.doc
src/instr/instr_config.c
src/instr/instr_private.h
src/smpi/colls/allgather-2dmesh.c
src/smpi/colls/allgatherv-GB.c
src/smpi/smpirun.in
src/surf/instr_routing.c
tools/check_dist_archive
tools/check_dist_archive.exclude

index 4183390..35c9a55 100644 (file)
@@ -187,6 +187,10 @@ investigating the portability of the thing to windows.
 * Your commit message should follow the git habits, explained eg here:
   http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
 
+* When you add/remove files, and/or make changes in the lists of files to build,
+  please check that "make distcheck" still succeeds.  This is needed to ensure
+  that the generated archive is consistent.
+
 * If you want to debug memory allocation problems, here are a few hints:
   - disable compiler optimizations, to have better backtraces;
   - disable the mallocators, or it will be hard to match malloc's with
index a5bec10..00ea0f3 100644 (file)
@@ -771,6 +771,7 @@ configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid_config.h.in"                "${CMAKE_
 
 set(top_srcdir "${CMAKE_HOME_DIRECTORY}")
 set(srcdir "${CMAKE_HOME_DIRECTORY}/src")
+set(bindir "${CMAKE_BINARY_DIR}")
 
 ### Script used when simgrid is installed
 set(exec_prefix ${CMAKE_INSTALL_PREFIX})
index 4b9d212..104b4ee 100644 (file)
@@ -131,7 +131,7 @@ FULL_PATH_NAMES        = YES
 # If left blank the directory from which doxygen is run is used as the
 # path to strip.
 
-STRIP_FROM_PATH        = @srcdir@
+STRIP_FROM_PATH        = @top_srcdir@
 
 # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
 # the path mentioned in the documentation of a class, which tells
@@ -690,6 +690,7 @@ INPUT                  = doxygen/index.doc \
                            index-API.doc \
                          @top_srcdir@/doc/doxygen/logcategories.doc \
                          @top_srcdir@/src/instr/ \
+                         @bindir@/include \
                          @top_srcdir@/include/ \
                          @top_srcdir@/include/msg \
                          @top_srcdir@/include/xbt \
@@ -700,7 +701,8 @@ INPUT                  = doxygen/index.doc \
                          @top_srcdir@/src/surf/ \
                          @top_srcdir@/src/msg/ \
                          @top_srcdir@/src/simdag \
-                         @top_srcdir@/src/simix
+                         @top_srcdir@/src/simix \
+                         @bindir@/src
 
 
 ###################################################
index 02f6728..5f9a58f 100644 (file)
@@ -173,7 +173,7 @@ price of a reduced numerical precision.
 By default, Surf computes the analytical models sequentially to share their
 resources and update their actions. It is possible to run them in parallel,
 using the \b surf/nthreads item (default value: 1). If you use a
-negative value, the amount of available cores is automatically
+negative or null value, the amount of available cores is automatically
 detected  and used instead.
 
 Depending on the workload of the models and their complexity, you may get a
@@ -401,8 +401,8 @@ If you are using the \c ucontext or \c raw context factories, you can
 request to execute the user code in parallel. Several threads are
 launched, each of them handling as much user contexts at each run. To
 actiave this, set the \b contexts/nthreads item to the amount of
-cores that you have in your computer (or -1 to have the amount of cores
-auto-detected).
+cores that you have in your computer (or lower than 1 to have 
+the amount of cores auto-detected).
 
 Even if you asked several worker threads using the previous option,
 you can request to start the parallel execution (and pay the
index f9b9480..7d61fef 100644 (file)
@@ -33,6 +33,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_config, instr, "Configuration");
 #define OPT_TRACING_COMMENT_FILE  "tracing/comment_file"
 #define OPT_VIVA_UNCAT_CONF      "viva/uncategorized"
 #define OPT_VIVA_CAT_CONF        "viva/categorized"
+#define OPT_TRACING_DISABLE_LINK        "tracing/disable_link"
+#define OPT_TRACING_DISABLE_POWER       "tracing/disable_power"
 
 static int trace_enabled;
 static int trace_platform;
@@ -49,6 +51,8 @@ static int trace_buffer;
 static int trace_onelink_only;
 static int trace_disable_destroy;
 static int trace_basic;
+static int trace_disable_link;
+static int trace_disable_power;
 
 static int trace_configured = 0;
 static int trace_active = 0;
@@ -72,6 +76,8 @@ static void TRACE_getopts(void)
   trace_onelink_only = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_ONELINK_ONLY);
   trace_disable_destroy = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_DISABLE_DESTROY);
   trace_basic = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_BASIC);
+  trace_disable_link = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_DISABLE_LINK);
+  trace_disable_power = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_DISABLE_POWER);
 }
 
 static xbt_dynar_t TRACE_start_functions = NULL;
@@ -247,6 +253,15 @@ int TRACE_msg_vm_is_enabled(void)
   return trace_msg_vm_enabled && TRACE_is_enabled();
 }
 
+int TRACE_disable_link(void)
+{
+  return trace_disable_link && TRACE_is_enabled();
+}
+
+int TRACE_disable_power(void)
+{
+  return trace_disable_power && TRACE_is_enabled();
+}
 
 int TRACE_buffer (void)
 {
@@ -379,6 +394,21 @@ void TRACE_global_init(int *argc, char **argv)
                    xbt_cfgelm_int, &default_tracing_msg_vm, 0, 1,
                    NULL, NULL);
 
+  /* disable tracing link */
+  int default_tracing_disable_link = 0;
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_DISABLE_LINK,
+                   "Do not trace link bandwidth and latency.",
+                   xbt_cfgelm_int, &default_tracing_disable_link, 0, 1,
+                   NULL, NULL);
+
+  /* disable tracing link */
+  int default_tracing_disable_power = 0;
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_DISABLE_POWER,
+                   "Do not trace host power.",
+                   xbt_cfgelm_int, &default_tracing_disable_power, 0, 1,
+                   NULL, NULL);
+
+
   /* tracing buffer */
   int default_buffer = 1;
   xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_BUFFER,
index 3598c7c..24f2af3 100644 (file)
@@ -142,6 +142,8 @@ int TRACE_uncategorized (void);
 int TRACE_msg_process_is_enabled(void);
 int TRACE_msg_vm_is_enabled(void);
 int TRACE_buffer (void);
+int TRACE_disable_link(void);
+int TRACE_disable_power(void);
 int TRACE_onelink_only (void);
 int TRACE_disable_destroy (void);
 int TRACE_basic (void);
index b5f5042..4e3a9c7 100644 (file)
@@ -119,7 +119,9 @@ smpi_coll_tuned_allgather_2dmesh(void *send_buff, int send_count, MPI_Datatype
 
   block_size = extent * send_count;
 
-  is_2dmesh(num_procs, &X, &Y);
+  if (!is_2dmesh(num_procs, &X, &Y))
+    return MPI_ERR_COMM;
+
   my_row_base = (rank / Y) * Y;
   my_col_base = rank % Y;
 
index 5c643fa..2a60a47 100644 (file)
@@ -12,9 +12,10 @@ int smpi_coll_tuned_allgatherv_GB(void *send_buff, int send_count,
   num_procs = smpi_comm_size(comm);
   for (i = 0; i < num_procs; i++) {
     current = recv_disps[i] + recv_counts[i];
-    if (current > max) max = current;
+    if (current > max)
+      max = current;
   }
-  mpi_coll_bcast_fun(recv_buff, current, recv_type, 0, comm);
+  mpi_coll_bcast_fun(recv_buff, max, recv_type, 0, comm);
 
   return MPI_SUCCESS;
 }
index e290d20..c667617 100755 (executable)
@@ -190,12 +190,18 @@ if [ -z "${EXEC}" ] ; then
     exit 1
 fi
 
-if [ -z "${HOSTFILE}" ] ; then
-    echo "No hostfile specified."
+if [ -z "${HOSTFILE}" ] && [ -z "${PLATFORM}" ] ; then
+    echo "No hostfile nor platform specified."
     usage
     exit 1
 fi
 
+if [ -z "${HOSTFILE}" ] ; then
+    HOSTFILETMP=1
+    HOSTFILE="$(mktemp tmphostXXXXXX)"
+    perl -ne 'print "$1\n" if /.*<host.*?id="(.*?)".*?\/>.*/' ${PLATFORM} > ${HOSTFILE}
+fi
+
 # Don't use wc -l to compute it to avoid issues with trailing \n at EOF
 hostfile_procs=`grep -c "[a-zA-Z0-9]" $HOSTFILE`
 
@@ -364,6 +370,9 @@ fi
 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
 fi
 ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP}
 status=$?
@@ -372,6 +381,9 @@ if [ -z "${KEEP}" ] ; then
    if [ -z "${PLATFORM}" ]; then
        rm ${PLATFORMTMP}
    fi
+   if [ ${HOSTFILETMP} == 1 ] ; then
+        rm ${HOSTFILE}
+   fi
    rm ${APPLICATIONTMP}
 fi
 
index c0510fb..8aa9377 100644 (file)
@@ -235,7 +235,7 @@ static void instr_routing_parse_start_link (sg_platf_link_cbarg_t link)
 
     container_t new = PJ_container_new (link_name, INSTR_LINK, father);
 
-    if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()){
+    if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_link())) {
       type_t bandwidth = PJ_type_get_or_null ("bandwidth", new->type);
       if (bandwidth == NULL){
         bandwidth = PJ_type_variable_new ("bandwidth", NULL, new->type);
@@ -263,7 +263,7 @@ static void instr_routing_parse_start_host (sg_platf_host_cbarg_t host)
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
   container_t new = PJ_container_new (host->id, INSTR_HOST, father);
 
-  if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
+  if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_power())) {
     type_t power = PJ_type_get_or_null ("power", new->type);
     if (power == NULL){
       power = PJ_type_variable_new ("power", NULL, new->type);
index 7937222..53b1d1f 100755 (executable)
@@ -86,7 +86,13 @@ diffcmd() {
         echo "The archive looks good."
     else
         status=1
-        echo "Some files are missing and/or unexpected in the archive."
+        cat <<EOF
+ERROR: Some files are missing and/or unexpected in the archive.
+* lines beginning with '-' give files that are unexpected in the archive
+* lines beginning with '+' give files that are missing from the archive
+Please fix CMake files (e.g. "buildtools/Cmake/DefinePackages.cmake"),
+and/or "tools/check_dist_archive.exclude".
+EOF
         diff -u "$fa" "$fb"
     fi
 }
index 70ec40a..61a58e5 100644 (file)
 + src/simix/simix_network\.tla
 
 + src/smpi/BUGS
-+ src/smpi/colls/allgather-2dmesh\.c
-+ src/smpi/colls/allgather-3dmesh\.c
-+ src/smpi/colls/allgather-bruck\.c
-+ src/smpi/colls/allreduce-rab-rdb\.c
 + src/smpi/colls/allreduce-rab-reduce-scatter\.c
-+ src/smpi/colls/allreduce-smp-binomial-pipeline\.c
 + src/smpi/colls/alltoall-bruck\.c
 + src/smpi/fixsrc\.pl
 + src/smpi/myprintloc\.cocci