From: Nicolas Bonichon Date: Thu, 25 Apr 2013 15:35:23 +0000 (+0200) Subject: Merge branch 'bittorrent' X-Git-Tag: v3_9_90~412 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4bb60fefa54ed1665d3452e2a748d26904b46f37?hp=d55f9548c659a1e31267748bde0f8bc9846cd1d4 Merge branch 'bittorrent' --- diff --git a/README.coding b/README.coding index 4183390cc8..35c9a55726 100644 --- a/README.coding +++ b/README.coding @@ -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 diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index a5bec10a88..00ea0f3d92 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -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}) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 4b9d2125e2..104b4ee2dc 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -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 ################################################### diff --git a/doc/doxygen/options.doc b/doc/doxygen/options.doc index 02f6728456..5f9a58ff93 100644 --- a/doc/doxygen/options.doc +++ b/doc/doxygen/options.doc @@ -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 diff --git a/src/instr/instr_config.c b/src/instr/instr_config.c index f9b94801b5..7d61fef6da 100644 --- a/src/instr/instr_config.c +++ b/src/instr/instr_config.c @@ -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, diff --git a/src/instr/instr_private.h b/src/instr/instr_private.h index 3598c7c1ca..24f2af342d 100644 --- a/src/instr/instr_private.h +++ b/src/instr/instr_private.h @@ -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); diff --git a/src/smpi/colls/allgather-2dmesh.c b/src/smpi/colls/allgather-2dmesh.c index b5f50420e0..4e3a9c77cf 100644 --- a/src/smpi/colls/allgather-2dmesh.c +++ b/src/smpi/colls/allgather-2dmesh.c @@ -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; diff --git a/src/smpi/colls/allgatherv-GB.c b/src/smpi/colls/allgatherv-GB.c index 5c643faeae..2a60a47c09 100644 --- a/src/smpi/colls/allgatherv-GB.c +++ b/src/smpi/colls/allgatherv-GB.c @@ -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; } diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index e290d2074c..c66761769b 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -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 /.*.*/' ${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 diff --git a/src/surf/instr_routing.c b/src/surf/instr_routing.c index c0510fb849..8aa9377763 100644 --- a/src/surf/instr_routing.c +++ b/src/surf/instr_routing.c @@ -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); diff --git a/tools/check_dist_archive b/tools/check_dist_archive index 7937222119..53b1d1f4af 100755 --- a/tools/check_dist_archive +++ b/tools/check_dist_archive @@ -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 <