2 #include "xbt/mallocator.h"
3 #include "xbt/xbt_os_time.h"
5 #define SMPI_DEFAULT_SPEED 100
6 #define SMPI_REQUEST_MALLOCATOR_SIZE 100
7 #define SMPI_MESSAGE_MALLOCATOR_SIZE 100
9 typedef struct SMPI_Global {
12 double reference_speed;
16 int ready_process_count;
17 smx_mutex_t start_stop_mutex;
18 smx_cond_t start_stop_cond;
20 xbt_mallocator_t request_mallocator;
21 xbt_mallocator_t message_mallocator;
23 xbt_fifo_t *pending_send_request_queues;
24 smx_mutex_t *pending_send_request_queues_mutexes;
26 xbt_fifo_t *pending_recv_request_queues;
27 smx_mutex_t *pending_recv_request_queues_mutexes;
29 xbt_fifo_t *received_message_queues;
30 smx_mutex_t *received_message_queues_mutexes;
32 smx_process_t *sender_processes;
33 smx_process_t *receiver_processes;
35 int running_hosts_count;
36 smx_mutex_t running_hosts_count_mutex;
38 xbt_os_timer_t *timers;
39 smx_mutex_t *timers_mutexes;
42 } s_SMPI_Global_t, *SMPI_Global_t;
44 extern SMPI_Global_t smpi_global;
46 struct smpi_received_message_t {
47 smpi_mpi_communicator_t *comm;
54 typedef struct smpi_received_message_t smpi_received_message_t;