mpidpre.h 21.7 KB
Newer Older
1
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/*
 *  (C) 2001 by Argonne National Laboratory.
 *      See COPYRIGHT in top-level directory.
 */

/* FIXME: This header should contain only the definitions exported to the
   mpiimpl.h level */

#if !defined(MPICH_MPIDPRE_H_INCLUDED)
#define MPICH_MPIDPRE_H_INCLUDED

/* Tell the compiler that we're going to declare struct MPID_Request later */
struct MPID_Request;

#if defined(HAVE_SYS_TYPES_H)
#include <sys/types.h>
#endif

20 21 22
/* The maximum message size is the size of a pointer; this allows MPI_Aint 
   to be larger than a pointer */
typedef MPIR_Pint MPIDI_msg_sz_t;
23 24 25

#include "mpid_dataloop.h"

26 27 28
/* FIXME: Include here? */
#include "opa_primitives.h"

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
union MPIDI_CH3_Pkt;
struct MPIDI_VC;
struct MPID_Request;

/* PktHandler function:
   vc  (INPUT) -- vc on which the packet was received
   pkt (INPUT) -- pointer to packet header at beginning of receive buffer
   buflen (I/O) -- IN: number of bytes received into receive buffer
                   OUT: number of bytes processed by the handler function
   req (OUTPUT) -- NULL, if the whole message has been processed by the handler
                   function, otherwise, pointer to the receive request for this
                   message.  The IOV will be set describing where the rest of the
                   message should be received.
   (This decl needs to come before mpidi_ch3_pre.h)
*/
typedef int MPIDI_CH3_PktHandler_Fcn(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *pkt,
				     MPIDI_msg_sz_t *buflen, struct MPID_Request **req );

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
/* Include definitions from the channel which must exist before items in this 
   file (mpidpre.h) or the file it includes (mpiimpl.h) can be defined. */
#include "mpidi_ch3_pre.h"

/* FIXME: Who defines this name */
/* As of 8/1/06, no-one defined MSGS_UNORDERED.  We should consider 
   moving support for unordered messages to a different part of the code
   However, note that sequence numbers may be useful in other contexts, 
   including identifying messages when multithreaded (for better profiling
   tools) and handling cancellations (rather than relying on unique 
   request ids) 
*/
#if defined (MPIDI_CH3_MSGS_UNORDERED)
#define MPID_USE_SEQUENCE_NUMBERS
#endif

#if defined(MPID_USE_SEQUENCE_NUMBERS)
typedef unsigned long MPID_Seqnum_t;
#endif

#include "mpichconf.h"

69 70 71 72 73 74
#if CH3_RANK_BITS == 16
typedef int16_t MPIR_Rank_t;
#elif CH3_RANK_BITS == 32
typedef int32_t MPIR_Rank_t;
#endif /* CH3_RANK_BITS */

75 76 77 78 79 80
/* Indicates that this device is topology aware and implements the
   MPID_Get_node_id function (and friends). */
#define MPID_USE_NODE_IDS
typedef MPIR_Rank_t MPID_Node_id_t;


81 82 83
/* provides "pre" typedefs and such for NBC scheduling mechanism */
#include "mpid_sched_pre.h"

84 85 86 87 88 89 90 91 92
/* For the typical communication system for which the ch3 channel is
   appropriate, 16 bits is sufficient for the rank.  By also using 16
   bits for the context, we can reduce the size of the match
   information, which is beneficial for slower communication
   links. Further, this allows the total structure size to be 64 bits
   and the search operations can be optimized on 64-bit platforms. We
   use a union of the actual required structure with a MPIR_Upint, so
   in this optimized case, the "whole" field can be used for
   comparisons.
93

94
   Note that the MPICH code (in src/mpi) uses int for rank (and usually for 
95 96 97 98 99 100
   contextids, though some work is needed there).  

   Note:  We need to check for truncation of rank in MPID_Init - it should 
   confirm that the size of comm_world is less than 2^15, and in an communicator
   create (that may make use of dynamically created processes) that the
   size of the communicator is within range.
101 102

   If any part of the definition of this type is changed, those changes
103
   must be reflected in the debugger interface in src/mpi/debugger/dll_mpich.c
104
   and dbgstub.c
105
*/
106 107 108 109 110
typedef struct MPIDI_Message_match_parts {
    int32_t tag;
    MPIR_Rank_t rank;
    MPIR_Context_id_t context_id;
} MPIDI_Message_match_parts_t;
111
typedef union {
112
    MPIDI_Message_match_parts_t parts;
113 114
    MPIR_Upint whole;
} MPIDI_Message_match;
115

116 117
/* Provides MPIDI_CH3_Pkt_t.  Must come after MPIDI_Message_match definition. */
#include "mpidpkt.h"
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164

/*
 * THIS IS OBSOLETE AND UNUSED, BUT RETAINED FOR ITS DESCRIPTIONS OF THE
 * VARIOUS STATES.  Note that this is not entirely accurate, as the 
 * CA_COMPLETE state could depend on the packet type (e.g., for RMA 
 * operations).
 *
 * MPIDI_CA_t
 *
 * An enumeration of the actions to perform when the requested I/O operation 
 * has completed.
 *
 * MPIDI_CH3_CA_COMPLETE - The last operation for this request has completed.
 * The completion counter should be decremented.  If
 * it has reached zero, then the request should be released by calling 
 * MPID_Request_release().
 *
 * MPIDI_CH3_CA_UNPACK_UEBUF_AND_COMPLETE - This is a special case of the 
 * MPIDI_CH3_CA_COMPLETE.  The data for an unexpected
 * eager messaage has been stored into a temporary buffer and needs to be 
 * copied/unpacked into the user buffer before the
 * completion counter can be decremented, etc.
 *
 * MPIDI_CH3_CA_UNPACK_SRBUF_AND_COMPLETE - This is a special case of the 
 * MPIDI_CH3_CA_COMPLETE.  The data from the completing
 * read has been stored into a temporary send/receive buffer and needs to be 
 * copied/unpacked into the user buffer before the
 * completion counter can be decremented, etc.
 *
 * MPIDI_CH3_CA_RELOAD_IOV - This request contains more segments of data than 
 * the IOV or buffer space allow.  Since the
 * previously request operation has completed, the IOV in the request should 
 * be reload at this time.
 *
 * MPIDI_CH3_CA_UNPACK_SRBUF_AND_RELOAD_IOV - This is a special case of the 
 * MPIDI_CH3_CA_RELOAD_IOV.  The data from the
 * completing read operation has been stored into a temporary send/receive 
 * buffer and needs to be copied/unpacked into the user
 * buffer before the IOV is reloaded.
 *
 * MPIDI_CH3_CA_END_CH3 - This not a real action, but rather a marker.  
 * All actions numerically less than MPID_CA_END are defined
 * by channel device.  Any actions numerically greater than MPIDI_CA_END are 
 * internal to the channel instance and must be handled
 * by the channel instance.
 */

165 166 167 168
#define HAVE_DEV_COMM_HOOK
#define MPID_Dev_comm_create_hook(comm_) MPIDI_CH3I_Comm_create_hook(comm_)
#define MPID_Dev_comm_destroy_hook(comm_) MPIDI_CH3I_Comm_destroy_hook(comm_)

169
#define MPIDI_CH3I_Comm_AS_enabled(comm) ((comm)->dev.anysource_enabled)
170 171 172

typedef struct MPIDI_CH3I_comm
{
173
    int eager_max_msg_sz;   /* comm-wide eager/rendezvous message threshold */
174
    int anysource_enabled;  /* TRUE iff this anysource recvs can be posted on this communicator */
175
    int last_ack_rank;      /* The rank of the last acknowledged failure */
Wesley Bland's avatar
Wesley Bland committed
176 177 178
    int waiting_for_revoke; /* The number of other processes from which we are
                             * waiting for a revoke message before we can release
                             * the context id */
179 180
    struct MPID_Comm *next; /* next pointer for list of communicators */
    struct MPID_Comm *prev; /* prev pointer for list of communicators */
181
    MPIDI_CH3I_CH_comm_t ch;
182 183 184
}
MPIDI_CH3I_comm_t;

185
#define MPID_DEV_COMM_DECL MPIDI_CH3I_comm_t dev;
186

187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
#ifndef HAVE_MPIDI_VCRT
#define HAVE_MPIDI_VCRT
typedef struct MPIDI_VCRT * MPID_VCRT;
typedef struct MPIDI_VC * MPID_VCR;
#endif

#ifndef DEFINED_REQ
#define DEFINED_REQ
#if defined(MPID_USE_SEQUENCE_NUMBERS)
#   define MPIDI_REQUEST_SEQNUM	\
        MPID_Seqnum_t seqnum;
#else
#   define MPIDI_REQUEST_SEQNUM
#endif

202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
/* Here we add RMA sync types to specify types
 * of synchronizations the origin is going to
 * perform to the target. */

/* There are four kinds of synchronizations: NONE,
 * FLUSH_LOCAL, FLUSH, UNLOCK.
 * (1) NONE means there is no special synchronization,
 * origin just issues as many operations as it can,
 * excluding the last operation which is a piggyback
 * candidate;
 * (2) FLUSH_LOCAL means origin wants to do a
 * FLUSH_LOCAL sync and issues out all pending
 * operations including the piggyback candidate;
 * (3) FLUSH means origin wants to do a FLUSH sync
 * and issues out all pending operations including
 * the last op piggybacked with a FLUSH flag to
 * detect remote completion;
 * (4) UNLOCK means origin issues all pending operations
 * incuding the last op piggybacked with an UNLOCK
 * flag to release the lock on target and detect remote
 * completion.
 * Note that FLUSH_LOCAL is a superset of NONE, FLUSH
 * is a superset of FLUSH_LOCAL, and UNLOCK is a superset
 * of FLUSH.
 */
/* We start with an arbitrarily chosen number (42), to help with
 * debugging when a packet type is not initialized or wrongly
 * initialized. */
enum MPIDI_RMA_sync_types {
    MPIDI_RMA_SYNC_NONE = 42,
    MPIDI_RMA_SYNC_FLUSH_LOCAL,
    MPIDI_RMA_SYNC_FLUSH,
    MPIDI_RMA_SYNC_UNLOCK
};

237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
/* We start with an arbitrarily chosen number (42), to help with
 * debugging when a packet type is not initialized or wrongly
 * initialized. */
enum MPIDI_RMA_states {
    /* window-wide states */
    MPIDI_RMA_NONE = 42,
    MPIDI_RMA_FENCE_ISSUED,           /* access / exposure */
    MPIDI_RMA_FENCE_GRANTED,          /* access / exposure */
    MPIDI_RMA_PSCW_ISSUED,            /* access */
    MPIDI_RMA_PSCW_GRANTED,           /* access */
    MPIDI_RMA_PSCW_EXPO,              /* exposure */
    MPIDI_RMA_PER_TARGET,             /* access */
    MPIDI_RMA_LOCK_ALL_CALLED,        /* access */
    MPIDI_RMA_LOCK_ALL_ISSUED,        /* access */
    MPIDI_RMA_LOCK_ALL_GRANTED,       /* access */

    /* target-specific states */
    MPIDI_RMA_LOCK_CALLED,            /* access */
    MPIDI_RMA_LOCK_ISSUED,            /* access */
    MPIDI_RMA_LOCK_GRANTED,           /* access */
};

Pavan Balaji's avatar
Pavan Balaji committed
259 260 261
/* We start with an arbitrarily chosen number (42), to help with
 * debugging when a packet type is not initialized or wrongly
 * initialized. */
262
enum MPIDI_CH3_Lock_states {
Pavan Balaji's avatar
Pavan Balaji committed
263
    MPIDI_CH3_WIN_LOCK_NONE = 42,
264
    MPIDI_CH3_WIN_LOCK_CALLED,
265
    MPIDI_CH3_WIN_LOCK_REQUESTED,
266 267
    MPIDI_CH3_WIN_LOCK_GRANTED,
    MPIDI_CH3_WIN_LOCK_FLUSH
268 269
};

270
enum MPIDI_Win_info_arv_vals_accumulate_ordering {
271 272 273 274 275 276
    MPIDI_ACC_ORDER_RAR = 1,
    MPIDI_ACC_ORDER_RAW = 2,
    MPIDI_ACC_ORDER_WAR = 4,
    MPIDI_ACC_ORDER_WAW = 8
};

277
enum MPIDI_Win_info_arg_vals_accumulate_ops {
278 279 280 281
    MPIDI_ACC_OPS_SAME_OP,
    MPIDI_ACC_OPS_SAME_OP_NO_OP
};

Pavan Balaji's avatar
Pavan Balaji committed
282 283 284
/* We start with an arbitrarily chosen number (42), to help with
 * debugging when a packet type is not initialized or wrongly
 * initialized. */
James Dinan's avatar
James Dinan committed
285
enum MPIDI_Win_epoch_states {
Pavan Balaji's avatar
Pavan Balaji committed
286
    MPIDI_EPOCH_NONE = 42,
James Dinan's avatar
James Dinan committed
287
    MPIDI_EPOCH_FENCE,
288 289 290
    MPIDI_EPOCH_POST,
    MPIDI_EPOCH_START,
    MPIDI_EPOCH_PSCW,           /* Both post and start have been called. */
James Dinan's avatar
James Dinan committed
291 292 293 294
    MPIDI_EPOCH_LOCK,
    MPIDI_EPOCH_LOCK_ALL
};

295
struct MPIDI_Win_info_args {
296 297 298 299 300
    int no_locks;               /* valid flavor = all */
    int accumulate_ordering;
    int accumulate_ops;
    int same_size;              /* valid flavor = allocate */
    int alloc_shared_noncontig; /* valid flavor = allocate shared */
301
    int alloc_shm;              /* valid flavor = allocate */
302 303
};

304 305
struct MPIDI_RMA_op;            /* forward decl from mpidrma.h */

306 307 308 309 310 311 312 313
typedef struct MPIDI_RMA_Pkt_orderings {
    int flush_remote; /* ordered FLUSH, for remote completion */
    /* FIXME: in future we should also add local completin
       ordering: WAW, WAR, RAW, RAR. */
} MPIDI_RMA_Pkt_orderings_t;

extern MPIDI_RMA_Pkt_orderings_t *MPIDI_RMA_Pkt_orderings;

314
struct MPIDI_Win_target_state {
315 316
    struct MPIDI_RMA_Op *rma_ops_list;
                                /* List of outstanding RMA operations */
317
    struct MPIDI_RMA_Op *rma_ops_list_tail;
318 319 320 321 322 323 324 325
    volatile enum MPIDI_CH3_Lock_states remote_lock_state;
                                /* Indicates the state of the target
                                   process' "lock" for passive target
                                   RMA. */
    int remote_lock_mode;       /* Indicates the access mode
                                   (shared/exclusive) of the target
                                   process for passive target RMA. Valid
                                   whenever state != NONE. */
326 327
    int remote_lock_assert;     /* Assertion value provided in the call
                                   to Lock */
328 329
};

330
#define MPIDI_DEV_WIN_DECL                                               \
331
    volatile int at_completion_counter;  /* completion counter for operations \
332 333 334
                                 targeting this window */                \
    void **base_addrs;     /* array of base addresses of the windows of  \
                              all processes */                           \
335 336 337
    void **shm_base_addrs; /* shared memory windows -- array of base     \
                              addresses of the windows of all processes  \
                              in this process's address space */         \
338 339 340 341 342 343 344 345
    int *disp_units;      /* array of displacement units of all windows */\
    MPI_Win *all_win_handles;    /* array of handles to the window objects\
                                          of all processes */            \
    volatile int current_lock_type;   /* current lock type on this window (as target)   \
                              * (none, shared, exclusive) */             \
    volatile int shared_lock_ref_cnt;                                    \
    struct MPIDI_Win_lock_queue volatile *lock_queue;  /* list of unsatisfied locks */  \
                                                                         \
346
    MPI_Aint *sizes;      /* array of sizes of all windows */            \
347
    struct MPIDI_Win_info_args info_args;                                \
348 349 350 351 352
    struct MPIDI_Win_target_state *targets; /* Target state and ops      \
                                               lists for passive target  \
                                               mode of operation */      \
    struct MPIDI_RMA_Op *at_rma_ops_list; /* Ops list for active target  \
                                             mode of operation. */       \
353
    struct MPIDI_RMA_Op *at_rma_ops_list_tail;                           \
James Dinan's avatar
James Dinan committed
354 355
    enum MPIDI_Win_epoch_states epoch_state;                             \
    int epoch_count;                                                     \
356
    int fence_issued;   /* Indicates if fence has been called, and if an \
357 358 359 360 361
                           active target fence epoch is possible. This   \
                           is maintained separately from the epoch state;\
                           this state must be updated collectively (in   \
                           fence) to ensure that the fence state across  \
                           all processes remains consistent. */          \
362
    MPID_Group *start_group_ptr; /* group passed in MPI_Win_start */     \
363
    int start_assert;   /* assert passed to MPI_Win_start */             \
364 365
    int shm_allocated; /* flag: TRUE iff this window has a shared memory \
                          region associated with it */                   \
366 367 368
    struct MPIDI_RMA_Op *op_pool_start; /* start pointer used for freeing */\
    struct MPIDI_RMA_Op *op_pool;  /* pool of operations */              \
    struct MPIDI_RMA_Op *op_pool_tail; /* tail pointer to pool of operations. */ \
369 370 371
    struct MPIDI_RMA_Target *target_pool_start; /* start pointer used for freeing */\
    struct MPIDI_RMA_Target *target_pool; /* pool of targets */          \
    struct MPIDI_RMA_Target *target_pool_tail; /* tail pointer to pool of targets */\
Xin Zhao's avatar
Xin Zhao committed
372 373
    struct MPIDI_RMA_Slot *slots;                                        \
    int num_slots;                                                       \
374 375 376 377
    struct {                                                             \
        enum MPIDI_RMA_states access_state;                              \
        enum MPIDI_RMA_states exposure_state;                            \
    } states;                                                            \
378
    int non_empty_slots;                                                 \
379 380 381 382
    int posted_ops_cnt; /* keep track of number of posted RMA operations \
                           in current epoch (accumulated value, not      \
                           current value) to control when to poke        \
                           progress engine in RMA operation routines. */ \
383 384 385
    int active_req_cnt; /* keep track of number of active requests in    \
                           current epoch, i.e., number of issued but     \
                           incomplete RMA operations. */                 \
386

387 388 389 390 391 392 393 394 395 396 397 398
#ifdef MPIDI_CH3_WIN_DECL
#define MPID_DEV_WIN_DECL \
MPIDI_DEV_WIN_DECL \
MPIDI_CH3_WIN_DECL
#else
#define MPID_DEV_WIN_DECL \
MPIDI_DEV_WIN_DECL
#endif


typedef struct MPIDI_Request {
    MPIDI_Message_match match;
399
    MPIDI_Message_match mask;
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417

    /* user_buf, user_count, and datatype needed to process 
       rendezvous messages. */
    void        *user_buf;
    int          user_count;
    MPI_Datatype datatype;

    /* segment, segment_first, and segment_size are used when processing 
       non-contiguous datatypes */
    /*    MPID_Segment   segment; */
    struct MPID_Segment *segment_ptr;
    MPIDI_msg_sz_t segment_first;
    MPIDI_msg_sz_t segment_size;

    /* Pointer to datatype for reference counting purposes */
    struct MPID_Datatype * datatype_ptr;

    /* iov and iov_count define the data to be transferred/received.  
418
       iov_offset points to the current head element in the IOV */
419 420
    MPID_IOV iov[MPID_IOV_LIMIT];
    int iov_count;
421
    size_t iov_offset;
422 423 424 425

    /* OnDataAvail is the action to take when data is now available.
       For example, when an operation described by an iov has 
       completed.  This replaces the MPIDI_CA_t (completion action)
426
       field used through MPICH 1.0.4. */
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441
    int (*OnDataAvail)( struct MPIDI_VC *, struct MPID_Request *, int * );
    /* OnFinal is used in the following case:
       OnDataAvail is set to a function, and that function has processed
       all of the data.  At that point, the OnDataAvail function can
       reset OnDataAvail to OnFinal.  This is normally used when processing
       non-contiguous data, where there is one more action to take (such
       as a get-response) when processing of the non-contiguous data 
       completes. This value need not be initialized unless OnDataAvail
       is set to a non-null value (and then only in certain cases) */
    int (*OnFinal)( struct MPIDI_VC *, struct MPID_Request *, int * );

    /* tmpbuf and tmpbuf_sz describe temporary storage used for things like 
       unexpected eager messages and packing/unpacking
       buffers.  tmpuf_off is the current offset into the temporary buffer. */
    void          *tmpbuf;
442
    MPIDI_msg_sz_t tmpbuf_off;
443 444 445 446 447 448 449
    MPIDI_msg_sz_t tmpbuf_sz;

    MPIDI_msg_sz_t recv_data_sz;
    MPI_Request    sender_req_id;

    unsigned int   state;
    int            cancel_pending;
450 451 452 453 454 455 456 457 458 459

    /* This field seems to be used for unexpected messages.  Unexpected messages
     * need to go through two steps: matching and receiving the data.  These
     * steps could happen in either order though, so this field is initialized
     * to 2.  It is decremented when the request is matched and also when all of
     * the data is available.  Once it reaches 0 it should be safe to copy from
     * the temporary buffer (if there is one) to the user buffer.  This field is
     * related to, but not quite the same thing as the completion counter (cc). */
    /* MT access should be controlled by the MSGQUEUE CS when the req is still
     * unexpected, exclusive access otherwise */
460 461
    int            recv_pending_count;

462
    /* The next several fields are used to hold state for ongoing RMA operations */
463 464 465 466 467 468 469 470 471 472
    MPI_Op op;
    /* For accumulate, since data is first read into a tmp_buf */
    void *real_user_buf;
    /* For derived datatypes at target */
    struct MPIDI_RMA_dtype_info *dtype_info;
    void *dataloop;
    /* req. handle needed to implement derived datatype gets  */
    MPI_Request request_handle;
    MPI_Win     target_win_handle;
    MPI_Win     source_win_handle;
James Dinan's avatar
James Dinan committed
473
    MPIDI_CH3_Pkt_flags_t flags; /* flags that were included in the original RMA packet header */
474
    struct MPIDI_Win_lock_queue *lock_queue_entry; /* for single lock-put-unlock optimization */
475
    MPI_Request resp_request_handle; /* Handle for get_accumulate response */
476 477 478 479 480 481 482 483 484

    MPIDI_REQUEST_SEQNUM

    /* Occasionally, when a message cannot be sent, we need to cache the
       data that is required.  The fields above (such as userbuf and tmpbuf)
       are used for the message data.  However, we also need space for the
       message packet. This field provide a generic location for that.
       Question: do we want to make this a link instead of reserving 
       a fixed spot in the request? */
485
    MPIDI_CH3_Pkt_t pending_pkt;
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506
    struct MPID_Request * next;
} MPIDI_Request;
#define MPID_REQUEST_DECL MPIDI_Request dev;

#if defined(MPIDI_CH3_REQUEST_DECL)
#define MPID_DEV_REQUEST_DECL			\
MPID_REQUEST_DECL				\
MPIDI_CH3_REQUEST_DECL
#else
#define MPID_DEV_REQUEST_DECL			\
MPID_REQUEST_DECL
#endif

#ifdef MPIDI_CH3_REQUEST_KIND_DECL
#define MPID_DEV_REQUEST_KIND_DECL MPIDI_CH3_REQUEST_KIND_DECL
#endif

#endif

/* FIXME: This ifndef test is a temp until mpidpre is cleaned of
   all items that do not belong (e.g., all items not needed by the
507
   top layers of MPICH) */
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526
/* FIXME: The progress routines will be made into ch3-common definitions, not
   channel specific.  Channels that need more will need to piggy back or 
   otherwise override */
#ifndef MPID_PROGRESS_STATE_DECL
#if defined(MPIDI_CH3_PROGRESS_STATE_DECL)
#   define MPID_PROGRESS_STATE_DECL MPIDI_CH3_PROGRESS_STATE_DECL
#else
#   define MPID_PROGRESS_STATE_DECL int foo;
#endif
#endif


/* Tell Intercomm create and friends that the GPID routines have been
   implemented */
#define HAVE_GPID_ROUTINES

/* Tell initthread to prepare a private comm_world */
#define MPID_NEEDS_ICOMM_WORLD

527 528 529
/* Tell the RMA code to use a table of RMA functions provided by the 
   ADI */
#define USE_MPID_RMA_TABLE
530 531 532 533

int MPIDI_RMA_init(void);
void MPIDI_RMA_finalize(void);

534
#endif /* !defined(MPICH_MPIDPRE_H_INCLUDED) */