 |
The ROme OpTimistic Simulator
3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
Go to the documentation of this file.
26 static thr_ret_t THREAD_CALL_CONV parallel_thread_run(
void *rid_arg)
28 rid = (uintptr_t)rid_arg;
44 while (
likely(termination_cant_end())) {
54 if (
unlikely(current_gvt = gvt_phase_run())) {
55 termination_on_gvt(current_gvt);
56 fossil_collect(current_gvt);
57 stats_on_gvt(current_gvt);
72 return THREAD_RET_SUCCESS;
75 static void parallel_global_init(
void)
79 process_global_init();
82 termination_global_init();
85 remote_msg_map_global_init();
89 static void parallel_global_fini(
void)
92 remote_msg_map_global_fini();
96 process_global_fini();
101 void parallel_simulation(
void)
104 parallel_global_init();
111 (
void *)(uintptr_t)i)) {
127 parallel_global_fini();
void stats_init(void)
Initializes the stats subsystem in the current thread.
double simtime_t
The type used to represent logical time in the simulation.
Model library main header.
Concurrent simulation engine.
void mpi_remote_msg_handle(void)
Empties the queue of incoming MPI messages, doing the right thing for each one of them.
unsigned rid_t
Used to identify in a node the computing resources (threads at the moment)
Easier Synchronization primitives.
bool core_binding
If set, worker threads are bound to physical cores.
void stats_global_fini(void)
Finalizes the stats subsystem in the node.
void msg_queue_init(void)
Initializes the message queue for the current thread.
void mpi_node_barrier(void)
A node barrier.
rid_t n_threads
The total number of MPI nodes in the simulation.
Memory management functions for messages.
int thread_wait(thr_id_t thr, thr_ret_t *ret)
Wait for specified thread to complete execution.
void msg_queue_global_init(void)
Initializes the message queue at the node level.
Termination detection module.
#define log_log(lvl,...)
Produces a log.
LP construction functions.
__thread rid_t rid
The identifier of the thread.
bool sync_thread_barrier(void)
Synchronizes threads on a barrier.
#define LOG_FATAL
The logging level reserved to unexpected, fatal conditions.
int thread_affinity_set(thr_id_t thr, unsigned core)
Sets a core affinity for a thread.
#define LOG_INFO
The logging level reserved to useful runtime messages.
#define likely(exp)
Optimize the branch as likely taken.
int thread_start(thr_id_t *thr_p, thr_run_fnc t_fnc, void *t_fnc_arg)
Creates a thread.
Core ROOT-Sim functionalities.
void msg_queue_fini(void)
Finalizes the message queue for the current thread.
#define unlikely(exp)
Optimize the branch as likely not taken.
struct simulation_configuration global_config
The configuration filled in by init_args_parse()
void stats_global_init(void)
Initializes the stats subsystem in the node.
void msg_queue_global_fini(void)
Finalizes the message queue at the node level.
void stats_global_time_take(enum stats_global_time this_stat)
Initializes the internal timer used to take accurate measurements.
Generic architecture management facilities.
void gvt_global_init(void)
Initializes the gvt module in the node.