1 #include "xbt/mallocator.h"
2 #include "xbt/xbt_os_time.h"
4 #define SMPI_DEFAULT_SPEED 100
5 #define SMPI_REQUEST_MALLOCATOR_SIZE 100
6 #define SMPI_MESSAGE_MALLOCATOR_SIZE 100
8 typedef struct SMPI_Global {
11 double reference_speed;
15 int ready_process_count;
16 smx_mutex_t start_stop_mutex;
17 smx_cond_t start_stop_cond;
19 xbt_mallocator_t request_mallocator;
20 xbt_mallocator_t message_mallocator;
22 xbt_fifo_t *pending_send_request_queues;
23 smx_mutex_t *pending_send_request_queues_mutexes;
25 xbt_fifo_t *pending_recv_request_queues;
26 smx_mutex_t *pending_recv_request_queues_mutexes;
28 xbt_fifo_t *received_message_queues;
29 smx_mutex_t *received_message_queues_mutexes;
31 smx_process_t *sender_processes;
32 smx_process_t *receiver_processes;
34 int running_hosts_count;
35 smx_mutex_t running_hosts_count_mutex;
37 xbt_os_timer_t *timers;
38 smx_mutex_t *timers_mutexes;
40 int *benchmarking_flags;
41 smx_mutex_t *benchmarking_flags_mutexes;
43 } s_SMPI_Global_t, *SMPI_Global_t;
45 extern SMPI_Global_t smpi_global;
47 // smpi_received_message_t
48 struct smpi_received_message_t {
49 smpi_mpi_communicator_t *comm;
55 typedef struct smpi_received_message_t smpi_received_message_t;