static const double sleep_delay = 4.9999;
-extern long int smx_total_comms;
-
/* Finger element. */
typedef struct s_finger {
int id;
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();
> [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
> [ 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
*/
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)
{
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;
> [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
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;
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;
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"
/* Static variable used for tracing */
process.ignore_global_variable("counter");
-
- /* SIMIX */
- process.ignore_global_variable("smx_total_comms");
}
void ModelChecker::shutdown()
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);
synchro->category = NULL;
XBT_DEBUG("Create communicate synchro %p", synchro);
- ++smx_total_comms;
return synchro;
}
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;
}
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 */
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--;
if(other_synchro)other_synchro->comm.refcount--;
SIMIX_comm_destroy(this_synchro);
- --smx_total_comms;
return other_synchro;
}