1
#ifndef __ARMCI_ONESIDED_H__
2
#define __ARMCI_ONESIDED_H__
6
#define NUM_SERV_BUFS 1
7
#define MAX_MEM_REGIONS 30
9
#define ARMCI_BUF_SIZE 262144
10
#define ARMCI_SMALL_BUF_SIZE 2048
12
#define ARMCI_MAX_BUFS 4
13
#define ARMCI_MAX_SMALL_BUFS 8
15
#define ARMCI_MAX_DESCRIPTORS (ARMCI_MAX_BUFS+ARMCI_MAX_SMALL_BUFS)
16
#define ARMCI_MAX_REQUEST_SIZE ARMCI_SMALL_BUF_SIZE
19
There is a problem with ga_transpose when CRAY_REGISTER_ARMCI_MALLOC
22
The fix is a special hook in ga_transpose to turn off the direct puts
23
during the transpose. This may indicate a race condition in the
24
transpose code or a problem with the direct fencing.
26
#define CRAY_REGISTER_ARMCI_MALLOC
27
#define ARMCI_LIMIT_REMOTE_REQUESTS_BY_NODE_TURNED_OFF
28
#define MAX_OUTSTANDING_ONESIDED_GETS 64
30
#define ARMCI_ONESIDED_GETS_USES_NBGETS
34
typedef struct armci_onesided_msg_tag_s {
36
cos_mdesc_t response_mdesc;
37
} armci_onesided_msg_tag_t;
40
typedef struct remote_mdh_node {
43
struct remote_mdh_node *next;
46
// linked-list of remote mdhs
47
// a new node is created on each ARMCI_Malloc operation
48
// not an ideal scenario -- perhaps use Abhinav's new dreg routines
49
// to store this data ... it would require two pieces of info ...
50
// remote target and remote virtual addr ... and return the mdh
51
// for now: manually look up the mdh in ARMCI_GetS and ARMCI_PutS
52
extern remote_mdh_node_t *remote_mdh_base_node;
55
int armci_onesided_init();
56
void armci_transport_cleanup();
57
void armci_rcv_req(void *,void *,void *,void *,int *);
59
void print_data(void *);
61
void armci_onesided_search_remote_mdh_list(void* tgt_ptr, int proc, cos_mdesc_t *mdh);
62
void armci_onesided_remove_from_remote_mdh_list(void *tgt_ptr);
64
#if defined CRAY_REGISTER_ARMCI_MALLOC && HAVE_ONESIDED_FADD
65
void armci_onesided_fadd(void *ploc, void *prem, int extra, int proc);
68
extern int armci_onesided_direct_get_enabled;
69
extern int armci_onesided_direct_put_enabled;
70
extern cos_desc_t __global_1sided_direct_comm_desc;
71
extern cos_desc_t __global_1sided_direct_get_comm_desc;
74
/* set up internals */
77
#error "MAX_BUFS should not be defined yet"
79
#define MAX_BUFS ARMCI_MAX_BUFS
83
#error "MAX_SMALL_BUFS should not be defined yet"
85
#define MAX_SMALL_BUFS ARMCI_MAX_SMALL_BUFS
89
#error "MSG_BUFLEN_DBL should not be defined yet"
91
#define MSG_BUFLEN_DBL ARMCI_BUF_SIZE
97
extern char **client_buf_ptrs;
98
#define BUF_ALLOCATE armci_portals_client_buf_allocate
99
//define BUF_EXTRA_FIELD_T comp_desc*
100
//define INIT_SEND_BUF(_field,_snd,_rcv) _snd=1;_rcv=1;_field=NULL
101
#define GET_SEND_BUFFER _armci_buf_get
102
#define FREE_SEND_BUFFER _armci_buf_release
104
//define CLEAR_SEND_BUF_FIELD(_field,_snd,_rcv,_to,_op) if((_op==UNLOCK || _op==PUT || ARMCI_ACC(_op)) && _field!=NULL)x_buf_wait_ack((request_header_t *)((void **)&(_field)+1),((char *)&(_field)-sizeof(BUF_INFO_T)));_field=NULL;
105
//define TEST_SEND_BUF_FIELD(_field,_snd,_rcv,_to,_op,_ret)
107
#define CLEAR_SEND_BUF_FIELD(_field,_snd,_rcv,_to,_op)
108
#define TEST_SEND_BUF_FIELD(_field,_snd,_rcv,_to,_op,_ret)
110
#define COMPLETE_HANDLE _armci_buf_complete_nb_request
112
//define NB_CMPL_T comp_desc*
114
#define ARMCI_NB_WAIT(_cntr) if(_cntr){\
117
if(nb_handle->tag==_cntr->tag)\
118
rc = armci_client_complete(0,nb_handle->proc,nb_handle->tag,_cntr);\
120
printf("\n%d:wait null ctr\n",armci_me);}
122
#define ARMCI_NB_WAIT(_cntr)