From d2cd6190c7a6ba8f102134cf6ab3043f7df8f77e Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 21 Apr 2016 17:33:21 +0200 Subject: [PATCH] useless global variable, hindering MC equality --- examples/msg/dht-chord/dht-chord.c | 3 --- examples/msg/dht-chord/dht-chord.tesh | 2 -- examples/msg/dht-kademlia/dht-kademlia.c | 3 --- examples/msg/dht-kademlia/dht-kademlia.tesh | 1 - examples/msg/dht-pastry/dht-pastry.c | 3 --- examples/msg/dht-pastry/dht-pastry.tesh | 1 - src/mc/ModelChecker.cpp | 3 --- src/simix/smx_network.cpp | 6 ------ 8 files changed, 22 deletions(-) diff --git a/examples/msg/dht-chord/dht-chord.c b/examples/msg/dht-chord/dht-chord.c index 976fa83397..420d50293e 100644 --- a/examples/msg/dht-chord/dht-chord.c +++ b/examples/msg/dht-chord/dht-chord.c @@ -34,8 +34,6 @@ static int periodic_lookup_delay = 10; static const double sleep_delay = 4.9999; -extern long int smx_total_comms; - /* Finger element. */ typedef struct s_finger { int id; @@ -1043,7 +1041,6 @@ int main(int argc, char *argv[]) MSG_launch_application(application_file); msg_error_t res = MSG_main(); - XBT_CRITICAL("Messages created: %ld", smx_total_comms); XBT_INFO("Simulated time: %g", MSG_get_clock()); chord_exit(); diff --git a/examples/msg/dht-chord/dht-chord.tesh b/examples/msg/dht-chord/dht-chord.tesh index 166a9a2a8d..d3a4cb89bd 100644 --- a/examples/msg/dht-chord/dht-chord.tesh +++ b/examples/msg/dht-chord/dht-chord.tesh @@ -184,7 +184,6 @@ $ $SG_TEST_EXENV ${bindir:=.}/dht-chord$EXEEXT -nb_bits=6 ${srcdir:=.}/cluster.x > [115.044536] (2:node@node-1.acme.org) 40 | 366680 > [115.044536] (2:node@node-1.acme.org) 56 | 366680 > [115.044536] (2:node@node-1.acme.org) Predecessor: 1319738 -> [1151.814423] (0:maestro@) Messages created: 2452 > [1151.814423] (0:maestro@) Simulated time: 1151.81 > [130.161328] (3:node@node-2.acme.org) My finger table: > [130.161328] (3:node@node-2.acme.org) Start | Succ @@ -3223,5 +3222,4 @@ $ $SG_TEST_EXENV ${bindir:=.}/dht-chord$EXEEXT ${srcdir:=.}/routing_none.xml ${s > [ 990.991700] (8:node@node-7.acme.org) 14199064 | 10004760 > [ 990.991700] (8:node@node-7.acme.org) 1616152 | 10004760 > [ 990.991700] (8:node@node-7.acme.org) Predecessor: 6518808 -> [1201.991400] (0:maestro@) Messages created: 2208 > [1201.991400] (0:maestro@) Simulated time: 1201.99 diff --git a/examples/msg/dht-kademlia/dht-kademlia.c b/examples/msg/dht-kademlia/dht-kademlia.c index 1177377716..186c620109 100644 --- a/examples/msg/dht-kademlia/dht-kademlia.c +++ b/examples/msg/dht-kademlia/dht-kademlia.c @@ -15,8 +15,6 @@ */ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_kademlia, "Messages specific for this msg example"); -extern long unsigned int smx_total_comms; - /* Main loop for the process */ static void main_loop(node_t node, double deadline) { @@ -441,7 +439,6 @@ int main(int argc, char *argv[]) msg_error_t res = MSG_main(); - XBT_CRITICAL("Messages created: %ld", smx_total_comms); XBT_INFO("Simulated time: %g", MSG_get_clock()); return res != MSG_OK; diff --git a/examples/msg/dht-kademlia/dht-kademlia.tesh b/examples/msg/dht-kademlia/dht-kademlia.tesh index 22ecfa195c..61f4fd8bf1 100644 --- a/examples/msg/dht-kademlia/dht-kademlia.tesh +++ b/examples/msg/dht-kademlia/dht-kademlia.tesh @@ -30,5 +30,4 @@ $ $SG_TEST_EXENV ${bindir:=.}/dht-kademlia ${srcdir:=.}/cluster.xml ${srcdir:=.} > [780.000000] (10:node@node-9.acme.org) 5/5 FIND_NODE have succeeded > [780.000000] (12:node@node-11.acme.org) 6/6 FIND_NODE have succeeded > [780.000000] ( 4:node@node-3.acme.org) 5/5 FIND_NODE have succeeded -> [780.000000] ( 0:maestro@) Messages created: 1179 > [780.000000] ( 0:maestro@) Simulated time: 780 diff --git a/examples/msg/dht-pastry/dht-pastry.c b/examples/msg/dht-pastry/dht-pastry.c index df375656c2..d0afa78f88 100644 --- a/examples/msg/dht-pastry/dht-pastry.c +++ b/examples/msg/dht-pastry/dht-pastry.c @@ -29,8 +29,6 @@ static int nb_bits = 16; static int timeout = 50; static int max_simulation_time = 1000; -extern long int smx_total_comms; - typedef struct s_node { int id; //128bits generated random(2^128 -1) int known_id; @@ -571,7 +569,6 @@ int main(int argc, char *argv[]) MSG_launch_application(options[1]); msg_error_t res = MSG_main(); - XBT_CRITICAL("Messages created: %ld", smx_total_comms); XBT_INFO("Simulated time: %g", MSG_get_clock()); return res != MSG_OK; diff --git a/examples/msg/dht-pastry/dht-pastry.tesh b/examples/msg/dht-pastry/dht-pastry.tesh index ee9138dd25..8a52ccb3cb 100644 --- a/examples/msg/dht-pastry/dht-pastry.tesh +++ b/examples/msg/dht-pastry/dht-pastry.tesh @@ -2,5 +2,4 @@ p Testing the Chord implementation with MSG -! output sort 19 $ $SG_TEST_EXENV ${bindir:=.}/dht-pastry$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platforms/platform.xml ${srcdir:=.}/dht-pastry_d.xml --cfg=network/crosstraffic:0 --log=msg_pastry.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" diff --git a/src/mc/ModelChecker.cpp b/src/mc/ModelChecker.cpp index 956f5f13d1..ea14a19348 100644 --- a/src/mc/ModelChecker.cpp +++ b/src/mc/ModelChecker.cpp @@ -149,9 +149,6 @@ void ModelChecker::setup_ignore() /* Static variable used for tracing */ process.ignore_global_variable("counter"); - - /* SIMIX */ - process.ignore_global_variable("smx_total_comms"); } void ModelChecker::shutdown() diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index dd209ff180..977fe430bd 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -14,7 +14,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_network, simix, "SIMIX network-related synchronization"); static xbt_dict_t mailboxes = NULL; -XBT_EXPORT_NO_IMPORT(unsigned long int) smx_total_comms = 0; static void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall); static void SIMIX_comm_copy_data(smx_synchro_t comm); @@ -250,7 +249,6 @@ smx_synchro_t SIMIX_comm_new(e_smx_comm_type_t type) synchro->category = NULL; XBT_DEBUG("Create communicate synchro %p", synchro); - ++smx_total_comms; return synchro; } @@ -361,7 +359,6 @@ smx_synchro_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_process_t sr XBT_DEBUG("Receive already pushed"); SIMIX_comm_destroy(this_synchro); - --smx_total_comms; // this creation was a pure waste other_synchro->state = SIMIX_READY; other_synchro->comm.type = SIMIX_COMM_READY; @@ -450,7 +447,6 @@ smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox, void } other_synchro->comm.refcount--; SIMIX_comm_destroy(this_synchro); - --smx_total_comms; // this creation was a pure waste } } else { /* Prepare a synchro describing us, so that it gets passed to the user-provided filter of other side */ @@ -467,7 +463,6 @@ smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox, void SIMIX_mbox_push(mbox, this_synchro); } else { SIMIX_comm_destroy(this_synchro); - --smx_total_comms; // this creation was a pure waste other_synchro->state = SIMIX_READY; other_synchro->comm.type = SIMIX_COMM_READY; //other_synchro->comm.refcount--; @@ -536,7 +531,6 @@ smx_synchro_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_mailbox_t mbox, int if(other_synchro)other_synchro->comm.refcount--; SIMIX_comm_destroy(this_synchro); - --smx_total_comms; return other_synchro; } -- 2.20.1