1 /*
2  * Copyright (C) by Argonne National Laboratory
3  *     See COPYRIGHT in top-level directory
4  */
5 
6 #ifndef MPICH_DLL_DEFS_H_INCLUDED
7 #define MPICH_DLL_DEFS_H_INCLUDED
8 
9 /***********************************************************************
10  * Information associated with a specific executable image
11  */
12 typedef struct {
13     const struct mqs_image_callbacks *image_callbacks;  /* Functions needed here */
14 
15     /* in the embedded MPI_Status object */
16     int count_offs;
17     int MPI_SOURCE_offs;
18     int MPI_TAG_offs;
19 
20     /* Fields in MPIR_Comm_list */
21     int sequence_number_offs;
22     int comm_head_offs;
23 
24     /* Fields in MPIR_Comm */
25     int comm_rsize_offs;
26     int lrank_to_grank_offs;
27     int comm_rank_offs;
28     int comm_context_id_offs;
29     int comm_recvcontext_id_offs;
30     int comm_next_offs;
31     int comm_name_offs;
32 #ifdef HAVE_CH4_DEBUGGER_SUPPORT
33     /* In CH4, message queues can be global or per-communicator. */
34     int comm_posted_offs;
35     int comm_unexp_offs;
36 #endif
37 
38     /* Fields in MPIR_Request (including structures within the request) */
39     int req_status_offs;
40     int req_cc_offs;
41     int req_dev_offs;
42     int req_tag_offs;
43     int req_rank_offs;
44     int req_context_id_offs;
45     int req_user_buf_offs;
46     int req_user_count_offs;
47     int req_datatype_offs;
48 #ifdef HAVE_CH4_DEBUGGER_SUPPORT
49     /* CH4 only has message queue for active messages. */
50     int am_rreq_next_offs;
51     /* offset of MPIR_Request in MPIDI_CH4U_rreq_t  */
52     int req_offs;
53     /* offset of AM in MPIR_Request */
54     int req_am_offs;
55 #else
56     int req_next_offs;
57 #endif
58 
59     /* Fields in MPIR_Sendq */
60     int sendq_next_offs;
61     int sendq_tag_offs;
62     int sendq_rank_offs;
63     int sendq_context_id_offs;
64     int sendq_req_offs;
65 } mpich_image_info;
66 
67 /***********************************************************************
68  * Information associated with a specific process
69  */
70 
71 typedef struct group_t {
72     mqs_taddr_t table_base;     /* Where was it in the process  */
73     int ref_count;              /* How many references to us */
74     int entries;                /* How many entries */
75     int *local_to_global;       /* The translation table */
76 } group_t;
77 
78 /* Information for a single process, a list of communicators, some
79  * useful addresses, and the state of the iterators.
80  */
81 typedef struct {
82     const struct mqs_process_callbacks *process_callbacks;      /* Functions needed here */
83 
84     struct communicator_t *communicator_list;   /* List of communicators in the process */
85     mqs_target_type_sizes sizes;        /* Process architecture information */
86 
87     /* Addresses in the target process */
88 #ifndef HAVE_CH4_DEBUGGER_SUPPORT
89     mqs_taddr_t posted_base;    /* Where to find the message queues */
90     mqs_taddr_t unexpected_base;
91 #endif
92     mqs_taddr_t sendq_base;     /* Where to find the send queue */
93     mqs_taddr_t commlist_base;  /* Where to find the list of communicators */
94 
95     /* Other info we need to remember about it */
96     mqs_tword_t communicator_sequence;
97     int has_sendq;
98 
99     /* State for the iterators */
100     struct communicator_t *current_communicator;        /* Easy, we're walking a simple list */
101 
102     mqs_taddr_t next_msg;       /* And state for the message iterator */
103     mqs_op_class what;          /* What queue are we looking on */
104 } mpich_process_info;
105 
106 #endif /* MPICH_DLL_DEFS_H_INCLUDED */
107