|
Packit Service |
c5cf8c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
* (C) 2001 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#ifndef MPID_RMA_TYPES_H_INCLUDED
|
|
Packit Service |
c5cf8c |
#define MPID_RMA_TYPES_H_INCLUDED
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#include "mpidi_ch3_impl.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* Special case RMA operations */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
enum MPIDI_RMA_Datatype {
|
|
Packit Service |
c5cf8c |
MPIDI_RMA_DATATYPE_BASIC = 50,
|
|
Packit Service |
c5cf8c |
MPIDI_RMA_DATATYPE_DERIVED = 51
|
|
Packit Service |
c5cf8c |
};
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#define MPID_LOCK_NONE 60
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
* RMA Declarations. We should move these into something separate from
|
|
Packit Service |
c5cf8c |
* a Request.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
typedef enum MPIDI_RMA_Pool_type {
|
|
Packit Service |
c5cf8c |
MPIDI_RMA_POOL_WIN = 6,
|
|
Packit Service |
c5cf8c |
MPIDI_RMA_POOL_GLOBAL = 7
|
|
Packit Service |
c5cf8c |
} MPIDI_RMA_Pool_type_t;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
typedef enum MPIDI_RMA_Acc_srcbuf_kind {
|
|
Packit Service |
c5cf8c |
MPIDI_RMA_ACC_SRCBUF_DEFAULT,
|
|
Packit Service |
c5cf8c |
MPIDI_RMA_ACC_SRCBUF_PACKED
|
|
Packit Service |
c5cf8c |
} MPIDI_RMA_Acc_srcbuf_kind_t;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* for keeping track of RMA ops, which will be executed at the next sync call */
|
|
Packit Service |
c5cf8c |
typedef struct MPIDI_RMA_Op {
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Op *next; /* pointer to next element in list */
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Op *prev; /* pointer to prev element in list */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
void *origin_addr;
|
|
Packit Service |
c5cf8c |
int origin_count;
|
|
Packit Service |
c5cf8c |
MPI_Datatype origin_datatype;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
void *compare_addr;
|
|
Packit Service |
c5cf8c |
MPI_Datatype compare_datatype;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
void *result_addr;
|
|
Packit Service |
c5cf8c |
int result_count;
|
|
Packit Service |
c5cf8c |
MPI_Datatype result_datatype;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
struct MPIR_Request *single_req; /* used for unstreamed RMA ops */
|
|
Packit Service |
c5cf8c |
struct MPIR_Request **multi_reqs; /* used for streamed RMA ops */
|
|
Packit Service |
c5cf8c |
MPI_Aint reqs_size; /* when reqs_size == 0, neither single_req nor multi_reqs is used;
|
|
Packit Service |
c5cf8c |
* when reqs_size == 1, single_req is used;
|
|
Packit Service |
c5cf8c |
* when reqs_size > 1, multi_reqs is used. */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
int target_rank;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIDI_CH3_Pkt_t pkt;
|
|
Packit Service |
c5cf8c |
MPIDI_RMA_Pool_type_t pool_type;
|
|
Packit Service |
c5cf8c |
int piggyback_lock_candidate;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
int issued_stream_count; /* when >= 0, it specifies number of stream units that have been issued;
|
|
Packit Service |
c5cf8c |
* when < 0, it means all stream units of this operation haven been issued. */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIR_Request *ureq;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
} MPIDI_RMA_Op_t;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
typedef struct MPIDI_RMA_Target {
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Op *pending_net_ops_list_head; /* pending operations that are waiting for network events */
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Op *pending_user_ops_list_head; /* pending operations that are waiting for user events */
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Op *next_op_to_issue;
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Target *next;
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Target *prev;
|
|
Packit Service |
c5cf8c |
int target_rank;
|
|
Packit Service |
c5cf8c |
enum MPIDI_RMA_states access_state;
|
|
Packit Service |
c5cf8c |
int lock_type; /* NONE, SHARED, EXCLUSIVE */
|
|
Packit Service |
c5cf8c |
int lock_mode; /* e.g., MODE_NO_CHECK */
|
|
Packit Service |
c5cf8c |
int win_complete_flag;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* The target structure is free to be cleaned up when all of the
|
|
Packit Service |
c5cf8c |
* following conditions hold true:
|
|
Packit Service |
c5cf8c |
* - No operations are queued up (op_list == NULL)
|
|
Packit Service |
c5cf8c |
* - There are no outstanding acks (outstanding_acks == 0)
|
|
Packit Service |
c5cf8c |
* - There are no sync messages to be sent (sync_flag == NONE)
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
struct {
|
|
Packit Service |
c5cf8c |
/* next synchronization flag to be sent to the target (either
|
|
Packit Service |
c5cf8c |
* piggybacked or as a separate packet */
|
|
Packit Service |
c5cf8c |
enum MPIDI_RMA_sync_types sync_flag; /* UNLOCK, FLUSH or FLUSH_LOCAL */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* packets sent out that we are expecting an ack for */
|
|
Packit Service |
c5cf8c |
int outstanding_acks;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
} sync;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* number of packets that are waiting for local completion */
|
|
Packit Service |
c5cf8c |
int num_pkts_wait_for_local_completion;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* number of operations that does not have a FLUSH issued afterwards */
|
|
Packit Service |
c5cf8c |
int num_ops_flush_not_issued;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIDI_RMA_Pool_type_t pool_type;
|
|
Packit Service |
c5cf8c |
} MPIDI_RMA_Target_t;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
typedef struct MPIDI_RMA_Slot {
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Target *target_list_head;
|
|
Packit Service |
c5cf8c |
} MPIDI_RMA_Slot_t;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
typedef struct MPIDI_RMA_Target_lock_entry {
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Target_lock_entry *next;
|
|
Packit Service |
c5cf8c |
struct MPIDI_RMA_Target_lock_entry *prev;
|
|
Packit Service |
c5cf8c |
MPIDI_CH3_Pkt_t pkt; /* all information for this request packet */
|
|
Packit Service |
c5cf8c |
MPIDI_VC_t *vc;
|
|
Packit Service |
c5cf8c |
void *data; /* for queued PUTs / ACCs / GACCs, data is copied here */
|
|
Packit Service |
c5cf8c |
int buf_size;
|
|
Packit Service |
c5cf8c |
int all_data_recved; /* indicate if all data has been received */
|
|
Packit Service |
c5cf8c |
} MPIDI_RMA_Target_lock_entry_t;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
typedef MPIDI_RMA_Op_t *MPIDI_RMA_Ops_list_t;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#endif /* MPID_RMA_TYPES_H_INCLUDED */
|