Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not push newly created sockets into the dynar before they get initialized, or...
[simgrid.git] / src / smpi / include / private.h
1 #include "smpi.h"
2 #include "xbt/mallocator.h"
3 #include "xbt/xbt_os_time.h"
4
5 #define SMPI_DEFAULT_SPEED 100
6 #define SMPI_REQUEST_MALLOCATOR_SIZE 100
7 #define SMPI_MESSAGE_MALLOCATOR_SIZE 100
8
9 typedef struct SMPI_Global {
10
11         // config vars
12         double            reference_speed;
13
14         // state vars
15         int               root_ready:1;
16         int               ready_process_count;
17         smx_mutex_t       start_stop_mutex;
18         smx_cond_t        start_stop_cond;
19
20         xbt_mallocator_t  request_mallocator;
21         xbt_mallocator_t  message_mallocator;
22
23         xbt_fifo_t       *pending_send_request_queues;
24         smx_mutex_t      *pending_send_request_queues_mutexes;
25
26         xbt_fifo_t       *pending_recv_request_queues;
27         smx_mutex_t      *pending_recv_request_queues_mutexes;
28
29         xbt_fifo_t       *received_message_queues;
30         smx_mutex_t      *received_message_queues_mutexes;
31
32         smx_process_t    *sender_processes;
33         smx_process_t    *receiver_processes;
34
35         int               running_hosts_count;
36         smx_mutex_t       running_hosts_count_mutex;
37
38         xbt_os_timer_t   *timers;
39         smx_mutex_t      *timers_mutexes;
40
41
42 } s_SMPI_Global_t, *SMPI_Global_t;
43
44 extern SMPI_Global_t smpi_global;
45
46 struct smpi_received_message_t {
47         smpi_mpi_communicator_t *comm;
48         int src;
49         int dst;
50         int tag;
51         void *buf;
52 };
53
54 typedef struct smpi_received_message_t smpi_received_message_t;