ADD_TEST(tesh-self-bg-set-signal ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" bg-set-signal.tesh)
ADD_TEST(tesh-self-background ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" background.tesh)
- # BEGIN TESH TESTS
-
# test for code coverage
ADD_TEST(help ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help)
ADD_TEST(help-models ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-models)
+ # BEGIN TESH TESTS
+
# teshsuite/xbt
ADD_TEST(xbt-log-large ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_large_test.tesh)
ADD_TEST(xbt-log-parallel ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/parallel_log_crashtest.tesh)
endif()
- IF(enable_debug) # these tests need the assertion mechanism
+ IF(enable_debug AND NOT MEMCHECK) # these tests need the assertion mechanism
ADD_TEST(tesh-simdag-parser-bogus-symmetric ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms two_hosts_asymetric.tesh)
ENDIF()
endif()
IF(HAVE_TRACING)
- ADD_TEST(tracing-help ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-tracing)
+ IF(NOT MEMCHECK)
+ ADD_TEST(tracing-help ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-tracing)
+ ENDIF()
ADD_TEST(tracing-ms ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh)
ADD_TEST(tracing-simdag ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_tracing.tesh)
ADD_TEST(tracing-trace_platform ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/trace_platform.tesh)
ADD_TEST(smpi-struct-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
ADD_TEST(smpi-pt2pt-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
ADD_TEST(smpi-compute-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/compute.tesh)
- ADD_TEST(smpi-shared-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/shared.tesh)
+ if (NOT WIN32)
+ ADD_TEST(smpi-shared-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/shared.tesh)
+ endif()
if(CONTEXT_UCONTEXT)
ADD_TEST(smpi-bcast-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast.tesh)
ADD_TEST(smpi-reduce-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/reduce.tesh)
ADD_TEST(smpi-struct-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
ADD_TEST(smpi-pt2pt-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
ADD_TEST(smpi-compute-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/compute.tesh)
- ADD_TEST(smpi-shared-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/shared.tesh)
+ if (NOT WIN32)
+ ADD_TEST(smpi-shared-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/shared.tesh)
+ endif()
endif()
if(HAVE_RAWCTX)
ADD_TEST(smpi-bcast-raw ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast.tesh)
ADD_TEST(smpi-struct-raw ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
ADD_TEST(smpi-pt2pt-raw ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
ADD_TEST(smpi-compute-raw ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/compute.tesh)
- ADD_TEST(smpi-shared-raw ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/shared.tesh)
+ if (NOT WIN32)
+ ADD_TEST(smpi-shared-raw ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/shared.tesh)
+ endif()
endif()
if(HAVE_TRACING)
ADD_TEST(smpi-tracing-ptp ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/tracing/smpi_traced.tesh)
if(enable_compile_optimizations)
set(optCFLAGS "-O3 -finline-functions -funroll-loops -fno-strict-aliasing ")
- if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
- set(optCFLAGS "${optCFLAGS}-flto ")
+ if(WIN32)
+ if (COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.7")
+ # On windows, we need 4.8 or higher to enable lto because of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50293
+ set(optCFLAGS "${optCFLAGS} -flto ")
+ endif()
+ else()
+ # On non-windows, 4.6 is enough for that
+ if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
+ set(optCFLAGS "${optCFLAGS} -flto ")
+ endif()
endif()
else()
set(optCFLAGS "-O0 ")
while ( defined( $line = <MAKETEST> ) ) {
chomp $line;
if ( $line =~ /BEGIN TESH TESTS/ ) {
+ print "SET( MEMCHECK 1) \n";
$dump = 1;
next;
}
int CS_used = 0;
msg_task_t task = NULL, answer = NULL;
xbt_dynar_t requests = xbt_dynar_new(sizeof(char *), NULL);
+ char *req;
while(1){
MSG_task_receive(&task, "coordinator");
const char *kind = MSG_task_get_name(task);
if (!strcmp(kind, "request")) {
- char *req = MSG_task_get_data(task);
+ req = MSG_task_get_data(task);
if (CS_used) {
XBT_INFO("CS already used. Queue the request.");
xbt_dynar_push(requests, &req);
} else {
if (!xbt_dynar_is_empty(requests)) {
XBT_INFO("CS release. Grant to queued requests (queue size: %lu)", xbt_dynar_length(requests));
- char *req;
xbt_dynar_pop(requests, &req);
if(strcmp(req, "1") != 0){
MSG_task_send(MSG_task_create("grant", 0, 1000, NULL), req);
MSG_task_destroy(task);
task = NULL;
kind = NULL;
+ req = NULL;
}
return 0;
#! ./tesh
! expect signal SIGABRT
-! timeout 20
+! timeout 60
$ ${bindir:=.}/bugged1_liveness ${bindir:=.}/../msg_platform.xml ${bindir:=.}/deploy_bugged1_liveness_visited.xml --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext --cfg=model-check/visited:100
> [ 0.000000] (0:@) Configuration change: Set 'model-check' to '1'
> [ 0.000000] (0:@) Configuration change: Set 'model-check/visited' to '100'
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
-> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
-> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
-> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
-> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
-> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
-> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
-> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (2:client@Boivin) Ask the request
+> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
-> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
-> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
-> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
-> [ 0.000000] (3:client@Fafard) Propositions changed : r=1, cs=0
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
+> [ 0.000000] (3:client@Fafard) Propositions changed : r=1, cs=0
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [ 0.000000] (0:@) Pair 91 already reached (equal to pair 79) !
+> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
+> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
+> [ 0.000000] (0:@) Pair 86 already reached (equal to pair 74) !
> [ 0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> [ 0.000000] (0:@) | ACCEPTANCE CYCLE |
> [ 0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(2)Boivin (client)] iRecv(dst=(2)Boivin (client), buff=(verbose only), size=(verbose only)) (56)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(1)Tremblay (coordinator)-> (2)Boivin (client)]) (62)
-> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] iRecv(dst=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) (56)
> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(1)Tremblay (coordinator)-> (2)Boivin (client)]) (62)
+> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] iRecv(dst=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) (56)
> [ 0.000000] (0:@) [(2)Boivin (client)] iSend(src=(2)Boivin (client), buff=(verbose only), size=(verbose only)) (54)
+> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] iRecv(dst=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) (56)
-> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(2)Boivin (client)] iSend(src=(2)Boivin (client), buff=(verbose only), size=(verbose only)) (54)
> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(1)Tremblay (coordinator)-> (2)Boivin (client)]) (62)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(1)Tremblay (coordinator)-> (2)Boivin (client)]) (62)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] iRecv(dst=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) (56)
+> [ 0.000000] (0:@) [(3)Fafard (client)] Wait(comm=(verbose only) [(3)Fafard (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(2)Boivin (client)] iSend(src=(2)Boivin (client), buff=(verbose only), size=(verbose only)) (54)
-> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] iRecv(dst=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) (56)
+> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(2)Boivin (client)] iSend(src=(2)Boivin (client), buff=(verbose only), size=(verbose only)) (54)
-> [ 0.000000] (0:@) [(3)Fafard (client)] Wait(comm=(verbose only) [(3)Fafard (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] iSend(src=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) (54)
> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(1)Tremblay (coordinator)-> (2)Boivin (client)]) (62)
> [ 0.000000] (0:@) [(2)Boivin (client)] iSend(src=(2)Boivin (client), buff=(verbose only), size=(verbose only)) (54)
> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
-> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] iRecv(dst=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) (56)
-> [ 0.000000] (0:@) [(2)Boivin (client)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
-> [ 0.000000] (0:@) [(2)Boivin (client)] iSend(src=(2)Boivin (client), buff=(verbose only), size=(verbose only)) (54)
-> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(2)Boivin (client)-> (1)Tremblay (coordinator)]) (62)
-> [ 0.000000] (0:@) [(1)Tremblay (coordinator)] iSend(src=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) (54)
-> [ 0.000000] (0:@) Expanded pairs = 91
-> [ 0.000000] (0:@) Visited pairs = 502
-> [ 0.000000] (0:@) Executed transitions = 501
\ No newline at end of file
+> [ 0.000000] (0:@) Expanded pairs = 86
+> [ 0.000000] (0:@) Visited pairs = 461
+> [ 0.000000] (0:@) Executed transitions = 460
SD_workstation_get_name(workstations[ctr]), mount_name);
xbt_dynar_free_container(¤t_storage_list);
}
+ SD_exit();
return 0;
}
dw_type_t member, subtype, subsubtype;
int elm_size, i, res, switch_types = 0;
void *addr_pointed1, *addr_pointed2;
- int pointed_area_size1, pointed_area_size2;
switch(type->type){
case e_dw_base_type:
addr_pointed1 = *((void **)(area1));
addr_pointed2 = *((void **)(area2));
- if((addr_pointed1 == addr_pointed2) && ((pointed_area_size1 = get_pointed_area_size(addr_pointed1, 1)) != (pointed_area_size2 = get_pointed_area_size(addr_pointed2, 2))))
- return -1;
if(addr_pointed1 == NULL && addr_pointed2 == NULL)
return 0;
if(already_compared_pointers(addr_pointed1, addr_pointed2) != -1)
res = compare_areas_with_type((char *)r1->data + offset, (char *)r2->data + offset, types, other_types, current_var->type_origin, r1->size, region_type, start_data, 0);
if(res == 1){
- XBT_VERB("Global variable %s is different between snapshots", current_var->name);
+ XBT_VERB("Global variable %s (%p - %p) is different between snapshots", current_var->name, (char *)r1->data + offset, (char *)r2->data + offset);
xbt_dynar_free(&compared_pointers);
compared_pointers = NULL;
return 1;
offset1 = (char *)current_var1->address - (char *)std_heap;
offset2 = (char *)current_var2->address - (char *)std_heap;
if(current_var1->region == 1)
- res = compare_areas_with_type( (char *)heap1 + offset1, (char *)heap2 + offset2, mc_variables_type_libsimgrid, mc_variables_type_binary, current_var1->type, 0, 1, start_data_libsimgrid, 0l);
+ res = compare_areas_with_type( (char *)heap1 + offset1, (char *)heap2 + offset2, mc_variables_type_libsimgrid, mc_variables_type_binary, current_var1->type, 0, 1, start_data_libsimgrid, 0);
else
- res = compare_areas_with_type( (char *)heap1 + offset1, (char *)heap2 + offset2, mc_variables_type_binary, mc_variables_type_libsimgrid, current_var1->type, 0, 2, start_data_binary, 0l);
+ res = compare_areas_with_type( (char *)heap1 + offset1, (char *)heap2 + offset2, mc_variables_type_binary, mc_variables_type_libsimgrid, current_var1->type, 0, 2, start_data_binary, 0);
if(res == 1){
- XBT_VERB("Local variable %s in frame %s is different between snapshots", current_var1->name, current_var1->frame);
+ XBT_VERB("Local variable %s (%p - %p) in frame %s is different between snapshots", current_var1->name,(char *)heap1 + offset1, (char *)heap2 + offset2, current_var1->frame);
xbt_dynar_free(&compared_pointers);
compared_pointers = NULL;
return res;
}
}
}
+ xbt_dict_foreach(mc_local_variables_binary, dict_cursor, current_frame_name, frame){
+ start = 0;
+ end = xbt_dynar_length(frame->variables) - 1;
+ while(start <= end){
+ cursor = (start + end) / 2;
+ current_var = (dw_variable_t)xbt_dynar_get_as(frame->variables, cursor, dw_variable_t);
+ if(strcmp(current_var->name, var_name) == 0){
+ xbt_dynar_remove_at(frame->variables, cursor, NULL);
+ start = 0;
+ end = xbt_dynar_length(frame->variables) - 1;
+ }else if(strcmp(current_var->name, var_name) < 0){
+ start = cursor + 1;
+ }else{
+ end = cursor - 1;
+ }
+ }
+ }
}else{
xbt_dynar_t variables_list = ((dw_frame_t)xbt_dict_get_or_null(mc_local_variables_libsimgrid, frame_name))->variables;
start = 0;
scount=rcount;
sdtype=rdtype;
}
- return smpi_coll_tuned_scatter_ompi_binomial (sbuf, scount, sdtype,
- rbuf, rcount, rdtype,
- root, comm);
+ int ret=smpi_coll_tuned_scatter_ompi_binomial (sbuf, scount, sdtype,
+ rbuf, rcount, rdtype,
+ root, comm);
+ if(rank!=root){
+ xbt_free(sbuf);
+ }
+ return ret;
}
return smpi_coll_tuned_scatter_ompi_basic_linear (sbuf, scount, sdtype,
rbuf, rcount, rdtype,
NOT_YET_IMPLEMENTED
}
-int MPI_Request_get_status( MPI_Request request, int *flag, MPI_Status *status){
- NOT_YET_IMPLEMENTED
-}
-
int PMPI_Grequest_start( MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, void *extra_state, MPI_Request *request){
NOT_YET_IMPLEMENTED
}
FFLAGS="-ff2c -fno-second-underscore"
LINKARGS="-lsimgrid -lm -lgfortran"
main_name=main
-TMPFILE=$(mktemp).f90
+
+declare -a TMPFILES
+trap 'rm -f "${TMPFILES[@]}"' EXIT
+
CMDLINE=""
while [ -n "$1" ]; do
ARG="$1"
CMDLINE="${CMDLINE} -c "
;;
*.f90|*.F90)
- SRCFILE="$(readlink -f ${ARG} 2>/dev/null)"
- if [ -z $SRCFILE ] ; then
- SRCFILE="$ARG"
- fi
-
- TMPFILE=${ARG}\_$RANDOM.f90
+ TMPFILE=$(mktemp "${ARG}_XXXXXX.f90")
+ TMPFILES+=( "${TMPFILE}" )
#replace "program main_name by subroutine user\_main (and the end clause as well)"
sed 's/[[:space:]]*program[[:space:]]*\([a-zA-Z0-9\-\_]*\)/subroutine user\_main /gI;s/[[:space:]]*use[[:space:]]*mpi/\include \"mpif\.h\" /gI' ${ARG} > ${TMPFILE}
SRCFILE="${TMPFILE}"
#echo "${CMDLINE}"
${CMDLINE}
-
-if [ -f ${TMPFILE} ];then
- rm ${TMPFILE}
-fi
}else if((addr_pointed1 > s_heap) && ((char *)addr_pointed1 < (char *)s_heap + STD_HEAP_SIZE)
&& (addr_pointed2 > s_heap) && ((char *)addr_pointed2 < (char *)s_heap + STD_HEAP_SIZE)){
res_compare = compare_heap_area(addr_pointed1, addr_pointed2, previous, all_types, other_types, NULL, 0);
- if(res_compare != 0){
+ if(res_compare == 1)
return res_compare;
- }
i = pointer_align + sizeof(void *);
continue;
}else{
if((check_ignore > 0) && ((ignore1 = heap_comparison_ignore_size(to_ignore1, real_area1)) > 0) && ((ignore2 = heap_comparison_ignore_size(to_ignore2, real_area2)) == ignore1))
return 0;
if(strcmp(type->name, "char") == 0){ /* String, hence random (arbitrary ?) size */
- return (memcmp(area1, area2, area_size) != 0);
+ return (memcmp(area1, area2, area_size) != 0);
}else{
if(area_size != -1 && type->size != area_size)
return -1;
else
res = compare_heap_area_with_type((char *)real_area1 + member->offset, (char *)real_area2 + member->offset, (char *)area1 + member->offset, (char *)area2 + member->offset, previous, all_types, other_types, member->dw_type_id, -1, check_ignore, 0);
if(res == 1)
- return res;
+ return res;
}
}
break;
type = xbt_dict_get_or_null(other_types, get_type_description(other_types, type->name));
}
if(strcmp(type->name, "s_smx_context") != 0){
- if(type->size > 1){
+ if(type->size > 0){
if(heapinfo1[block1].busy_block.busy_size != type->size && heapinfo2[block2].busy_block.busy_size != type->size)
return -1;
}
type = xbt_dict_get_or_null(all_types, type->dw_type_id);
}
}
- if(type->size > 1){
+ if(type->size > 0){
if(heapinfo1[block1].busy_frag.frag_size[frag1] != type->size || heapinfo2[block2].busy_frag.frag_size[frag2] != type->size)
return -1;
}
if(match_pairs){
xbt_dynar_free(&previous);
}
- return 1;
+ return 1;
}
if(!add_heap_area_pair(previous, block1, frag1, block2, frag2)){
xbt_dict_preinit();
srand(seed);
+#ifndef _WIN32
srand48(seed);
+#endif
atexit(xbt_postexit);
}
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &(timer->start));
#elif defined(_XBT_WIN32)
timer->elapse.tv_sec = 0;
- timer->elapse.tv_nsec = 0;
+ timer->elapse.tv_usec = 0;
# if defined(WIN32_WCE) || (_WIN32_WINNT < 0x0400)
THROW_UNIMPLEMENTED;
# else
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &(timer->start));
#elif defined(_XBT_WIN32)
timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
- timer->elapse.tv_nsec += timer->stop.tv_nsec - timer->start.tv_nsec;
+ timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec;
# if defined(WIN32_WCE) || (_WIN32_WINNT < 0x0400)
THROW_UNIMPLEMENTED;
# else
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->start));
#elif defined(_XBT_WIN32)
timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
- timer->elapse.tv_nsec += timer->stop.tv_nsec - timer->start.tv_nsec;
+ timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec;
# if defined(WIN32_WCE) || (_WIN32_WINNT < 0x0400)
THROW_UNIMPLEMENTED;
# else
else()
set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
endif()
-
+
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-
+
include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
add_executable(gather_coll gather_coll.c)
add_executable(allgather_coll allgather_coll.c)
add_executable(alltoall_coll alltoall_coll.c)
add_executable(alltoallv_coll alltoallv_coll.c)
add_executable(allreduce allreduce.c)
- add_executable(allreduce_coll allreduce_coll.c)
+ add_executable(allreduce_coll allreduce_coll.c)
add_executable(bcast bcast.c)
- add_executable(bcast_coll bcast_coll.c)
+ add_executable(bcast_coll bcast_coll.c)
add_executable(barrier_coll barrier.c )
add_executable(compute compute.c)
add_executable(compute2 compute2.c)
add_executable(compute3 compute3.c)
- add_executable(shared shared.c)
add_executable(pingpong pingpong.c)
add_executable(scatter scatter.c)
add_executable(reduce reduce.c)
target_link_libraries(alltoall_coll simgrid)
target_link_libraries(alltoallv_coll simgrid)
target_link_libraries(allreduce simgrid)
- target_link_libraries(allreduce_coll simgrid)
+ target_link_libraries(allreduce_coll simgrid)
target_link_libraries(bcast simgrid)
- target_link_libraries(bcast_coll simgrid)
+ target_link_libraries(bcast_coll simgrid)
target_link_libraries(barrier_coll simgrid)
target_link_libraries(compute simgrid)
- target_link_libraries(shared simgrid)
target_link_libraries(compute2 simgrid)
target_link_libraries(compute3 simgrid)
target_link_libraries(pingpong simgrid)
target_link_libraries(scatter simgrid)
target_link_libraries(reduce simgrid)
- target_link_libraries(reduce_coll simgrid)
- target_link_libraries(reduce_scatter_coll simgrid)
+ target_link_libraries(reduce_coll simgrid)
+ target_link_libraries(reduce_scatter_coll simgrid)
target_link_libraries(split simgrid)
target_link_libraries(smpi_sendrecv simgrid)
target_link_libraries(ttest01 simgrid)
if(NOT WIN32)
add_executable(dsend dsend.c)
target_link_libraries(dsend m simgrid)
+
+ add_executable(shared shared.c)
+ target_link_libraries(shared simgrid)
endif()
endif()
${tesh_files}
${CMAKE_CURRENT_SOURCE_DIR}/gather_coll.tesh
${CMAKE_CURRENT_SOURCE_DIR}/allgather_coll.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv_coll.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv_coll.tesh
${CMAKE_CURRENT_SOURCE_DIR}/allreduce_coll.tesh
${CMAKE_CURRENT_SOURCE_DIR}/allreduce_coll_large.tesh
${CMAKE_CURRENT_SOURCE_DIR}/alltoall_coll.tesh
${CMAKE_CURRENT_SOURCE_DIR}/scatter_coll.tesh
${CMAKE_CURRENT_SOURCE_DIR}/barrier_coll.tesh
${CMAKE_CURRENT_SOURCE_DIR}/bcast.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/bcast_coll.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/bcast_coll.tesh
${CMAKE_CURRENT_SOURCE_DIR}/compute.tesh
${CMAKE_CURRENT_SOURCE_DIR}/shared.tesh
${CMAKE_CURRENT_SOURCE_DIR}/hvector.tesh
${CMAKE_CURRENT_SOURCE_DIR}/indexed.tesh
${CMAKE_CURRENT_SOURCE_DIR}/pt2pt.tesh
${CMAKE_CURRENT_SOURCE_DIR}/reduce.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/reduce_coll.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_coll.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/reduce_coll.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_coll.tesh
${CMAKE_CURRENT_SOURCE_DIR}/struct.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/vector.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/vector.tesh
PARENT_SCOPE
)
set(xml_files
${examples_src}
${CMAKE_CURRENT_SOURCE_DIR}/gather_coll.c
${CMAKE_CURRENT_SOURCE_DIR}/allgather_coll.c
- ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv_coll.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv_coll.c
${CMAKE_CURRENT_SOURCE_DIR}/allreduce_coll.c
${CMAKE_CURRENT_SOURCE_DIR}/alltoall_coll.c
- ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv_coll.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv_coll.c
${CMAKE_CURRENT_SOURCE_DIR}/bcast_coll.c
${CMAKE_CURRENT_SOURCE_DIR}/reduce_coll.c
${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_coll.c
)
set(txt_files
${txt_files}
-
+
PARENT_SCOPE
)
cmake_minimum_required(VERSION 2.6)
if(WIN32)
- add_custom_target(tesh ALL
- DEPENDS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl
- COMMENT "Install ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl"
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh
- )
+ #add_custom_target(tesh ALL
+ # DEPENDS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl
+ # COMMENT "Install ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl"
+ # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh
+ # )
+
+ file(COPY ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl
+ DESTINATION ${CMAKE_BINARY_DIR}/bin/
+ FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
+ GROUP_EXECUTE GROUP_READ)
+ file(RENAME ${CMAKE_BINARY_DIR}/bin/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh)
else()
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")