| 1 |
/* |
| 2 |
* Copyright (c) 2007-2011 Intel Corporation. All rights reserved. |
| 3 |
* |
| 4 |
* This Software is licensed under one of the following licenses: |
| 5 |
* |
| 6 |
* 1) under the terms of the "Common Public License 1.0" a copy of which is |
| 7 |
* in the file LICENSE.txt in the root directory. The license is also |
| 8 |
* available from the Open Source Initiative, see |
| 9 |
* http://www.opensource.org/licenses/cpl.php. |
| 10 |
* |
| 11 |
* 2) under the terms of the "The BSD License" a copy of which is in the file |
| 12 |
* LICENSE2.txt in the root directory. The license is also available from |
| 13 |
* the Open Source Initiative, see |
| 14 |
* http://www.opensource.org/licenses/bsd-license.php. |
| 15 |
* |
| 16 |
* 3) under the terms of the "GNU General Public License (GPL) Version 2" a |
| 17 |
* copy of which is in the file LICENSE3.txt in the root directory. The |
| 18 |
* license is also available from the Open Source Initiative, see |
| 19 |
* http://www.opensource.org/licenses/gpl-license.php. |
| 20 |
* |
| 21 |
* Licensee has the right to choose one of the above licenses. |
| 22 |
* |
| 23 |
* Redistributions of source code must retain the above copyright |
| 24 |
* notice and one of the license notices. |
| 25 |
* |
| 26 |
* Redistributions in binary form must reproduce both the above copyright |
| 27 |
* notice, one of the license notices in the documentation |
| 28 |
* and/or other materials provided with the distribution. |
| 29 |
*/ |
| 30 |
|
| 31 |
/********************************************************************** |
| 32 |
* |
| 33 |
* HEADER: dat_ib_extensions.h |
| 34 |
* |
| 35 |
* PURPOSE: extensions to the DAT API for IB transport specific services |
| 36 |
* NOTE: Prototyped IB extension support in openib-cma 1.2 provider. |
| 37 |
* Applications MUST recompile with new dat.h definitions |
| 38 |
* and include this file. |
| 39 |
* |
| 40 |
* Description: Header file for "uDAPL: User Direct Access Programming |
| 41 |
* Library, Version: 2.0" |
| 42 |
* |
| 43 |
* Mapping rules: |
| 44 |
* All global symbols are prepended with "DAT_" or "dat_" |
| 45 |
* All DAT objects have an 'api' tag which, such as 'ep' or 'lmr' |
| 46 |
* The method table is in the provider definition structure. |
| 47 |
* |
| 48 |
* |
| 49 |
**********************************************************************/ |
| 50 |
#ifndef _DAT_IB_EXTENSIONS_H_ |
| 51 |
#define _DAT_IB_EXTENSIONS_H_ |
| 52 |
|
| 53 |
/* |
| 54 |
* Provider specific attribute strings for extension support |
| 55 |
* returned with dat_ia_query() and |
| 56 |
* DAT_PROVIDER_ATTR_MASK == DAT_PROVIDER_FIELD_PROVIDER_SPECIFIC_ATTR |
| 57 |
* |
| 58 |
* DAT_NAMED_ATTR name == extended operations and version, |
| 59 |
* version_value = version number of extension API |
| 60 |
*/ |
| 61 |
|
| 62 |
/* 2.0.1 - Initial IB extension support, atomic and immed data |
| 63 |
* dat_ib_post_fetch_and_add() |
| 64 |
* dat_ib_post_cmp_and_swap() |
| 65 |
* dat_ib_post_rdma_write_immed() |
| 66 |
* |
| 67 |
* 2.0.2 - Add UD support, post send and remote_ah via connect events |
| 68 |
* dat_ib_post_send_ud() |
| 69 |
* |
| 70 |
* 2.0.3 - Add query/print counter support for IA, EP, and EVD's |
| 71 |
* dat_query_counters(), dat_print_counters() |
| 72 |
* |
| 73 |
* 2.0.4 - Add DAT_IB_UD_CONNECTION_REJECT_EVENT extended UD event |
| 74 |
* 2.0.5 - Add DAT_IB_UD extended UD connection error events |
| 75 |
* 2.0.6 - Add MPI over IB collective extensions |
| 76 |
* 2.0.7 - Add new IA counters for dapl CM, device LINK, device DIAG |
| 77 |
* 2.0.8 - Add DAT_IB_OPEN_QUERY_OP, DAT_IB_CLOSE_QUERY_OP, fast provider query interface |
| 78 |
* 2.0.9 - Add DAT_IB_UD_CM_FREE and DAT_IB_UD_AH_FREE |
| 79 |
*/ |
| 80 |
#define DAT_IB_EXTENSION_VERSION 209 /* 2.0.9 */ |
| 81 |
#define DAT_IB_ATTR_COUNTERS "DAT_COUNTERS" |
| 82 |
#define DAT_IB_ATTR_FETCH_AND_ADD "DAT_IB_FETCH_AND_ADD" |
| 83 |
#define DAT_IB_ATTR_CMP_AND_SWAP "DAT_IB_CMP_AND_SWAP" |
| 84 |
#define DAT_IB_ATTR_IMMED_DATA "DAT_IB_IMMED_DATA" |
| 85 |
#define DAT_IB_ATTR_UD "DAT_IB_UD" |
| 86 |
|
| 87 |
#define DAT_IB_COLL_SET_CLOCK "DAT_COLL_SET_CLOCK" |
| 88 |
#define DAT_IB_COLL_READ_CLOCK "DAT_COLL_READ_CLOCK" |
| 89 |
#define DAT_IB_COLL_BROADCAST "DAT_COLL_BROADCAST" |
| 90 |
#define DAT_IB_COLL_BARRIER "DAT_COLL_BARRIER" |
| 91 |
#define DAT_IB_COLL_SCATTER "DAT_COLL_SCATTER" |
| 92 |
#define DAT_IB_COLL_SCATTERV "DAT_COLL_SCATTERV" |
| 93 |
#define DAT_IB_COLL_GATHER "DAT_COLL_GATHER" |
| 94 |
#define DAT_IB_COLL_GATHERV "DAT_COLL_GATHERV" |
| 95 |
#define DAT_IB_COLL_ALLGATHER "DAT_COLL_ALLGATHER" |
| 96 |
#define DAT_IB_COLL_ALLGATHERV "DAT_COLL_ALLGATHERV" |
| 97 |
#define DAT_IB_COLL_ALLTOALL "DAT_COLL_ALLTOALL" |
| 98 |
#define DAT_IB_COLL_ALLTOALLV "DAT_COLL_ALLTOALLV" |
| 99 |
#define DAT_IB_COLL_REDUCE "DAT_COLL_REDUCE" |
| 100 |
#define DAT_IB_COLL_ALLREDUCE "DAT_COLL_ALLREDUCE" |
| 101 |
#define DAT_IB_COLL_REDUCE_SCATTER "DAT_COLL_REDUCE_SCATTER" |
| 102 |
#define DAT_IB_COLL_SCAN "DAT_COLL_SCAN" |
| 103 |
|
| 104 |
/* Collective handle */ |
| 105 |
typedef DAT_HANDLE DAT_IB_COLLECTIVE_HANDLE; |
| 106 |
|
| 107 |
/* |
| 108 |
* Definition for extended EVENT numbers, DAT_IB_EXTENSION_BASE_RANGE |
| 109 |
* is used by these extensions as a starting point for extended event numbers |
| 110 |
* |
| 111 |
* DAT_IB_DTO_EVENT - All extended data transfers - req/recv evd |
| 112 |
* DAT_IB_AH_EVENT - address handle resolution - connect evd |
| 113 |
*/ |
| 114 |
typedef enum dat_ib_event_number |
| 115 |
{ |
| 116 |
DAT_IB_DTO_EVENT = DAT_IB_EXTENSION_RANGE_BASE, |
| 117 |
DAT_IB_UD_CONNECTION_REQUEST_EVENT, |
| 118 |
DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED, |
| 119 |
DAT_IB_UD_CONNECTION_REJECT_EVENT, |
| 120 |
DAT_IB_UD_CONNECTION_ERROR_EVENT, |
| 121 |
DAT_IB_COLLECTIVE_EVENT, |
| 122 |
|
| 123 |
} DAT_IB_EVENT_NUMBER; |
| 124 |
|
| 125 |
/* |
| 126 |
* Extension operations |
| 127 |
*/ |
| 128 |
typedef enum dat_ib_op |
| 129 |
{ |
| 130 |
DAT_IB_FETCH_AND_ADD_OP, |
| 131 |
DAT_IB_CMP_AND_SWAP_OP, |
| 132 |
DAT_IB_RDMA_WRITE_IMMED_OP, |
| 133 |
DAT_IB_UD_SEND_OP, |
| 134 |
DAT_IB_QUERY_COUNTERS_OP, |
| 135 |
DAT_IB_PRINT_COUNTERS_OP, |
| 136 |
DAT_IB_COLLECTIVE_CREATE_MEMBER_OP, |
| 137 |
DAT_IB_COLLECTIVE_FREE_MEMBER_OP, |
| 138 |
DAT_IB_COLLECTIVE_CREATE_GROUP_OP, |
| 139 |
DAT_IB_COLLECTIVE_FREE_GROUP_OP, |
| 140 |
DAT_IB_COLLECTIVE_SET_CLOCK_OP, |
| 141 |
DAT_IB_COLLECTIVE_READ_CLOCK_OP, |
| 142 |
DAT_IB_COLLECTIVE_SCATTER_OP, |
| 143 |
DAT_IB_COLLECTIVE_SCATTERV_OP, |
| 144 |
DAT_IB_COLLECTIVE_GATHER_OP, |
| 145 |
DAT_IB_COLLECTIVE_GATHERV_OP, |
| 146 |
DAT_IB_COLLECTIVE_ALLGATHER_OP, |
| 147 |
DAT_IB_COLLECTIVE_ALLGATHERV_OP, |
| 148 |
DAT_IB_COLLECTIVE_ALLTOALL_OP, |
| 149 |
DAT_IB_COLLECTIVE_ALLTOALLV_OP, |
| 150 |
DAT_IB_COLLECTIVE_REDUCE_OP, |
| 151 |
DAT_IB_COLLECTIVE_ALLREDUCE_OP, |
| 152 |
DAT_IB_COLLECTIVE_REDUCE_SCATTER_OP, |
| 153 |
DAT_IB_COLLECTIVE_SCAN_OP, |
| 154 |
DAT_IB_COLLECTIVE_BROADCAST_OP, |
| 155 |
DAT_IB_COLLECTIVE_BARRIER_OP, |
| 156 |
DAT_IB_START_COUNTERS_OP, |
| 157 |
DAT_IB_STOP_COUNTERS_OP, |
| 158 |
DAT_IB_UD_CM_FREE_OP, |
| 159 |
DAT_IB_UD_AH_FREE_OP, |
| 160 |
/* OPEN and CLOSE extensions require DAT support, set proper range */ |
| 161 |
DAT_IB_OPEN_QUERY_OP = DAT_OPEN_EXTENSION_BASE, |
| 162 |
DAT_IB_CLOSE_QUERY_OP = DAT_CLOSE_EXTENSION_BASE, |
| 163 |
|
| 164 |
} DAT_IB_OP; |
| 165 |
|
| 166 |
/* |
| 167 |
* The DAT_IB_EXT_TYPE enum specifies the type of extension operation that just |
| 168 |
* completed. All IB extended completion types both, DTO and NON-DTO, are |
| 169 |
* reported in the extended operation type with the single DAT_IB_DTO_EVENT type. |
| 170 |
* The specific extended DTO operation is reported with a DAT_IB_DTOS type in the |
| 171 |
* operation field of the base DAT_EVENT structure. All other extended events are |
| 172 |
* identified by unique DAT_IB_EVENT_NUMBER types. |
| 173 |
*/ |
| 174 |
typedef enum dat_ib_ext_type |
| 175 |
{ |
| 176 |
DAT_IB_FETCH_AND_ADD, // 0 |
| 177 |
DAT_IB_CMP_AND_SWAP, // 1 |
| 178 |
DAT_IB_RDMA_WRITE_IMMED, // 2 |
| 179 |
DAT_IB_RDMA_WRITE_IMMED_DATA, // 3 |
| 180 |
DAT_IB_RECV_IMMED_DATA, // 4 |
| 181 |
DAT_IB_UD_CONNECT_REQUEST, // 5 |
| 182 |
DAT_IB_UD_REMOTE_AH, // 6 |
| 183 |
DAT_IB_UD_PASSIVE_REMOTE_AH, // 7 |
| 184 |
DAT_IB_UD_SEND, // 8 |
| 185 |
DAT_IB_UD_RECV, // 9 |
| 186 |
DAT_IB_UD_CONNECT_REJECT, // 10 |
| 187 |
DAT_IB_UD_CONNECT_ERROR, // 11 |
| 188 |
|
| 189 |
DAT_IB_COLLECTIVE_CREATE_STATUS, // 12 |
| 190 |
DAT_IB_COLLECTIVE_CREATE_DATA, // 13 |
| 191 |
DAT_IB_COLLECTIVE_CLOCK_SET_STATUS, // 14 |
| 192 |
DAT_IB_COLLECTIVE_SCATTER_STATUS, // 15 |
| 193 |
DAT_IB_COLLECTIVE_SCATTERV_STATUS, // 16 |
| 194 |
DAT_IB_COLLECTIVE_GATHER_STATUS, // 17 |
| 195 |
DAT_IB_COLLECTIVE_GATHERV_STATUS, // 18 |
| 196 |
DAT_IB_COLLECTIVE_ALLGATHER_STATUS, // 19 |
| 197 |
DAT_IB_COLLECTIVE_ALLGATHERV_STATUS, // 20 |
| 198 |
DAT_IB_COLLECTIVE_ALLTOALL_STATUS, // 21 |
| 199 |
DAT_IB_COLLECTIVE_ALLTOALLV_STATUS, // 22 |
| 200 |
DAT_IB_COLLECTIVE_REDUCE_STATUS, // 23 |
| 201 |
DAT_IB_COLLECTIVE_ALLREDUCE_STATUS, // 24 |
| 202 |
DAT_IB_COLLECTIVE_REDUCE_SCATTER_STATUS,// 25 |
| 203 |
DAT_IB_COLLECTIVE_SCAN_STATUS, // 26 |
| 204 |
DAT_IB_COLLECTIVE_BROADCAST_STATUS, // 27 |
| 205 |
DAT_IB_COLLECTIVE_BARRIER_STATUS, // 28 |
| 206 |
|
| 207 |
} DAT_IB_EXT_TYPE; |
| 208 |
|
| 209 |
/* |
| 210 |
* Extension event status |
| 211 |
*/ |
| 212 |
typedef enum dat_ib_status |
| 213 |
{ |
| 214 |
DAT_OP_SUCCESS = DAT_SUCCESS, |
| 215 |
DAT_IB_OP_ERR, |
| 216 |
DAT_IB_COLL_COMP_ERR, |
| 217 |
|
| 218 |
} DAT_IB_STATUS; |
| 219 |
|
| 220 |
/* |
| 221 |
* Definitions for additional extension type RETURN codes above |
| 222 |
* standard DAT types. Included with standard DAT_TYPE_STATUS |
| 223 |
* bits using a DAT_EXTENSION BASE as a starting point. |
| 224 |
*/ |
| 225 |
typedef enum dat_ib_return |
| 226 |
{ |
| 227 |
DAT_IB_ERR = DAT_EXTENSION_BASE, |
| 228 |
DAT_IB_COLLECTIVE_ERR |
| 229 |
|
| 230 |
} DAT_IB_RETURN; |
| 231 |
|
| 232 |
/* |
| 233 |
* Definition for extended IB DTO operations, DAT_DTO_EXTENSION_BASE |
| 234 |
* is used by DAT extensions as a starting point of extension DTOs |
| 235 |
*/ |
| 236 |
typedef enum dat_ib_dtos |
| 237 |
{ |
| 238 |
DAT_IB_DTO_RDMA_WRITE_IMMED = DAT_DTO_EXTENSION_BASE, |
| 239 |
DAT_IB_DTO_RECV_IMMED, |
| 240 |
DAT_IB_DTO_FETCH_ADD, |
| 241 |
DAT_IB_DTO_CMP_SWAP, |
| 242 |
DAT_IB_DTO_RECV_MSG_IMMED, |
| 243 |
DAT_IB_DTO_SEND_UD, |
| 244 |
DAT_IB_DTO_RECV_UD, |
| 245 |
DAT_IB_DTO_RECV_UD_IMMED, |
| 246 |
DAT_IB_DTO_COLLECTIVES, |
| 247 |
|
| 248 |
} DAT_IB_DTOS; |
| 249 |
|
| 250 |
/* |
| 251 |
* Definitions for additional extension handle types beyond |
| 252 |
* standard DAT handle. New Bit definitions MUST start at |
| 253 |
* DAT_HANDLE_TYPE_EXTENSION_BASE |
| 254 |
*/ |
| 255 |
typedef enum dat_ib_handle_type |
| 256 |
{ |
| 257 |
DAT_IB_HANDLE_TYPE_EXT = DAT_HANDLE_TYPE_EXTENSION_BASE, |
| 258 |
DAT_IB_HANDLE_TYPE_COLLECTIVE |
| 259 |
|
| 260 |
} DAT_IB_HANDLE_TYPE; |
| 261 |
|
| 262 |
/* |
| 263 |
* The DAT_IB_EVD_EXTENSION_FLAGS enum specifies the EVD extension flags that |
| 264 |
* do not map directly to existing DAT_EVD_FLAGS. This new EVD flag has been |
| 265 |
* added to identify an extended EVD that does not fit the existing stream |
| 266 |
* types. |
| 267 |
*/ |
| 268 |
typedef enum dat_ib_evd_extension_flags |
| 269 |
{ |
| 270 |
DAT_IB_EVD_EXTENSION_FLAG = DAT_EVD_EXTENSION_BASE, |
| 271 |
|
| 272 |
} DAT_IB_EVD_EXTENSION_FLAGS; |
| 273 |
|
| 274 |
/* |
| 275 |
* Definition for memory privilege extension flags. |
| 276 |
* New privileges required for new atomic DTO type extensions. |
| 277 |
* New Bit definitions MUST start at DAT_MEM_PRIV_EXTENSION |
| 278 |
*/ |
| 279 |
typedef enum dat_ib_mem_priv_flags |
| 280 |
{ |
| 281 |
DAT_IB_MEM_PRIV_REMOTE_ATOMIC = DAT_MEM_PRIV_EXTENSION_BASE, |
| 282 |
|
| 283 |
} DAT_IB_MEM_PRIV_FLAGS; |
| 284 |
|
| 285 |
/* |
| 286 |
* Definition for IB address handle, unreliable datagram. |
| 287 |
*/ |
| 288 |
typedef struct dat_ib_addr_handle |
| 289 |
{ |
| 290 |
struct ibv_ah *ah; |
| 291 |
DAT_UINT32 qpn; |
| 292 |
DAT_SOCK_ADDR6 ia_addr; |
| 293 |
|
| 294 |
} DAT_IB_ADDR_HANDLE; |
| 295 |
|
| 296 |
/* |
| 297 |
* Definition for the value filed of extended event that contains immediate data |
| 298 |
*/ |
| 299 |
typedef struct dat_ib_immed_data |
| 300 |
{ |
| 301 |
DAT_UINT32 data; |
| 302 |
|
| 303 |
} DAT_IB_IMMED_DATA; |
| 304 |
|
| 305 |
/* definition for IB collective event data */ |
| 306 |
typedef struct dat_ib_collective_event_data |
| 307 |
{ |
| 308 |
DAT_HANDLE handle; |
| 309 |
DAT_CONTEXT context; |
| 310 |
|
| 311 |
} DAT_IB_COLLECTIVE_EVENT_DATA; |
| 312 |
|
| 313 |
/* |
| 314 |
* Definitions for extended event data: |
| 315 |
* When dat_event->event_number >= DAT_IB_EXTENSION_BASE_RANGE |
| 316 |
* then dat_event->extension_data == DAT_IB_EXTENSION_EVENT_DATA type |
| 317 |
* and ((DAT_IB_EXTENSION_EVENT_DATA*)dat_event->extension_data)->type |
| 318 |
* specifies extension data values. |
| 319 |
* NOTE: DAT_IB_EXTENSION_EVENT_DATA cannot exceed 64 bytes as defined by |
| 320 |
* "DAT_UINT64 extension_data[8]" in DAT_EVENT (dat.h) |
| 321 |
* |
| 322 |
* DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED |
| 323 |
* UD address and CM handles via extended UD connect establishment. |
| 324 |
* ia_addr provided with extended conn events for reference. |
| 325 |
* CM handle provided via context, for dat_ib_ud_cm_release(). |
| 326 |
* AH provided via remote_ah, for dat_ib_ud_ah_destroy(). |
| 327 |
* NOTE: if CM released, AH must be destroy before dat_ep_free. |
| 328 |
*/ |
| 329 |
typedef struct dat_ib_extension_event_data |
| 330 |
{ |
| 331 |
DAT_IB_EXT_TYPE type; |
| 332 |
DAT_IB_STATUS status; |
| 333 |
union { |
| 334 |
DAT_IB_IMMED_DATA immed; |
| 335 |
} val; |
| 336 |
union { |
| 337 |
DAT_IB_ADDR_HANDLE remote_ah; |
| 338 |
DAT_IB_COLLECTIVE_EVENT_DATA coll; |
| 339 |
}; |
| 340 |
DAT_CONTEXT context; |
| 341 |
|
| 342 |
} DAT_IB_EXTENSION_EVENT_DATA; |
| 343 |
|
| 344 |
/* |
| 345 |
* Definitions for additional extension handle types beyond |
| 346 |
* standard DAT handle. New Bit definitions MUST start at |
| 347 |
* DAT_HANDLE_TYPE_EXTENSION_BASE |
| 348 |
*/ |
| 349 |
typedef enum dat_ib_service_type |
| 350 |
{ |
| 351 |
DAT_IB_SERVICE_TYPE_UD = DAT_SERVICE_TYPE_EXTENSION_BASE, |
| 352 |
|
| 353 |
} DAT_IB_SERVICE_TYPE; |
| 354 |
|
| 355 |
/* |
| 356 |
* Definitions for 64-bit IA Counters |
| 357 |
*/ |
| 358 |
typedef enum dat_ia_counters |
| 359 |
{ |
| 360 |
DCNT_IA_PZ_CREATE, |
| 361 |
DCNT_IA_PZ_FREE, |
| 362 |
DCNT_IA_LMR_CREATE, |
| 363 |
DCNT_IA_LMR_FREE, |
| 364 |
DCNT_IA_RMR_CREATE, |
| 365 |
DCNT_IA_RMR_FREE, |
| 366 |
DCNT_IA_PSP_CREATE, |
| 367 |
DCNT_IA_PSP_CREATE_ANY, |
| 368 |
DCNT_IA_PSP_FREE, |
| 369 |
DCNT_IA_RSP_CREATE, |
| 370 |
DCNT_IA_RSP_FREE, |
| 371 |
DCNT_IA_EVD_CREATE, |
| 372 |
DCNT_IA_EVD_FREE, |
| 373 |
DCNT_IA_EP_CREATE, |
| 374 |
DCNT_IA_EP_FREE, |
| 375 |
DCNT_IA_SRQ_CREATE, |
| 376 |
DCNT_IA_SRQ_FREE, |
| 377 |
DCNT_IA_SP_CR, |
| 378 |
DCNT_IA_SP_CR_ACCEPTED, |
| 379 |
DCNT_IA_SP_CR_REJECTED, |
| 380 |
DCNT_IA_MEM_ALLOC, |
| 381 |
DCNT_IA_MEM_ALLOC_DATA, |
| 382 |
DCNT_IA_MEM_FREE, |
| 383 |
DCNT_IA_ASYNC_ERROR, |
| 384 |
DCNT_IA_ASYNC_QP_ERROR, |
| 385 |
DCNT_IA_ASYNC_CQ_ERROR, |
| 386 |
DCNT_IA_CM_LISTEN, |
| 387 |
DCNT_IA_CM_REQ_TX, |
| 388 |
DCNT_IA_CM_REQ_RX, |
| 389 |
DCNT_IA_CM_REP_TX, |
| 390 |
DCNT_IA_CM_REP_RX, |
| 391 |
DCNT_IA_CM_RTU_TX, |
| 392 |
DCNT_IA_CM_RTU_RX, |
| 393 |
DCNT_IA_CM_USER_REJ_TX, |
| 394 |
DCNT_IA_CM_USER_REJ_RX, |
| 395 |
DCNT_IA_CM_ACTIVE_EST, |
| 396 |
DCNT_IA_CM_PASSIVE_EST, |
| 397 |
DCNT_IA_CM_AH_REQ_TX, |
| 398 |
DCNT_IA_CM_AH_REQ_RX, |
| 399 |
DCNT_IA_CM_AH_RESOLVED, |
| 400 |
DCNT_IA_CM_DREQ_TX, |
| 401 |
DCNT_IA_CM_DREQ_RX, |
| 402 |
DCNT_IA_CM_DREP_TX, |
| 403 |
DCNT_IA_CM_DREP_RX, |
| 404 |
DCNT_IA_CM_MRA_TX, |
| 405 |
DCNT_IA_CM_MRA_RX, |
| 406 |
DCNT_IA_CM_REQ_FULLQ_POLL, |
| 407 |
DCNT_IA_CM_ERR, |
| 408 |
DCNT_IA_CM_ERR_REQ_FULLQ, |
| 409 |
DCNT_IA_CM_ERR_REQ_DUP, |
| 410 |
DCNT_IA_CM_ERR_REQ_RETRY, |
| 411 |
DCNT_IA_CM_ERR_REP_DUP, |
| 412 |
DCNT_IA_CM_ERR_REP_RETRY, |
| 413 |
DCNT_IA_CM_ERR_RTU_DUP, |
| 414 |
DCNT_IA_CM_ERR_RTU_RETRY, |
| 415 |
DCNT_IA_CM_ERR_REFUSED, |
| 416 |
DCNT_IA_CM_ERR_RESET, |
| 417 |
DCNT_IA_CM_ERR_TIMEOUT, |
| 418 |
DCNT_IA_CM_ERR_REJ_TX, |
| 419 |
DCNT_IA_CM_ERR_REJ_RX, |
| 420 |
DCNT_IA_CM_ERR_DREQ_DUP, |
| 421 |
DCNT_IA_CM_ERR_DREQ_RETRY, |
| 422 |
DCNT_IA_CM_ERR_DREP_DUP, |
| 423 |
DCNT_IA_CM_ERR_DREP_RETRY, |
| 424 |
DCNT_IA_CM_ERR_MRA_DUP, |
| 425 |
DCNT_IA_CM_ERR_MRA_RETRY, |
| 426 |
DCNT_IA_CM_ERR_UNEXPECTED, |
| 427 |
DCNT_IA_LNK_ERR_RCV, |
| 428 |
DCNT_IA_LNK_ERR_RCV_REM_PHYS, |
| 429 |
DCNT_IA_LNK_ERR_RCV_CONSTRAINT, |
| 430 |
DCNT_IA_LNK_ERR_XMT_DISCARDS, |
| 431 |
DCNT_IA_LNK_ERR_XMT_CONTRAINT, |
| 432 |
DCNT_IA_LNK_ERR_INTEGRITY, |
| 433 |
DCNT_IA_LNK_ERR_EXC_BUF_OVERRUN, |
| 434 |
DCNT_IA_LNK_WARN_RCV_SW_RELAY, |
| 435 |
DCNT_IA_LNK_WARN_XMT_WAIT, |
| 436 |
DCNT_IA_DIAG_ERR_RQ_RAE, |
| 437 |
DCNT_IA_DIAG_ERR_RQ_OOS, |
| 438 |
DCNT_IA_DIAG_ERR_RQ_RIRE, |
| 439 |
DCNT_IA_DIAG_ERR_RQ_UDSDPRD, |
| 440 |
DCNT_IA_DIAG_ERR_SQ_RAE, |
| 441 |
DCNT_IA_DIAG_ERR_SQ_OOS, |
| 442 |
DCNT_IA_DIAG_ERR_SQ_RIRE, |
| 443 |
DCNT_IA_DIAG_ERR_SQ_RREE, |
| 444 |
DCNT_IA_DIAG_ERR_SQ_TREE, |
| 445 |
DCNT_IA_ALL_COUNTERS, /* MUST be last */ |
| 446 |
|
| 447 |
} DAT_IA_COUNTERS; |
| 448 |
|
| 449 |
/* |
| 450 |
* Definitions for 64-bit EP Counters |
| 451 |
*/ |
| 452 |
typedef enum dat_ep_counters |
| 453 |
{ |
| 454 |
DCNT_EP_CONNECT, |
| 455 |
DCNT_EP_DISCONNECT, |
| 456 |
DCNT_EP_POST_SEND, |
| 457 |
DCNT_EP_POST_SEND_DATA, |
| 458 |
DCNT_EP_POST_SEND_UD, |
| 459 |
DCNT_EP_POST_SEND_UD_DATA, |
| 460 |
DCNT_EP_POST_RECV, |
| 461 |
DCNT_EP_POST_RECV_DATA, |
| 462 |
DCNT_EP_POST_WRITE, |
| 463 |
DCNT_EP_POST_WRITE_DATA, |
| 464 |
DCNT_EP_POST_WRITE_IMM, |
| 465 |
DCNT_EP_POST_WRITE_IMM_DATA, |
| 466 |
DCNT_EP_POST_READ, |
| 467 |
DCNT_EP_POST_READ_DATA, |
| 468 |
DCNT_EP_POST_CMP_SWAP, |
| 469 |
DCNT_EP_POST_FETCH_ADD, |
| 470 |
DCNT_EP_RECV, |
| 471 |
DCNT_EP_RECV_DATA, |
| 472 |
DCNT_EP_RECV_UD, |
| 473 |
DCNT_EP_RECV_UD_DATA, |
| 474 |
DCNT_EP_RECV_IMM, |
| 475 |
DCNT_EP_RECV_IMM_DATA, |
| 476 |
DCNT_EP_RECV_RDMA_IMM, |
| 477 |
DCNT_EP_RECV_RDMA_IMM_DATA, |
| 478 |
DCNT_EP_ALL_COUNTERS, /* MUST be last */ |
| 479 |
|
| 480 |
} DAT_EP_COUNTERS; |
| 481 |
|
| 482 |
/* |
| 483 |
* Definitions for 64-bit EVD Counters |
| 484 |
*/ |
| 485 |
typedef enum dat_evd_counters |
| 486 |
{ |
| 487 |
DCNT_EVD_WAIT, |
| 488 |
DCNT_EVD_WAIT_BLOCKED, |
| 489 |
DCNT_EVD_WAIT_NOTIFY, |
| 490 |
DCNT_EVD_DEQUEUE, |
| 491 |
DCNT_EVD_DEQUEUE_FOUND, |
| 492 |
DCNT_EVD_DEQUEUE_NOT_FOUND, |
| 493 |
DCNT_EVD_DEQUEUE_POLL, |
| 494 |
DCNT_EVD_DEQUEUE_POLL_FOUND, |
| 495 |
DCNT_EVD_CONN_CALLBACK, |
| 496 |
DCNT_EVD_DTO_CALLBACK, |
| 497 |
DCNT_EVD_ALL_COUNTERS, /* MUST be last */ |
| 498 |
|
| 499 |
} DAT_EVD_COUNTERS; |
| 500 |
|
| 501 |
/* |
| 502 |
* Definitions IA Counter Types |
| 503 |
* for sampling running counters |
| 504 |
* |
| 505 |
*/ |
| 506 |
typedef enum dat_ia_counter_type |
| 507 |
{ |
| 508 |
DCNT_IA_CM, |
| 509 |
DCNT_IA_LNK, |
| 510 |
DCNT_IA_DIAG, |
| 511 |
|
| 512 |
} DAT_IA_COUNTER_TYPE; |
| 513 |
|
| 514 |
/* |
| 515 |
* Data type for reduce operations |
| 516 |
*/ |
| 517 |
typedef enum dat_ib_collective_data_type |
| 518 |
{ |
| 519 |
DAT_IB_COLLECTIVE_TYPE_INT8, |
| 520 |
DAT_IB_COLLECTIVE_TYPE_UINT8, |
| 521 |
DAT_IB_COLLECTIVE_TYPE_INT16, |
| 522 |
DAT_IB_COLLECTIVE_TYPE_UINT16, |
| 523 |
DAT_IB_COLLECTIVE_TYPE_INT32, |
| 524 |
DAT_IB_COLLECTIVE_TYPE_UINT32, |
| 525 |
DAT_IB_COLLECTIVE_TYPE_INT64, |
| 526 |
DAT_IB_COLLECTIVE_TYPE_UINT64, |
| 527 |
DAT_IB_COLLECTIVE_TYPE_FLOAT, |
| 528 |
DAT_IB_COLLECTIVE_TYPE_DOUBLE, |
| 529 |
DAT_IB_COLLECTIVE_TYPE_LONG_DOUBLE, |
| 530 |
DAT_IB_COLLECTIVE_TYPE_SHORT_INT, |
| 531 |
DAT_IB_COLLECTIVE_TYPE_2INT, |
| 532 |
DAT_IB_COLLECTIVE_TYPE_FLOAT_INT, |
| 533 |
DAT_IB_COLLECTIVE_TYPE_LONG_INT, |
| 534 |
DAT_IB_COLLECTIVE_TYPE_DOUBLE_INT, |
| 535 |
|
| 536 |
} DAT_IB_COLLECTIVE_DATA_TYPE; |
| 537 |
|
| 538 |
/* |
| 539 |
* Opcode for reduce operations |
| 540 |
*/ |
| 541 |
typedef enum dat_ib_collective_reduce_data_op |
| 542 |
{ |
| 543 |
DAT_IB_COLLECTIVE_REDUCE_OP_MAX, |
| 544 |
DAT_IB_COLLECTIVE_REDUCE_OP_MIN, |
| 545 |
DAT_IB_COLLECTIVE_REDUCE_OP_SUM, |
| 546 |
DAT_IB_COLLECTIVE_REDUCE_OP_PROD, |
| 547 |
DAT_IB_COLLECTIVE_REDUCE_OP_LAND, |
| 548 |
DAT_IB_COLLECTIVE_REDUCE_OP_BAND, |
| 549 |
DAT_IB_COLLECTIVE_REDUCE_OP_LOR, |
| 550 |
DAT_IB_COLLECTIVE_REDUCE_OP_BOR, |
| 551 |
DAT_IB_COLLECTIVE_REDUCE_OP_LXOR, |
| 552 |
DAT_IB_COLLECTIVE_REDUCE_OP_BXOR, |
| 553 |
DAT_IB_COLLECTIVE_REDUCE_OP_MAXLOC, |
| 554 |
DAT_IB_COLLECTIVE_REDUCE_OP_MINLOC |
| 555 |
|
| 556 |
} DAT_IB_COLLECTIVE_REDUCE_DATA_OP; |
| 557 |
|
| 558 |
/* |
| 559 |
* For group creation |
| 560 |
*/ |
| 561 |
typedef unsigned int DAT_IB_COLLECTIVE_RANK; |
| 562 |
typedef unsigned int DAT_IB_COLLECTIVE_ID; |
| 563 |
typedef void * DAT_IB_COLLECTIVE_MEMBER; |
| 564 |
|
| 565 |
typedef struct dat_ib_collective_group |
| 566 |
{ |
| 567 |
int local_size; /* # of processes on this node */ |
| 568 |
int local_rank; /* my rank within the node */ |
| 569 |
int *local_ranks; /* global rank for each local process */ |
| 570 |
int external_size; /* # of nodes, each node has exactly one external process (local root) */ |
| 571 |
int external_rank; /* my rank among all external processes if one of them, otherwise -1 */ |
| 572 |
int *external_ranks; /* global rank for each external process */ |
| 573 |
int *intranode_table; /* mapping from global rank to local rank. -1 if the process is on a different node */ |
| 574 |
int *internode_table; /* mapping from global rank to external rank. -1 if the process is >not external */ |
| 575 |
int is_comm_world; |
| 576 |
|
| 577 |
} DAT_IB_COLLECTIVE_GROUP; |
| 578 |
|
| 579 |
/* Extended RETURN and EVENT STATUS string helper functions */ |
| 580 |
|
| 581 |
/* DAT_EXT_RETURN error to string */ |
| 582 |
static __inline__ DAT_RETURN DAT_API |
| 583 |
dat_strerror_extension ( |
| 584 |
IN DAT_IB_RETURN value, |
| 585 |
OUT const char **message ) |
| 586 |
{ |
| 587 |
switch( DAT_GET_TYPE(value) ) { |
| 588 |
case DAT_IB_ERR: |
| 589 |
*message = "DAT_IB_ERR"; |
| 590 |
return DAT_SUCCESS; |
| 591 |
default: |
| 592 |
/* standard DAT return type */ |
| 593 |
return(dat_strerror(value, message, NULL)); |
| 594 |
} |
| 595 |
} |
| 596 |
|
| 597 |
/* DAT_EXT_STATUS error to string */ |
| 598 |
static __inline__ DAT_RETURN DAT_API |
| 599 |
dat_strerror_ext_status ( |
| 600 |
IN DAT_IB_STATUS value, |
| 601 |
OUT const char **message ) |
| 602 |
{ |
| 603 |
switch(value) { |
| 604 |
case 0: |
| 605 |
*message = " "; |
| 606 |
return DAT_SUCCESS; |
| 607 |
case DAT_IB_OP_ERR: |
| 608 |
*message = "DAT_IB_OP_ERR"; |
| 609 |
return DAT_SUCCESS; |
| 610 |
default: |
| 611 |
*message = "unknown extension status"; |
| 612 |
return DAT_INVALID_PARAMETER; |
| 613 |
} |
| 614 |
} |
| 615 |
|
| 616 |
/* |
| 617 |
* Extended IB transport specific APIs |
| 618 |
* redirection via DAT extension function |
| 619 |
* va_arg function: DAT_HANDLE and OP type MUST be first 2 parameters |
| 620 |
* |
| 621 |
* RETURN VALUE: DAT_RETURN |
| 622 |
*/ |
| 623 |
|
| 624 |
/* |
| 625 |
* This asynchronous call is modeled after the InfiniBand atomic |
| 626 |
* Fetch and Add operation. The add_value is added to the 64 bit |
| 627 |
* value stored at the remote memory location specified in remote_iov |
| 628 |
* and the result is stored in the local_iov. |
| 629 |
*/ |
| 630 |
#define dat_ib_post_fetch_and_add(ep, add_val, lbuf, cookie, rbuf, flgs) \ |
| 631 |
dat_extension_op(\ |
| 632 |
IN (DAT_EP_HANDLE) (ep), \ |
| 633 |
IN (DAT_IB_OP) DAT_IB_FETCH_AND_ADD_OP, \ |
| 634 |
IN (DAT_UINT64) (add_val), \ |
| 635 |
IN (DAT_LMR_TRIPLET *) (lbuf), \ |
| 636 |
IN (cookie), \ |
| 637 |
IN (DAT_RMR_TRIPLET *) (rbuf), \ |
| 638 |
IN (DAT_COMPLETION_FLAGS) (flgs)) |
| 639 |
|
| 640 |
/* |
| 641 |
* This asynchronous call is modeled after the InfiniBand atomic |
| 642 |
* Compare and Swap operation. The cmp_value is compared to the 64 bit |
| 643 |
* value stored at the remote memory location specified in remote_iov. |
| 644 |
* If the two values are equal, the 64 bit swap_value is stored in |
| 645 |
* the remote memory location. In all cases, the original 64 bit |
| 646 |
* value stored in the remote memory location is copied to the local_iov. |
| 647 |
*/ |
| 648 |
#define dat_ib_post_cmp_and_swap(ep, cmp_val, swap_val, lbuf, cookie, rbuf, flgs) \ |
| 649 |
dat_extension_op(\ |
| 650 |
IN (DAT_EP_HANDLE) (ep), \ |
| 651 |
IN (DAT_IB_OP) DAT_IB_CMP_AND_SWAP_OP, \ |
| 652 |
IN (DAT_UINT64) (cmp_val), \ |
| 653 |
IN (DAT_UINT64) (swap_val), \ |
| 654 |
IN (DAT_LMR_TRIPLET *) (lbuf), \ |
| 655 |
IN (cookie), \ |
| 656 |
IN (DAT_RMR_TRIPLET *) (rbuf), \ |
| 657 |
IN (DAT_COMPLETION_FLAGS) (flgs)) |
| 658 |
|
| 659 |
/* |
| 660 |
* RDMA Write with IMMEDIATE: |
| 661 |
* |
| 662 |
* This asynchronous call is modeled after the InfiniBand rdma write with |
| 663 |
* immediate data operation. Event completion for the request completes as an |
| 664 |
* DAT_EXTENSION with extension type set to DAT_DTO_EXTENSION_IMMED_DATA. |
| 665 |
* Event completion on the remote endpoint completes as receive DTO operation |
| 666 |
* type of DAT_EXTENSION with operation set to DAT_DTO_EXTENSION_IMMED_DATA. |
| 667 |
* The immediate data will be provided in the extented DTO event data structure. |
| 668 |
* |
| 669 |
* Note to Consumers: the immediate data will consume a receive |
| 670 |
* buffer at the Data Sink. |
| 671 |
* |
| 672 |
* Other extension flags: |
| 673 |
* n/a |
| 674 |
*/ |
| 675 |
#define dat_ib_post_rdma_write_immed(ep, size, lbuf, cookie, rbuf, idata, flgs) \ |
| 676 |
dat_extension_op(\ |
| 677 |
IN (DAT_EP_HANDLE) (ep), \ |
| 678 |
IN (DAT_IB_OP) DAT_IB_RDMA_WRITE_IMMED_OP, \ |
| 679 |
IN (DAT_COUNT) (size), \ |
| 680 |
IN (DAT_LMR_TRIPLET *) (lbuf), \ |
| 681 |
IN (cookie), \ |
| 682 |
IN (DAT_RMR_TRIPLET *) (rbuf), \ |
| 683 |
IN (DAT_UINT32) (idata), \ |
| 684 |
IN (DAT_COMPLETION_FLAGS) (flgs)) |
| 685 |
|
| 686 |
/* |
| 687 |
* Unreliable datagram: msg send |
| 688 |
* |
| 689 |
* This asynchronous call is modeled after the InfiniBand UD message send |
| 690 |
* Event completion for the request completes as an |
| 691 |
* DAT_EXTENSION with extension type set to DAT_DTO_EXTENSION_UD_SEND. |
| 692 |
* Event completion on the remote endpoint completes as receive DTO operation |
| 693 |
* type of DAT_EXTENSION with operation set to DAT_DTO_EXTENSION_UD_RECV. |
| 694 |
* |
| 695 |
* Other extension flags: |
| 696 |
* n/a |
| 697 |
*/ |
| 698 |
#define dat_ib_post_send_ud(ep, segments, lbuf, ah_ptr, cookie, flgs) \ |
| 699 |
dat_extension_op(\ |
| 700 |
IN (DAT_EP_HANDLE) (ep), \ |
| 701 |
IN (DAT_IB_OP) DAT_IB_UD_SEND_OP, \ |
| 702 |
IN (DAT_COUNT) (segments), \ |
| 703 |
IN (DAT_LMR_TRIPLET *) (lbuf), \ |
| 704 |
IN (DAT_IB_ADDR_HANDLE *) (ah_ptr), \ |
| 705 |
IN (cookie), \ |
| 706 |
IN (DAT_COMPLETION_FLAGS) (flgs)) |
| 707 |
|
| 708 |
/* |
| 709 |
* Unreliable datagram: msg recv |
| 710 |
* |
| 711 |
* Mapping to standard EP post call. |
| 712 |
*/ |
| 713 |
#define dat_ib_post_recv_ud dat_ep_post_recv |
| 714 |
|
| 715 |
/* |
| 716 |
* Unreliable datagram: free CM |
| 717 |
* |
| 718 |
* This call frees CM object after AH and private data are copied |
| 719 |
* and stored by consumer. Provider will destroy internal object |
| 720 |
* and memory associated with CM and AH resolution. MAY be called |
| 721 |
* after CM establishment and before EP destroyed |
| 722 |
* |
| 723 |
* Other extension flags: |
| 724 |
* n/a |
| 725 |
*/ |
| 726 |
#define dat_ib_ud_cm_free(ep, cm) \ |
| 727 |
dat_extension_op(\ |
| 728 |
IN (DAT_EP_HANDLE) (ep), \ |
| 729 |
IN (DAT_IB_OP) DAT_IB_UD_CM_FREE_OP, \ |
| 730 |
IN (DAT_CONTEXT) (cm)) |
| 731 |
|
| 732 |
/* |
| 733 |
* Unreliable datagram: free AH |
| 734 |
* |
| 735 |
* This call frees UD Address Handle (AH). MUST be called after all UD sends |
| 736 |
* are complete and before UD EP is destroyed. |
| 737 |
* |
| 738 |
* Other extension flags: |
| 739 |
* n/a |
| 740 |
*/ |
| 741 |
#define dat_ib_ud_ah_free(ep, ah) \ |
| 742 |
dat_extension_op(\ |
| 743 |
IN (DAT_EP_HANDLE) (ep), \ |
| 744 |
IN (DAT_IB_OP) DAT_IB_UD_AH_FREE_OP, \ |
| 745 |
IN (DAT_IB_ADDR_HANDLE *) (ah)) |
| 746 |
|
| 747 |
/* |
| 748 |
* Query counter(s): |
| 749 |
* Provide IA, EP, or EVD and call will return appropriate counters |
| 750 |
* DAT_HANDLE dat_handle, enum cntr, *DAT_UINT64 p_cntrs_out, int reset |
| 751 |
* |
| 752 |
* use _ALL_COUNTERS to query all |
| 753 |
*/ |
| 754 |
#define dat_ib_query_counters(dat_handle, cntr, p_cntrs_out, reset) \ |
| 755 |
dat_extension_op(\ |
| 756 |
IN (DAT_HANDLE) dat_handle, \ |
| 757 |
IN (DAT_IB_OP) DAT_QUERY_COUNTERS_OP, \ |
| 758 |
IN (int) (cntr), \ |
| 759 |
IN (DAT_UINT64 *) (p_cntrs_out), \ |
| 760 |
IN (int) (reset)) |
| 761 |
/* |
| 762 |
* Print counter(s): |
| 763 |
* Provide IA, EP, or EVD and call will print appropriate counters |
| 764 |
* DAT_HANDLE dat_handle, int cntr, int reset |
| 765 |
* |
| 766 |
* use _ALL_COUNTERS to print all |
| 767 |
*/ |
| 768 |
#define dat_ib_print_counters(dat_handle, cntr, reset) \ |
| 769 |
dat_extension_op(\ |
| 770 |
IN (DAT_HANDLE) dat_handle, \ |
| 771 |
IN (DAT_IB_OP) DAT_PRINT_COUNTERS_OP, \ |
| 772 |
IN (int) (cntr), \ |
| 773 |
IN (int) (reset)) |
| 774 |
|
| 775 |
/* |
| 776 |
* Start and stop counter(s): |
| 777 |
* Provide IA, call will start sampling running IB counters |
| 778 |
* DAT_HANDLE dat_handle, counter type (link, diag) |
| 779 |
* |
| 780 |
*/ |
| 781 |
#define dat_ib_start_counter(dat_handle, type) \ |
| 782 |
dat_extension_op(\ |
| 783 |
IN (DAT_HANDLE) dat_handle, \ |
| 784 |
IN (DAT_IB_OP) DAT_IB_START_COUNTERS_OP, \ |
| 785 |
IN (DAT_COUNTER_TYPE) (type)) |
| 786 |
|
| 787 |
#define dat_ib_stop_counter(dat_handle, type) \ |
| 788 |
dat_extension_op(\ |
| 789 |
IN (DAT_HANDLE) dat_handle, \ |
| 790 |
IN (DAT_IB_OP) DAT_IB_STOP_COUNTERS_OP, \ |
| 791 |
IN (DAT_COUNTER_TYPE) (type)) |
| 792 |
|
| 793 |
/* |
| 794 |
* dat_ib_open_query: |
| 795 |
* dat_ib_close_query: |
| 796 |
* |
| 797 |
* Given IA name, open appropriate provider for fast attribute query |
| 798 |
* |
| 799 |
* OUT: |
| 800 |
* ia_handle |
| 801 |
* ia_attr |
| 802 |
* pr_attr |
| 803 |
* |
| 804 |
* RETURN VALUE: |
| 805 |
* |
| 806 |
* DAT_SUCCESS |
| 807 |
* DAT_INVALID_HANDLE |
| 808 |
* DAT_NOT_IMPLEMENTED |
| 809 |
* |
| 810 |
*/ |
| 811 |
#define dat_ib_open_query(name, ia_handle, ia_mask, ia_attr, prov_mask, prov_attr) \ |
| 812 |
dat_extension_op(\ |
| 813 |
IN (DAT_HANDLE) (NULL), \ |
| 814 |
IN (DAT_IB_OP) DAT_IB_OPEN_QUERY_OP, \ |
| 815 |
IN (const DAT_NAME_PTR) (name), \ |
| 816 |
OUT (DAT_HANDLE *) (ia_handle), \ |
| 817 |
IN (DAT_IA_ATTR_MASK) (ia_mask), \ |
| 818 |
OUT (DAT_IA_ATTR *) (ia_attr), \ |
| 819 |
IN (DAT_PROVIDER_ATTR_MASK) (prov_mask), \ |
| 820 |
OUT (DAT_PROVIDER_ATTR *) (prov_attr)) |
| 821 |
|
| 822 |
#define dat_ib_close_query(ia_handle) \ |
| 823 |
dat_extension_op(\ |
| 824 |
IN (DAT_HANDLE) (ia_handle), \ |
| 825 |
IN (DAT_IB_OP) DAT_IB_CLOSE_QUERY_OP) |
| 826 |
|
| 827 |
/* |
| 828 |
************************ MPI IB Collective Functions *********************** |
| 829 |
*/ |
| 830 |
|
| 831 |
/* MPI collective member and group setup functions */ |
| 832 |
|
| 833 |
/* |
| 834 |
* This synchronous call creates and returns local member |
| 835 |
* address information for a collective device or provider |
| 836 |
* for each rank. The size of the member address information |
| 837 |
* is dependent on the collective device or provider. |
| 838 |
* This address information, for each rank, must be exchanged |
| 839 |
* and used for group creation on all ranks. |
| 840 |
*/ |
| 841 |
#define dat_ib_collective_create_member(ia_handle, progress_func, member, member_size) \ |
| 842 |
dat_extension_op(\ |
| 843 |
IN (DAT_IA_HANDLE) (ia_handle), \ |
| 844 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_CREATE_MEMBER_OP, \ |
| 845 |
IN (void *) (progress_func), \ |
| 846 |
OUT (DAT_IB_COLLECTIVE_MEMBER *) (member), \ |
| 847 |
OUT (DAT_UINT32 *) (member_size)) |
| 848 |
|
| 849 |
/* |
| 850 |
* This synchronous call destroys a previously created member |
| 851 |
* information associated with the this device ia_handle argument. |
| 852 |
*/ |
| 853 |
#define dat_ib_collective_free_member(ia_handle, member) \ |
| 854 |
dat_extension_op(\ |
| 855 |
IN (DAT_IA_HANDLE) (ia_handle), \ |
| 856 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_FREE_MEMBER_OP, \ |
| 857 |
IN (DAT_IB_COLLECTIVE_MEMBER) (member)) |
| 858 |
|
| 859 |
/* |
| 860 |
* This asynchronous call initiates the process of creating a collective |
| 861 |
* group and must be called by all group members. The collective_group |
| 862 |
* argument points to an array of address/connection qualifier pairs that |
| 863 |
* identify the members of the group in rank order. The group_size argument |
| 864 |
* specifies the size of the group and therefore the size of the coll_group |
| 865 |
* array. The self argument identifies the rank of the caller. |
| 866 |
* The group_id argument specifies a network-unique identifier for this |
| 867 |
* instance of the collective group. The group_info provides global and local |
| 868 |
* rank and process information. All members of the group must specify |
| 869 |
* the same group_id value for the same collective instance. The evd_handle |
| 870 |
* argument specifies the EVD used for all asynchronous collective completions |
| 871 |
* including this call. The user_context argument will be returned in the |
| 872 |
* DAT_EXT_COLLECTIVE_CREATE_DATA event. |
| 873 |
* |
| 874 |
* On a successful completion, each group member will receive a |
| 875 |
* DAT_EXT_COLLECTIVE_CREATE_DATA event on the EVD specified by evd_handle. |
| 876 |
* The event contains the collective handle, the rank of the receiving |
| 877 |
* Endpoint within the collective group, the size of the group, and the |
| 878 |
* caller specified user_context. The returned collective handle can be used |
| 879 |
* in network clock, Multicast, and other collective operations. |
| 880 |
* |
| 881 |
* RETURN VALUE: DAT_RETURN |
| 882 |
*/ |
| 883 |
#define dat_ib_collective_create_group(members, group_size, self, group_id, group_info, evd, pd, user_context) \ |
| 884 |
dat_extension_op(\ |
| 885 |
IN (DAT_EVD_HANDLE) (evd), \ |
| 886 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_CREATE_GROUP_OP, \ |
| 887 |
IN (DAT_IB_COLLECTIVE_MEMBER *) (members), \ |
| 888 |
IN (DAT_COUNT) (group_size), \ |
| 889 |
IN (DAT_IB_COLLECTIVE_RANK) (self), \ |
| 890 |
IN (DAT_IB_COLLECTIVE_ID) (group_id), \ |
| 891 |
IN (DAT_IB_COLLECTIVE_GROUP *) (group_info), \ |
| 892 |
IN (DAT_PZ_HANDLE) (pd), \ |
| 893 |
IN (DAT_CONTEXT) (user_context)) |
| 894 |
|
| 895 |
/* |
| 896 |
* This synchronous call destroys a previously created collective group |
| 897 |
* associated with the collective_handle argument. Any pending or |
| 898 |
* in-process requests associated with the collective group will be |
| 899 |
* terminated and be posted to the appropriate EVD. |
| 900 |
* |
| 901 |
* RETURN VALUE: DAT_RETURN |
| 902 |
*/ |
| 903 |
#define dat_ib_collective_free_group(coll_handle) \ |
| 904 |
dat_extension_op(\ |
| 905 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 906 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_FREE_GROUP_OP) |
| 907 |
|
| 908 |
|
| 909 |
/* MPI collective data operations */ |
| 910 |
|
| 911 |
/* |
| 912 |
* This call sets the network clock associated with |
| 913 |
* collective_handle. A provider implementation may keep a single |
| 914 |
* global clock for all collective handles. When this is the case, |
| 915 |
* this call sets an adjustment for the given handle so that |
| 916 |
* subsequent calls to read the clock will be relative to the value |
| 917 |
* specified by clock_value. This is an asynchronous call that |
| 918 |
* completes on the collective EVD. The network clock will not be |
| 919 |
* synchronized until the request is completed. Any member of the |
| 920 |
* collective can set the clock and only one member should make |
| 921 |
* this call on behave of the entire collective. |
| 922 |
*/ |
| 923 |
#define dat_ib_collective_set_clock(coll_handle, clock_value, user_context ) \ |
| 924 |
dat_extension_op( \ |
| 925 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 926 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_READ_CLOCK_OP, \ |
| 927 |
IN (DAT_UINT64) (clock_value), \ |
| 928 |
IN (DAT_CONTEXT) (user_contex)) |
| 929 |
|
| 930 |
/* |
| 931 |
* This synchronous call returns the current value of the network clock |
| 932 |
* associated with the given collective handle. This is a light weight |
| 933 |
* call to minimize skew |
| 934 |
*/ |
| 935 |
#define dat_ib_collective_read_clock(coll_handle, clock_value ) \ |
| 936 |
dat_extension_op( \ |
| 937 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 938 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_READ_CLOCK_OP, \ |
| 939 |
OUT (DAT_UINT64 *) clock_value)) |
| 940 |
|
| 941 |
/* |
| 942 |
* This call performs a scatter of the data specified by the |
| 943 |
* send_buffer argument to the collective group specified by coll_handle. |
| 944 |
* Data is received in the buffer specified by the recv_buffer argument. |
| 945 |
* The recv_byte_count argument specifies the size of the receive buffer. |
| 946 |
* Data from the root send_buffer will be divided by the number of members |
| 947 |
* in the collective group to form equal and contiguous memory partitions. |
| 948 |
* Each member of the collective group will receive its rank relative |
| 949 |
* partition. An error is returned if the send_byte_count does not describe |
| 950 |
* memory that can be evenly divided by the size of the collective group. |
| 951 |
* An "in place" transfer for the root rank can be indicated by passing NULL |
| 952 |
* as the recv_buffer argument. The send_buffer and send_byte_count |
| 953 |
* arguments are ignored on non-root members. The operation is completed on |
| 954 |
* the collective EVD unless completions are suppressed through the |
| 955 |
* completion flags. |
| 956 |
*/ |
| 957 |
#define dat_ib_collective_scatter(coll_handle, sendbuf, sendsize, recvbuf, recvsize, root, user_context, flags) \ |
| 958 |
dat_extension_op( \ |
| 959 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 960 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_SCATTER_OP, \ |
| 961 |
IN (DAT_PVOID) (sendbuf), \ |
| 962 |
IN (DAT_COUNT) (sendsize), \ |
| 963 |
IN (DAT_PVOID) (recvbuf), \ |
| 964 |
IN (DAT_COUNT) (recvsize), \ |
| 965 |
IN (DAT_IB_COLLECTIVE_RANK) (root), \ |
| 966 |
IN (DAT_CONTEXT) (user_context), \ |
| 967 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 968 |
|
| 969 |
/* |
| 970 |
* This call performs a non-uniform scatter of the data |
| 971 |
* specified by the send_buffers array argument to the collective group |
| 972 |
* specified by coll_handle. The send_buffers array contains one buffer |
| 973 |
* pointer for each member of the collective group, in rank order. |
| 974 |
* The send_byte_counts array contains a byte count for each corresponding |
| 975 |
* send buffer pointer. The recv_buffer and recev_byte_count arguments |
| 976 |
* specify where received portions of the scatter are to be received. |
| 977 |
* An "in place" transfer for the root rank can be indicated by passing |
| 978 |
* NULL as the recv_buffer argument. The send_buffers and send_byte_counts |
| 979 |
* arguments are ignored on non-root members. The operation is completed |
| 980 |
* on the collective EVD unless completions are suppressed through the |
| 981 |
* completion flags. |
| 982 |
* |
| 983 |
*/ |
| 984 |
#define dat_ib_collective_scatterv(coll_handle, sendbuf, sendsizes, displs, recvbuf, recvsize, root, user_context, flags) \ |
| 985 |
dat_extension_op( \ |
| 986 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 987 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_SCATTERV_OP, \ |
| 988 |
IN (DAT_PVOID) (sendbuf), \ |
| 989 |
IN (DAT_COUNT *) (sendsizes), \ |
| 990 |
IN (DAT_COUNT *) (displs), \ |
| 991 |
IN (DAT_PVOID) (recvbuf), \ |
| 992 |
IN (DAT_COUNT) (recvsize), \ |
| 993 |
IN (DAT_IB_COLLECTIVE_RANK) (root), \ |
| 994 |
IN (DAT_CONTEXT) (user_context), \ |
| 995 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 996 |
|
| 997 |
/* |
| 998 |
* This call performs a gather of the data sent by all |
| 999 |
* members of the collective specified by the collective_handle argument. |
| 1000 |
* The data to be sent is specified by the send_buffer and send_byte_count |
| 1001 |
* arguments. Data is received by the collective member specified by the |
| 1002 |
* root argument in the buffer specified by the recv_buffer and |
| 1003 |
* recv_byte_count arguments. Data is placed into the receive buffer in |
| 1004 |
* collective rank order. An "in place" transfer for the root rank can |
| 1005 |
* be indicated by passing NULL as the send_buffer argument. |
| 1006 |
* The recv_buffer and recv_byte_count arguments are ignored on non-root |
| 1007 |
* members. The operation is completed on the collective EVD unless |
| 1008 |
* completions are suppressed through the completion flags. |
| 1009 |
*/ |
| 1010 |
#define dat_ib_collective_gather(coll_handle, sendbuf, sendsize, recvbuf, recvsize, root, user_context, flags) \ |
| 1011 |
dat_extension_op( \ |
| 1012 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 1013 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_GATHER_OP, \ |
| 1014 |
IN (DAT_PVOID) (sendbuf), \ |
| 1015 |
IN (DAT_COUNT) (sendsize), \ |
| 1016 |
IN (DAT_PVOID) (recvbuf), \ |
| 1017 |
IN (DAT_COUNT) (recvsize), \ |
| 1018 |
IN (DAT_IB_COLLECTIVE_RANK) (root), \ |
| 1019 |
IN (DAT_CONTEXT) (user_context), \ |
| 1020 |
IN (DAT_COMPLETION_FLAGS)(flags)) |
| 1021 |
|
| 1022 |
/* |
| 1023 |
* This call performs a non-uniform gather of the data sent by |
| 1024 |
* all members of the collective specified by the collective_handle argument. |
| 1025 |
* The data to be sent is specified by the send_buffer and send_byte_count |
| 1026 |
* arguments. Data is received by the collective member specified by the |
| 1027 |
* root argument into the buffers specified by the recv_buffers and |
| 1028 |
* recv_byte_counts array arguments. Data is placed into the receive buffer |
| 1029 |
* associated with the rank that sent it. An "in place" transfer for the root |
| 1030 |
* rank can be indicated by passing NULL as the send_buffer argument. |
| 1031 |
* The recv_buffers and recv_byte_counts arguments are ignored on non-root |
| 1032 |
* members. The operation is completed on the collective EVD unless |
| 1033 |
* completions are suppressed through the completion flags. |
| 1034 |
*/ |
| 1035 |
#define dat_ib_collective_gatherv(coll_handle, sendbuf, sendsize, recvbufs, recvsizes, displs, root, user_context, flags) \ |
| 1036 |
dat_extension_op( \ |
| 1037 |
(DAT_IB_COLLECTIVE_HANDLE)(coll_handle), \ |
| 1038 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_GATHERV_OP, \ |
| 1039 |
IN (DAT_PVOID) (sendbuf), \ |
| 1040 |
IN (DAT_COUNT) (sendsize), \ |
| 1041 |
IN (DAT_PVOID) (recvbuf), \ |
| 1042 |
IN (DAT_COUNT *) (recvsizes), \ |
| 1043 |
IN (DAT_COUNT *) (displs), \ |
| 1044 |
IN (DAT_IB_COLLECTIVE_RANK) (root), \ |
| 1045 |
IN (DAT_CONTEXT) (user_context), \ |
| 1046 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1047 |
|
| 1048 |
/* |
| 1049 |
* This call is equivalent to having all members of a collective |
| 1050 |
* group perform a dat_collective_gather() as the root. This results in all |
| 1051 |
* members of the collective having identical contents in their receive buffer |
| 1052 |
*/ |
| 1053 |
#define dat_ib_collective_allgather(coll_handle, sendbuf, sendsize, recvbuf, recvsize, user_context, flags) \ |
| 1054 |
dat_extension_op( \ |
| 1055 |
(DAT_IB_COLLECTIVE_HANDLE)(coll_handle), \ |
| 1056 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_ALLGATHER_OP, \ |
| 1057 |
IN (DAT_PVOID) (sendbuf), \ |
| 1058 |
IN (DAT_COUNT) (sendsize), \ |
| 1059 |
IN (DAT_PVOID) (recvbuf), \ |
| 1060 |
IN (DAT_COUNT) (recvsize), \ |
| 1061 |
IN (DAT_CONTEXT) (user_context), \ |
| 1062 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1063 |
|
| 1064 |
/* |
| 1065 |
* This call performs a non-uniform dat_collective_allgather() |
| 1066 |
* operation. It is equivalent to having all members of a collective group |
| 1067 |
* perform a dat_collective_gatherv() as the root. This results in all |
| 1068 |
* members of the collective having identical contents in their receive |
| 1069 |
* buffer. |
| 1070 |
*/ |
| 1071 |
#define dat_ib_collective_allgatherv(coll_handle, sendbuf, sendsize, recvbuf, recvsizes, displs, user_context, flags) \ |
| 1072 |
dat_extension_op( \ |
| 1073 |
(DAT_IB_COLLECTIVE_HANDLE)(coll_handle), \ |
| 1074 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_ALLGATHERV_OP, \ |
| 1075 |
IN (DAT_PVOID) (sendbuf), \ |
| 1076 |
IN (DAT_COUNT) (sendsize), \ |
| 1077 |
IN (DAT_PVOID) (recvbuf), \ |
| 1078 |
IN (DAT_COUNT *) (recvsizes), \ |
| 1079 |
IN (DAT_COUNT *) (displs), \ |
| 1080 |
IN (DAT_CONTEXT) (user_context), \ |
| 1081 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1082 |
|
| 1083 |
/* |
| 1084 |
* This call is an extension of dat_collective_allgather() |
| 1085 |
* to the case where each member sends distinct data specified by send_buffer |
| 1086 |
* to each of the other members. The jth block sent from rank i is received |
| 1087 |
* by rank j and is placed in the ith block of recv_buffer. |
| 1088 |
*/ |
| 1089 |
#define dat_ib_collective_alltoall(coll_handle, sendbuf, sendsize, recvbuf, recvsize, user_context, flags) \ |
| 1090 |
dat_extension_op( \ |
| 1091 |
(DAT_IB_COLLECTIVE_HANDLE)(coll_handle), \ |
| 1092 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_ALLTOALL_OP, \ |
| 1093 |
IN (DAT_PVOID) (sendbuf), \ |
| 1094 |
IN (DAT_COUNT) (sendsize), \ |
| 1095 |
IN (DAT_PVOID) (recvbuf), \ |
| 1096 |
IN (DAT_COUNT) (recvsize), \ |
| 1097 |
IN (DAT_CONTEXT) (user_context), \ |
| 1098 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1099 |
|
| 1100 |
/* |
| 1101 |
* This call performs a non-uniform dat_collective_alltoall() operation |
| 1102 |
*/ |
| 1103 |
#define dat_ib_collective_alltoallv(coll_handle, sendbuf, sendsizes, senddspls, recvbuf, recvsizes, recvdispls, user_context, flags) \ |
| 1104 |
dat_extension_op( \ |
| 1105 |
(DAT_IB_COLLECTIVE_HANDLE)(coll_handle), \ |
| 1106 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_ALLTOALLV_OP, \ |
| 1107 |
IN (DAT_PVOID) (sendbuf), \ |
| 1108 |
IN (DAT_COUNT *) (sendsizes), \ |
| 1109 |
IN (DAT_COUNT *) (senddispls), \ |
| 1110 |
IN (DAT_PVOID) (recvbuf), \ |
| 1111 |
IN (DAT_COUNT *) (recvsizes), \ |
| 1112 |
IN (DAT_COUNT *) (recvdispls), \ |
| 1113 |
IN (DAT_CONTEXT) (user_context), \ |
| 1114 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1115 |
|
| 1116 |
/* |
| 1117 |
* This call combines the elements of the data type specified |
| 1118 |
* by data_type from the buffer specified by send_buffer of all members of |
| 1119 |
* the collective by performing the operation specified by reduce_operation |
| 1120 |
* and placing the result into the buffer of the root member specified by |
| 1121 |
* recv_buffer. It is an error to specify a floating point type with |
| 1122 |
* any of the logical reduction operators.When using the REDUCE_OP_MINLOC |
| 1123 |
* and REDUCE_OP _MAXLOC operations, it is assumed that the input and output |
| 1124 |
* buffers contain pair values where the first member of the pair is of the |
| 1125 |
* type specified by data_type followed by a COLLECTIVE_TYPE_UINT32 type. |
| 1126 |
* When the reduction is complete, the receive buffer will contain the |
| 1127 |
* MIN/MAX value in the first member of the pair with the first member rank |
| 1128 |
* that contained it in the second member of the pair. The tables below |
| 1129 |
* show the result of a REDUCE_OP_SUM reduce operation. |
| 1130 |
*/ |
| 1131 |
#define dat_ib_collective_reduce(coll_handle, sendbuf, sendsize, recvbuf, recvsize, op, type, root, user_context, flags) \ |
| 1132 |
dat_extension_op( \ |
| 1133 |
IN (DAT_IB_COLLECTIVE_HANDLE)(coll_handle), \ |
| 1134 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_REDUCE_OP, \ |
| 1135 |
IN (DAT_PVOID) (sendbuf), \ |
| 1136 |
IN (DAT_COUNT) (sendsize), \ |
| 1137 |
IN (DAT_PVOID) (recvbuf), \ |
| 1138 |
IN (DAT_COUNT) (recvsize), \ |
| 1139 |
IN (DAT_IB_COLLECTIVE_REDUCE_DATA_OP) (op), \ |
| 1140 |
IN (DAT_IB_COLLECTIVE_DATA_TYPE) (type), \ |
| 1141 |
IN (DAT_IB_COLLECTIVE_RANK) (root), \ |
| 1142 |
IN (DAT_CONTEXT) (user_context), \ |
| 1143 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1144 |
|
| 1145 |
/* |
| 1146 |
* This call is identical to the dat_collective_reduce() |
| 1147 |
* call with the exception that the recv_buffer and recv_byte_count arguments |
| 1148 |
* are valid for all members of the collective and all members of will |
| 1149 |
* receive the reduction results. |
| 1150 |
*/ |
| 1151 |
#define dat_ib_collective_allreduce(coll_handle, sendbuf, sendsize, recvbuf, recvsize, op, type, user_context, flags) \ |
| 1152 |
dat_extension_op( \ |
| 1153 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 1154 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_ALLREDUCE_OP, \ |
| 1155 |
IN (DAT_PVOID) (sendbuf), \ |
| 1156 |
IN (DAT_COUNT) (sendsize), \ |
| 1157 |
IN (DAT_PVOID) (recvbuf), \ |
| 1158 |
IN (DAT_COUNT) (recvsize), \ |
| 1159 |
IN (DAT_IB_COLLECTIVE_REDUCE_DATA_OP) (op), \ |
| 1160 |
IN (DAT_IB_COLLECTIVE_DATA_TYPE) (type), \ |
| 1161 |
IN (DAT_CONTEXT) (user_context), \ |
| 1162 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1163 |
/* |
| 1164 |
* This call is identical to rank 0 of the collective calling |
| 1165 |
* this dat_collective_reduce() followed by dat_collective_scatterv(). |
| 1166 |
* The number of bytes received in the scatter for each rank is determined |
| 1167 |
* by rank offset into the recv_byte_counts array. |
| 1168 |
*/ |
| 1169 |
#define dat_ib_collective_reduce_scatter(coll_handle, sendbuf, sendsize, recvbuf, recvsizes, op, type, user_context, flags) \ |
| 1170 |
dat_extension_op( \ |
| 1171 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 1172 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_REDUCE_SCATTER_OP, \ |
| 1173 |
IN (DAT_PVOID) (sendbuf), \ |
| 1174 |
IN (DAT_COUNT) (sendsize), \ |
| 1175 |
IN (DAT_PVOID) (recvbuf), \ |
| 1176 |
IN (DAT_COUNT *) (recvsizes), \ |
| 1177 |
IN (DAT_IB_COLLECTIVE_REDUCE_DATA_OP) (op), \ |
| 1178 |
IN (DAT_IB_COLLECTIVE_DATA_TYPE) (type), \ |
| 1179 |
IN (DAT_CONTEXT) (user_context), \ |
| 1180 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1181 |
|
| 1182 |
/* |
| 1183 |
* This call is used to perform a prefix reduction on data |
| 1184 |
* distributed across the group. The operation returns, in recv_buffer of |
| 1185 |
* the member with rank i, the reduction of the values in send_buffer of |
| 1186 |
* members with ranks 0,...,i (inclusive). The tables below show the |
| 1187 |
* result of a REDUCE_OP_SUM scan operation. |
| 1188 |
*/ |
| 1189 |
#define dat_ib_collective_scan(coll_handle, sendbuf, sendsize, recvbuf, recvsize, op, type, user_context, flags) \ |
| 1190 |
dat_extension_op( \ |
| 1191 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 1192 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_SCAN_OP, \ |
| 1193 |
IN (DAT_PVOID) (sendbuf), \ |
| 1194 |
IN (DAT_COUNT) (sendsize), \ |
| 1195 |
IN (DAT_PVOID) (recvbuf), \ |
| 1196 |
IN (DAT_COUNT) (recvsize), \ |
| 1197 |
IN (DAT_IB_COLLECTIVE_REDUCE_DATA_OP) (op), \ |
| 1198 |
IN (DAT_IB_COLLECTIVE_DATA_TYPE) (type), \ |
| 1199 |
IN (DAT_CONTEXT) (user_context), \ |
| 1200 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1201 |
|
| 1202 |
/* |
| 1203 |
* This call performs a broadcast send operation that transfers |
| 1204 |
* data specified by the buffer argument of the root into the buffer argument |
| 1205 |
* of all other Endpoints in the collective group specified by coll_handle. |
| 1206 |
* The operation is completed on the collective EVD unless completions are |
| 1207 |
* suppressed through the completion flags. All broadcasts are considered |
| 1208 |
* �in place� transfers. The tables below show the result of a broadcast |
| 1209 |
* operation. |
| 1210 |
*/ |
| 1211 |
#define dat_ib_collective_broadcast(coll_handle, buf, size, root, user_context, flags) \ |
| 1212 |
dat_extension_op(\ |
| 1213 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 1214 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_BROADCAST_OP, \ |
| 1215 |
IN (DAT_PVOID) (buf), \ |
| 1216 |
IN (DAT_COUNT) (size), \ |
| 1217 |
IN (DAT_IB_COLLECTIVE_RANK) (root), \ |
| 1218 |
IN (DAT_CONTEXT) (user_context), \ |
| 1219 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1220 |
|
| 1221 |
/* |
| 1222 |
* This call will synchronize all endpoints of the collective |
| 1223 |
* group specified by coll_handle. This is an asynchronous call that |
| 1224 |
* will post a completion to the collective EVD when all endpoints |
| 1225 |
* have synchronized. |
| 1226 |
*/ |
| 1227 |
#define dat_ib_collective_barrier(coll_handle, user_context, flags) \ |
| 1228 |
dat_extension_op( \ |
| 1229 |
IN (DAT_IB_COLLECTIVE_HANDLE) (coll_handle), \ |
| 1230 |
IN (DAT_IB_OP) DAT_IB_COLLECTIVE_BARRIER_OP, \ |
| 1231 |
IN (DAT_CONTEXT) (user_context), \ |
| 1232 |
IN (DAT_COMPLETION_FLAGS) (flags)) |
| 1233 |
|
| 1234 |
|
| 1235 |
/* Backward compatibility */ |
| 1236 |
#define DAT_ATTR_COUNTERS DAT_IB_ATTR_COUNTERS |
| 1237 |
#define dat_query_counters dat_ib_query_counters |
| 1238 |
#define dat_print_counters dat_ib_print_counters |
| 1239 |
#define DAT_QUERY_COUNTERS_OP DAT_IB_QUERY_COUNTERS_OP |
| 1240 |
#define DAT_PRINT_COUNTERS_OP DAT_IB_PRINT_COUNTERS_OP |
| 1241 |
|
| 1242 |
#endif /* _DAT_IB_EXTENSIONS_H_ */ |
| 1243 |
|