From: Arnaud Giersch Date: Fri, 23 Nov 2012 10:24:55 +0000 (+0100) Subject: Merge branch 'killgraskill' X-Git-Tag: v3_9_rc1~91^2~47 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8340b9ca34a27bc19136607105d3ec1fe15c91db?hp=7dede3e2fa9797c363b2411101ce3edc50ee66d0 Merge branch 'killgraskill' --- diff --git a/src/smpi/smpi_replay.c b/src/smpi/smpi_replay.c index dc35a680d3..7214b99498 100644 --- a/src/smpi/smpi_replay.c +++ b/src/smpi/smpi_replay.c @@ -70,8 +70,11 @@ static void action_comm_size(const char *const *action) communicator_size = parse_double(action[2]); - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } @@ -80,8 +83,11 @@ static void action_compute(const char *const *action) double clock = smpi_process_simulated_elapsed(); smpi_execute_flops(parse_double(action[2])); - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } static void action_send(const char *const *action) @@ -98,9 +104,14 @@ static void action_send(const char *const *action) #endif smpi_mpi_send(NULL, size, MPI_BYTE, to , 0, MPI_COMM_WORLD); - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); -#ifdef HAVE_TRACING + + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } + + #ifdef HAVE_TRACING TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__); TRACE_smpi_computing_in(rank); #endif @@ -133,8 +144,11 @@ static void action_Isend(const char *const *action) xbt_dynar_push(globals->isends,&request); //TODO do the asynchronous cleanup - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } static void action_recv(const char *const *action) { @@ -158,8 +172,11 @@ static void action_recv(const char *const *action) { TRACE_smpi_computing_in(rank); #endif - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } static void action_Irecv(const char *const *action) @@ -185,8 +202,11 @@ static void action_Irecv(const char *const *action) xbt_dynar_push(globals->irecvs,&request); //TODO do the asynchronous cleanup - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } static void action_wait(const char *const *action){ @@ -221,8 +241,11 @@ static void action_wait(const char *const *action){ TRACE_smpi_computing_in(rank); #endif - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } static void action_barrier(const char *const *action){ @@ -238,8 +261,11 @@ static void action_barrier(const char *const *action){ TRACE_smpi_computing_in(rank); #endif - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } static void action_bcast(const char *const *action) @@ -259,8 +285,11 @@ static void action_bcast(const char *const *action) TRACE_smpi_computing_in(rank); #endif - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } static void action_reduce(const char *const *action) @@ -279,8 +308,11 @@ static void action_reduce(const char *const *action) TRACE_smpi_computing_in(rank); #endif - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } static void action_allReduce(const char *const *action) { @@ -299,31 +331,38 @@ static void action_allReduce(const char *const *action) { TRACE_smpi_collective_out(rank, -1, __FUNCTION__); TRACE_smpi_computing_in(rank); #endif - XBT_VERB("%s %f", xbt_str_join_array(action, " "), - smpi_process_simulated_elapsed()-clock); + + if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){ + char *name = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock); + free(name); + } } void smpi_replay_init(int *argc, char***argv){ PMPI_Init(argc, argv); - _xbt_replay_action_init(); - - xbt_replay_action_register("init", action_init); - xbt_replay_action_register("finalize", action_finalize); - xbt_replay_action_register("comm_size",action_comm_size); - xbt_replay_action_register("send", action_send); - xbt_replay_action_register("Isend", action_Isend); - xbt_replay_action_register("recv", action_recv); - xbt_replay_action_register("Irecv", action_Irecv); - xbt_replay_action_register("wait", action_wait); - xbt_replay_action_register("barrier", action_barrier); - xbt_replay_action_register("bcast", action_bcast); - xbt_replay_action_register("reduce", action_reduce); - xbt_replay_action_register("allReduce",action_allReduce); - xbt_replay_action_register("compute", action_compute); + if (!smpi_process_index()){ + _xbt_replay_action_init(); + xbt_replay_action_register("init", action_init); + xbt_replay_action_register("finalize", action_finalize); + xbt_replay_action_register("comm_size",action_comm_size); + xbt_replay_action_register("send", action_send); + xbt_replay_action_register("Isend", action_Isend); + xbt_replay_action_register("recv", action_recv); + xbt_replay_action_register("Irecv", action_Irecv); + xbt_replay_action_register("wait", action_wait); + xbt_replay_action_register("barrier", action_barrier); + xbt_replay_action_register("bcast", action_bcast); + xbt_replay_action_register("reduce", action_reduce); + xbt_replay_action_register("allReduce",action_allReduce); + xbt_replay_action_register("compute", action_compute); + } xbt_replay_action_runner(*argc, *argv); } int smpi_replay_finalize(){ + if(!smpi_process_index()) + _xbt_replay_action_exit(); return PMPI_Finalize(); } diff --git a/src/xbt/swag.c b/src/xbt/swag.c index dcee5efcbc..1a75c7f93d 100644 --- a/src/xbt/swag.c +++ b/src/xbt/swag.c @@ -218,8 +218,9 @@ XBT_TEST_UNIT("basic", test_swag_basic, "Basic usage") xbt_swag_insert(obj2, setA); xbt_swag_insert(obj2, setB); - xbt_swag_remove(obj1, setB); - /* xbt_swag_remove(obj2, setB); */ + xbt_test_assert(xbt_swag_remove(NULL, setB) == NULL); + xbt_test_assert(xbt_swag_remove(obj1, setB) == obj1); + /* xbt_test_assert(xbt_swag_remove(obj2, setB) == obj2); */ xbt_test_add("Traverse set A"); xbt_swag_foreach(obj, setA) { diff --git a/src/xbt/xbt_str.c b/src/xbt/xbt_str.c index a8d06e7bc1..d69813304a 100644 --- a/src/xbt/xbt_str.c +++ b/src/xbt/xbt_str.c @@ -345,7 +345,7 @@ xbt_dynar_t xbt_str_split_quoted_in_place(char *s) { beg = s; - /* do not trim leading spaces: caller responsability to clean his cruft */ + /* do not trim leading spaces: caller responsibility to clean his cruft */ end = beg; while (!done) { diff --git a/teshsuite/smpi/mpich-test/coll/CMakeLists.txt b/teshsuite/smpi/mpich-test/coll/CMakeLists.txt index 6661479ffa..7137203026 100644 --- a/teshsuite/smpi/mpich-test/coll/CMakeLists.txt +++ b/teshsuite/smpi/mpich-test/coll/CMakeLists.txt @@ -121,7 +121,6 @@ endif() set(tesh_files ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/coll.tesh PARENT_SCOPE ) set(xml_files @@ -130,7 +129,7 @@ set(xml_files ) set(examples_src ${examples_src} - ${CMAKE_CURRENT_SOURCE_DIR}/coll1 .c + ${CMAKE_CURRENT_SOURCE_DIR}/coll1.c ${CMAKE_CURRENT_SOURCE_DIR}/coll2.c ${CMAKE_CURRENT_SOURCE_DIR}/coll3.c ${CMAKE_CURRENT_SOURCE_DIR}/coll4.c @@ -141,7 +140,7 @@ set(examples_src ${CMAKE_CURRENT_SOURCE_DIR}/coll9.c ${CMAKE_CURRENT_SOURCE_DIR}/coll10.c ${CMAKE_CURRENT_SOURCE_DIR}/coll11.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll12 .c + ${CMAKE_CURRENT_SOURCE_DIR}/coll12.c ${CMAKE_CURRENT_SOURCE_DIR}/coll13.c ${CMAKE_CURRENT_SOURCE_DIR}/allredmany.c ${CMAKE_CURRENT_SOURCE_DIR}/bcastbug.c @@ -171,7 +170,6 @@ set(examples_src ) set(bin_files ${bin_files} - ${CMAKE_CURRENT_SOURCE_DIR}/../hostfile PARENT_SCOPE ) set(txt_files diff --git a/teshsuite/smpi/mpich-test/context/CMakeLists.txt b/teshsuite/smpi/mpich-test/context/CMakeLists.txt index db189a0dff..609780277a 100644 --- a/teshsuite/smpi/mpich-test/context/CMakeLists.txt +++ b/teshsuite/smpi/mpich-test/context/CMakeLists.txt @@ -59,7 +59,6 @@ endif() set(tesh_files ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/context.tesh PARENT_SCOPE ) set(xml_files @@ -85,7 +84,6 @@ set(examples_src ) set(bin_files ${bin_files} - ${CMAKE_CURRENT_SOURCE_DIR}/../hostfile PARENT_SCOPE ) set(txt_files diff --git a/teshsuite/smpi/mpich-test/env/CMakeLists.txt b/teshsuite/smpi/mpich-test/env/CMakeLists.txt index 4395eb63e5..088e8f3ba6 100644 --- a/teshsuite/smpi/mpich-test/env/CMakeLists.txt +++ b/teshsuite/smpi/mpich-test/env/CMakeLists.txt @@ -61,7 +61,6 @@ endif() set(tesh_files ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/env.tesh PARENT_SCOPE ) set(xml_files @@ -85,7 +84,6 @@ set(examples_src ) set(bin_files ${bin_files} - ${CMAKE_CURRENT_SOURCE_DIR}/../hostfile PARENT_SCOPE ) set(txt_files diff --git a/teshsuite/smpi/mpich-test/profile/CMakeLists.txt b/teshsuite/smpi/mpich-test/profile/CMakeLists.txt index 4170b1b65a..5d904ae1d2 100644 --- a/teshsuite/smpi/mpich-test/profile/CMakeLists.txt +++ b/teshsuite/smpi/mpich-test/profile/CMakeLists.txt @@ -21,7 +21,6 @@ endif() set(tesh_files ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/profile.tesh PARENT_SCOPE ) set(xml_files @@ -36,7 +35,6 @@ set(examples_src ) set(bin_files ${bin_files} - ${CMAKE_CURRENT_SOURCE_DIR}/../hostfile PARENT_SCOPE ) set(txt_files diff --git a/teshsuite/smpi/mpich-test/pt2pt/CMakeLists.txt b/teshsuite/smpi/mpich-test/pt2pt/CMakeLists.txt index 93e347a366..9570be955b 100644 --- a/teshsuite/smpi/mpich-test/pt2pt/CMakeLists.txt +++ b/teshsuite/smpi/mpich-test/pt2pt/CMakeLists.txt @@ -289,7 +289,6 @@ endif() set(tesh_files ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/coll.tesh PARENT_SCOPE ) set(xml_files @@ -356,7 +355,7 @@ set(examples_src ${CMAKE_CURRENT_SOURCE_DIR}/order.c ${CMAKE_CURRENT_SOURCE_DIR}/pack.c ${CMAKE_CURRENT_SOURCE_DIR}/probe1.c - ${CMAKE_CURRENT_SOURCE_DIR}/testtest1 .c + ${CMAKE_CURRENT_SOURCE_DIR}/testtest1.c ${CMAKE_CURRENT_SOURCE_DIR}/hvectest.c ${CMAKE_CURRENT_SOURCE_DIR}/hvectest2.c ${CMAKE_CURRENT_SOURCE_DIR}/hvec.c @@ -394,7 +393,6 @@ set(examples_src ) set(bin_files ${bin_files} - ${CMAKE_CURRENT_SOURCE_DIR}/../hostfile PARENT_SCOPE ) set(txt_files