root/ompi/mca/osc/rdma/osc_rdma.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. ompi_osc_module_get_peer
  2. ompi_osc_rdma_module_peer
  3. ompi_osc_rdma_in_passive_epoch
  4. _ompi_osc_rdma_register
  5. _ompi_osc_rdma_deregister
  6. ompi_osc_rdma_progress
  7. ompi_osc_rdma_module_lock_find
  8. ompi_osc_rdma_module_lock_insert
  9. ompi_osc_rdma_module_lock_remove
  10. ompi_osc_rdma_module_sync_lookup
  11. ompi_osc_rdma_use_btl_flush
  12. ompi_osc_rdma_sync_rdma_inc_always
  13. ompi_osc_rdma_sync_rdma_inc
  14. ompi_osc_rdma_sync_rdma_dec_always
  15. ompi_osc_rdma_sync_rdma_dec
  16. ompi_osc_rdma_sync_rdma_complete
  17. ompi_osc_rdma_access_epoch_active
  18. ompi_osc_rdma_oor

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2005 The Trustees of Indiana University.
   4  *                         All rights reserved.
   5  * Copyright (c) 2004-2006 The Trustees of the University of Tennessee.
   6  *                         All rights reserved.
   7  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   8  *                         University of Stuttgart.  All rights reserved.
   9  * Copyright (c) 2004-2005 The Regents of the University of California.
  10  *                         All rights reserved.
  11  * Copyright (c) 2007-2018 Los Alamos National Security, LLC.  All rights
  12  *                         reserved.
  13  * Copyright (c) 2010      Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2012-2013 Sandia National Laboratories.  All rights reserved.
  15  * Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
  16  * $COPYRIGHT$
  17  *
  18  * Additional copyrights may follow
  19  *
  20  * $HEADER$
  21  */
  22 
  23 #ifndef OMPI_OSC_RDMA_H
  24 #define OMPI_OSC_RDMA_H
  25 
  26 #include "ompi_config.h"
  27 #include "opal/class/opal_free_list.h"
  28 #include "opal/class/opal_hash_table.h"
  29 #include "opal/threads/threads.h"
  30 #include "opal/util/output.h"
  31 
  32 #include "opal/mca/shmem/shmem.h"
  33 #include "opal/mca/shmem/base/base.h"
  34 
  35 #include "ompi/win/win.h"
  36 #include "ompi/communicator/communicator.h"
  37 #include "ompi/datatype/ompi_datatype.h"
  38 #include "ompi/request/request.h"
  39 #include "ompi/mca/osc/osc.h"
  40 #include "ompi/mca/osc/base/base.h"
  41 #include "opal/mca/btl/btl.h"
  42 #include "ompi/memchecker.h"
  43 #include "ompi/op/op.h"
  44 #include "opal/align.h"
  45 
  46 #include "osc_rdma_types.h"
  47 #include "osc_rdma_sync.h"
  48 
  49 #include "osc_rdma_peer.h"
  50 
  51 #include "opal_stdint.h"
  52 
  53 #define RANK_ARRAY_COUNT(module) ((ompi_comm_size ((module)->comm) + (module)->node_count - 1) / (module)->node_count)
  54 
  55 enum {
  56     OMPI_OSC_RDMA_LOCKING_TWO_LEVEL,
  57     OMPI_OSC_RDMA_LOCKING_ON_DEMAND,
  58 };
  59 
  60 /**
  61  * @brief osc rdma component structure
  62  */
  63 struct ompi_osc_rdma_component_t {
  64     /** Extend the basic osc component interface */
  65     ompi_osc_base_component_t super;
  66 
  67     /** lock access to modules */
  68     opal_mutex_t lock;
  69 
  70     /** cid -> module mapping */
  71     opal_hash_table_t modules;
  72 
  73     /** free list of ompi_osc_rdma_frag_t structures */
  74     opal_free_list_t frags;
  75 
  76     /** Free list of requests */
  77     opal_free_list_t requests;
  78 
  79     /** RDMA component buffer size */
  80     unsigned int buffer_size;
  81 
  82     /** List of requests that need to be freed */
  83     opal_list_t request_gc;
  84 
  85     /** List of buffers that need to be freed */
  86     opal_list_t buffer_gc;
  87 
  88     /** Maximum number of segments that can be attached to a dynamic window */
  89     unsigned int max_attach;
  90 
  91     /** Default value of the no_locks info key for new windows */
  92     bool no_locks;
  93 
  94     /** Locking mode to use as the default for all windows */
  95     int locking_mode;
  96 
  97     /** Accumulate operations will only operate on a single intrinsic datatype */
  98     bool acc_single_intrinsic;
  99 
 100     /** Use network AMOs when available */
 101     bool acc_use_amo;
 102 
 103     /** Priority of the osc/rdma component */
 104     unsigned int priority;
 105 
 106     /** directory where to place backing files */
 107     char *backing_directory;
 108 };
 109 typedef struct ompi_osc_rdma_component_t ompi_osc_rdma_component_t;
 110 
 111 struct ompi_osc_rdma_frag_t;
 112 
 113 /**
 114  * @brief osc rdma module structure
 115  *
 116  * Each MPI window is associated with a single osc module. This struct
 117  * stores the data relevant to the osc/rdma component.
 118  */
 119 struct ompi_osc_rdma_module_t {
 120     /** Extend the basic osc module interface */
 121     ompi_osc_base_module_t super;
 122 
 123     /** pointer back to MPI window */
 124     struct ompi_win_t *win;
 125 
 126     /** Mutex lock protecting module data */
 127     opal_mutex_t lock;
 128 
 129     /** locking mode to use */
 130     int locking_mode;
 131 
 132     /* window configuration */
 133 
 134     /** value of same_disp_unit info key for this window */
 135     bool same_disp_unit;
 136 
 137     /** value of same_size info key for this window */
 138     bool same_size;
 139 
 140     /** CPU atomics can be used */
 141     bool use_cpu_atomics;
 142 
 143     /** passive-target synchronization will not be used in this window */
 144     bool no_locks;
 145 
 146     bool acc_single_intrinsic;
 147 
 148     bool acc_use_amo;
 149 
 150     /** flavor of this window */
 151     int flavor;
 152 
 153     /** size of local window */
 154     size_t size;
 155 
 156     /** Local displacement unit. */
 157     int disp_unit;
 158 
 159     /** global leader */
 160     ompi_osc_rdma_peer_t *leader;
 161 
 162     /** my peer structure */
 163     ompi_osc_rdma_peer_t *my_peer;
 164 
 165     /** pointer to free on cleanup (may be NULL) */
 166     void *free_after;
 167 
 168     /** local state structure (shared memory) */
 169     ompi_osc_rdma_state_t *state;
 170 
 171     /** node-level communication data (shared memory) */
 172     unsigned char *node_comm_info;
 173 
 174     /* only relevant on the lowest rank on each node (shared memory) */
 175     ompi_osc_rdma_rank_data_t *rank_array;
 176 
 177 
 178     /** communicator created with this window.  This is the cid used
 179      * in the component's modules mapping. */
 180     ompi_communicator_t *comm;
 181 
 182     /* temporary communicators for window initialization */
 183     ompi_communicator_t *local_leaders;
 184     ompi_communicator_t *shared_comm;
 185 
 186     /** node id of this rank */
 187     int node_id;
 188 
 189     /** number of nodes */
 190     int node_count;
 191 
 192     /** handle valid for local state (valid for local data for MPI_Win_allocate) */
 193     mca_btl_base_registration_handle_t *state_handle;
 194 
 195     /** registration handle for the window base (only used for MPI_Win_create) */
 196     mca_btl_base_registration_handle_t *base_handle;
 197 
 198     /** size of a region */
 199     size_t region_size;
 200 
 201     /** size of the state structure */
 202     size_t state_size;
 203 
 204     /** offset in the shared memory segment where the state array starts */
 205     size_t state_offset;
 206 
 207     /* ********************* sync data ************************ */
 208 
 209     /** global sync object (PSCW, fence, lock all) */
 210     ompi_osc_rdma_sync_t all_sync;
 211 
 212     /** current group associate with pscw exposure epoch */
 213     struct ompi_group_t *pw_group;
 214 
 215     /** list of unmatched post messages */
 216     opal_list_t        pending_posts;
 217 
 218     /* ********************* LOCK data ************************ */
 219 
 220     /** number of outstanding locks */
 221     osc_rdma_counter_t passive_target_access_epoch;
 222 
 223     /** origin side list of locks currently outstanding */
 224     opal_hash_table_t outstanding_locks;
 225 
 226     /** array of locks (small jobs) */
 227     ompi_osc_rdma_sync_t **outstanding_lock_array;
 228 
 229 
 230     /* ******************* peer storage *********************** */
 231 
 232     /** hash table of allocated peers */
 233     opal_hash_table_t peer_hash;
 234 
 235     /** array of allocated peers (small jobs) */
 236     ompi_osc_rdma_peer_t **peer_array;
 237 
 238     /** lock for peer hash table/array */
 239     opal_mutex_t peer_lock;
 240 
 241 
 242     /** BTL in use */
 243     struct mca_btl_base_module_t *selected_btl;
 244 
 245     /** registered fragment used for locally buffered RDMA transfers */
 246     struct ompi_osc_rdma_frag_t *rdma_frag;
 247 
 248     /** registration handles for dynamically attached regions. These are not stored
 249      * in the state structure as it is entirely local. */
 250     ompi_osc_rdma_handle_t *dynamic_handles;
 251 
 252     /** shared memory segment. this segment holds this node's portion of the rank -> node
 253      * mapping array, node communication data (node_comm_info), state for all local ranks,
 254      * and data for all local ranks (MPI_Win_allocate only) */
 255     void *segment_base;
 256 
 257     /** opal shared memory structure for the shared memory segment */
 258     opal_shmem_ds_t seg_ds;
 259 
 260 
 261     /* performance values */
 262 
 263     /** number of times a put had to be retried */
 264     unsigned long put_retry_count;
 265 
 266     /** number of time a get had to be retried */
 267     unsigned long get_retry_count;
 268 
 269     /** outstanding atomic operations */
 270     opal_atomic_int32_t pending_ops;
 271 };
 272 typedef struct ompi_osc_rdma_module_t ompi_osc_rdma_module_t;
 273 OMPI_MODULE_DECLSPEC extern ompi_osc_rdma_component_t mca_osc_rdma_component;
 274 
 275 #define GET_MODULE(win) ((ompi_osc_rdma_module_t*) win->w_osc_module)
 276 
 277 int ompi_osc_rdma_free (struct ompi_win_t *win);
 278 
 279 
 280 /* peer functions */
 281 
 282 /**
 283  * @brief cache a peer object
 284  *
 285  * @param[in] module          osc rdma module
 286  * @param[in] peer            peer object to cache
 287  *
 288  * @returns OMPI_SUCCESS on success
 289  * @returns OMPI_ERR_OUT_OF_RESOURCE on failure
 290  */
 291 int ompi_osc_module_add_peer (ompi_osc_rdma_module_t *module, ompi_osc_rdma_peer_t *peer);
 292 
 293 /**
 294  * @brief demand lock a peer
 295  *
 296  * @param[in] module          osc rdma module
 297  * @param[in] peer            peer to lock
 298  *
 299  * @returns OMPI_SUCCESS on success
 300  */
 301 int ompi_osc_rdma_demand_lock_peer (ompi_osc_rdma_module_t *module, ompi_osc_rdma_peer_t *peer);
 302 
 303 /**
 304  * @brief check if a peer object is cached for a remote rank
 305  *
 306  * @param[in] module          osc rdma module
 307  * @param[in] peer_id         remote peer rank
 308  *
 309  * @returns peer object on success
 310  * @returns NULL if a peer object is not cached for the peer
 311  */
 312 static inline ompi_osc_rdma_peer_t *ompi_osc_module_get_peer (ompi_osc_rdma_module_t *module, int peer_id)
 313 {
 314     if (NULL == module->peer_array) {
 315         ompi_osc_rdma_peer_t *peer = NULL;
 316         (void) opal_hash_table_get_value_uint32 (&module->peer_hash, peer_id, (void **) &peer);
 317         return peer;
 318     }
 319 
 320     return module->peer_array[peer_id];
 321 }
 322 
 323 /**
 324  * @brief get the peer object for a remote rank
 325  *
 326  * @param[in] module          osc rdma module
 327  * @param[in] peer_id         remote peer rank
 328  */
 329 static inline ompi_osc_rdma_peer_t *ompi_osc_rdma_module_peer (ompi_osc_rdma_module_t *module, int peer_id)
 330 {
 331     ompi_osc_rdma_peer_t *peer;
 332 
 333     peer = ompi_osc_module_get_peer (module, peer_id);
 334     if (NULL != peer) {
 335         return peer;
 336     }
 337 
 338     return ompi_osc_rdma_peer_lookup (module, peer_id);
 339 }
 340 
 341 /**
 342  * @brief check if this process has this process is in a passive target access epoch
 343  *
 344  * @param[in] module          osc rdma module
 345  */
 346 static inline bool ompi_osc_rdma_in_passive_epoch (ompi_osc_rdma_module_t *module)
 347 {
 348     return 0 != module->passive_target_access_epoch;
 349 }
 350 
 351 static inline int _ompi_osc_rdma_register (ompi_osc_rdma_module_t *module, struct mca_btl_base_endpoint_t *endpoint, void *ptr,
 352                                            size_t size, uint32_t flags, mca_btl_base_registration_handle_t **handle, int line, const char *file)
 353 {
 354     if (module->selected_btl->btl_register_mem) {
 355         OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_INFO, "registering segment with btl. range: %p - %p (%lu bytes)",
 356                          ptr, (void*)((char *) ptr + size), size);
 357 
 358         *handle = module->selected_btl->btl_register_mem (module->selected_btl, endpoint, ptr, size, flags);
 359         if (OPAL_UNLIKELY(NULL == *handle)) {
 360             OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_DEBUG, "failed to register pointer with selected BTL. base: %p, "
 361                              "size: %lu. file: %s, line: %d", ptr, (unsigned long) size, file, line);
 362             return OMPI_ERR_OUT_OF_RESOURCE;
 363         }
 364     } else {
 365         *handle = NULL;
 366     }
 367 
 368     return OMPI_SUCCESS;
 369 }
 370 
 371 #define ompi_osc_rdma_register(...) _ompi_osc_rdma_register(__VA_ARGS__, __LINE__, __FILE__)
 372 
 373 static inline void _ompi_osc_rdma_deregister (ompi_osc_rdma_module_t *module, mca_btl_base_registration_handle_t *handle, int line, const char *file)
 374 {
 375     if (handle) {
 376         module->selected_btl->btl_deregister_mem (module->selected_btl, handle);
 377     }
 378 }
 379 
 380 #define ompi_osc_rdma_deregister(...) _ompi_osc_rdma_deregister(__VA_ARGS__, __LINE__, __FILE__)
 381 
 382 static inline void ompi_osc_rdma_progress (ompi_osc_rdma_module_t *module) {
 383     opal_progress ();
 384 }
 385 
 386 /**
 387  * Find the first outstanding lock of the target.
 388  *
 389  * @param[in]  module   osc rdma module
 390  * @param[in]  target   target rank
 391  * @param[out] peer     peer object associated with the target
 392  *
 393  * @returns an outstanding lock on success
 394  *
 395  * This function looks for an outstanding lock to the target. If a lock exists it is returned.
 396  */
 397 static inline ompi_osc_rdma_sync_t *ompi_osc_rdma_module_lock_find (ompi_osc_rdma_module_t *module, int target,
 398                                                                     ompi_osc_rdma_peer_t **peer)
 399 {
 400     ompi_osc_rdma_sync_t *outstanding_lock = NULL;
 401 
 402     if (OPAL_LIKELY(NULL != module->outstanding_lock_array)) {
 403         outstanding_lock = module->outstanding_lock_array[target];
 404     } else {
 405         (void) opal_hash_table_get_value_uint32 (&module->outstanding_locks, (uint32_t) target, (void **) &outstanding_lock);
 406     }
 407 
 408     if (NULL != outstanding_lock && peer) {
 409         *peer = outstanding_lock->peer_list.peer;
 410     }
 411 
 412     return outstanding_lock;
 413 }
 414 
 415 /**
 416  * Add an outstanding lock
 417  *
 418  * @param[in] module   osc rdma module
 419  * @param[in] lock     lock object
 420  *
 421  * This function inserts a lock object to the list of outstanding locks. The caller must be holding the module
 422  * lock.
 423  */
 424 static inline void ompi_osc_rdma_module_lock_insert (struct ompi_osc_rdma_module_t *module, ompi_osc_rdma_sync_t *lock)
 425 {
 426     if (OPAL_LIKELY(NULL != module->outstanding_lock_array)) {
 427         module->outstanding_lock_array[lock->sync.lock.target] = lock;
 428     } else {
 429         (void) opal_hash_table_set_value_uint32 (&module->outstanding_locks, (uint32_t) lock->sync.lock.target, (void *) lock);
 430     }
 431 }
 432 
 433 
 434 /**
 435  * Remove an outstanding lock
 436  *
 437  * @param[in] module   osc rdma module
 438  * @param[in] lock     lock object
 439  *
 440  * This function removes a lock object to the list of outstanding locks. The caller must be holding the module
 441  * lock.
 442  */
 443 static inline void ompi_osc_rdma_module_lock_remove (struct ompi_osc_rdma_module_t *module, ompi_osc_rdma_sync_t *lock)
 444 {
 445     if (OPAL_LIKELY(NULL != module->outstanding_lock_array)) {
 446         module->outstanding_lock_array[lock->sync.lock.target] = NULL;
 447     } else {
 448         (void) opal_hash_table_remove_value_uint32 (&module->outstanding_locks, (uint32_t) lock->sync.lock.target);
 449     }
 450 }
 451 
 452 /**
 453  * Lookup a synchronization object associated with the target
 454  *
 455  * @param[in] module   osc rdma module
 456  * @param[in] target   target rank
 457  * @param[out] peer    peer object
 458  *
 459  * @returns NULL if the target is not locked, fenced, or part of a pscw sync
 460  * @returns synchronization object on success
 461  *
 462  * This function returns the synchronization object associated with an access epoch for
 463  * the target. If the target is not part of any current access epoch then NULL is returned.
 464  */
 465 static inline ompi_osc_rdma_sync_t *ompi_osc_rdma_module_sync_lookup (ompi_osc_rdma_module_t *module, int target, struct ompi_osc_rdma_peer_t **peer)
 466 {
 467     OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "looking for synchronization object for target %d", target);
 468 
 469     switch (module->all_sync.type) {
 470     case OMPI_OSC_RDMA_SYNC_TYPE_NONE:
 471         if (!module->no_locks) {
 472             return ompi_osc_rdma_module_lock_find (module, target, peer);
 473         }
 474 
 475         return NULL;
 476     case OMPI_OSC_RDMA_SYNC_TYPE_LOCK:
 477         OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "found lock_all access epoch for target %d", target);
 478 
 479         *peer = ompi_osc_rdma_module_peer (module, target);
 480         if (OPAL_UNLIKELY(OMPI_OSC_RDMA_LOCKING_ON_DEMAND == module->locking_mode &&
 481                           !ompi_osc_rdma_peer_is_demand_locked (*peer))) {
 482             ompi_osc_rdma_demand_lock_peer (module, *peer);
 483         }
 484 
 485         return &module->all_sync;
 486     case OMPI_OSC_RDMA_SYNC_TYPE_FENCE:
 487         OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "found fence access epoch for target %d", target);
 488         /* fence epoch is now active */
 489         module->all_sync.epoch_active = true;
 490         *peer = ompi_osc_rdma_module_peer (module, target);
 491 
 492         return &module->all_sync;
 493     case OMPI_OSC_RDMA_SYNC_TYPE_PSCW:
 494         if (ompi_osc_rdma_sync_pscw_peer (module, target, peer)) {
 495             OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "found PSCW access epoch target for %d", target);
 496             return &module->all_sync;
 497         }
 498     }
 499 
 500     OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_INFO, "no access epoch found for target %d", target);
 501 
 502     return NULL;
 503 }
 504 
 505 static bool ompi_osc_rdma_use_btl_flush (ompi_osc_rdma_module_t *module)
 506 {
 507 #if defined(BTL_VERSION) && (BTL_VERSION >= 310)
 508     return !!(module->selected_btl->btl_flush);
 509 #else
 510     return false;
 511 #endif
 512 }
 513 
 514 /**
 515  * @brief increment the outstanding rdma operation counter (atomic)
 516  *
 517  * @param[in] rdma_sync         osc rdma synchronization object
 518  */
 519 static inline void ompi_osc_rdma_sync_rdma_inc_always (ompi_osc_rdma_sync_t *rdma_sync)
 520 {
 521     ompi_osc_rdma_counter_add (&rdma_sync->outstanding_rdma.counter, 1);
 522 
 523     OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_INFO, "inc: there are %ld outstanding rdma operations",
 524                      (unsigned long) rdma_sync->outstanding_rdma.counter);
 525 }
 526 
 527 static inline void ompi_osc_rdma_sync_rdma_inc (ompi_osc_rdma_sync_t *rdma_sync)
 528 {
 529 #if defined(BTL_VERSION) && (BTL_VERSION >= 310)
 530     if (ompi_osc_rdma_use_btl_flush (rdma_sync->module)) {
 531         return;
 532     }
 533 #endif
 534     ompi_osc_rdma_sync_rdma_inc_always (rdma_sync);
 535 }
 536 
 537 /**
 538  * @brief decrement the outstanding rdma operation counter (atomic)
 539  *
 540  * @param[in] rdma_sync         osc rdma synchronization object
 541  */
 542 static inline void ompi_osc_rdma_sync_rdma_dec_always (ompi_osc_rdma_sync_t *rdma_sync)
 543 {
 544     opal_atomic_wmb ();
 545     ompi_osc_rdma_counter_add (&rdma_sync->outstanding_rdma.counter, -1);
 546 
 547     OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_INFO, "dec: there are %ld outstanding rdma operations",
 548                      (unsigned long) rdma_sync->outstanding_rdma.counter);
 549 }
 550 
 551 static inline void ompi_osc_rdma_sync_rdma_dec (ompi_osc_rdma_sync_t *rdma_sync)
 552 {
 553 #if defined(BTL_VERSION) && (BTL_VERSION >= 310)
 554     if (ompi_osc_rdma_use_btl_flush (rdma_sync->module)) {
 555         return;
 556     }
 557 #endif
 558     ompi_osc_rdma_sync_rdma_dec_always (rdma_sync);
 559 }
 560 
 561 /**
 562  * @brief complete all outstanding rdma operations to all peers
 563  *
 564  * @param[in] module          osc rdma module
 565  */
 566 static inline void ompi_osc_rdma_sync_rdma_complete (ompi_osc_rdma_sync_t *sync)
 567 {
 568 #if !defined(BTL_VERSION) || (BTL_VERSION < 310)
 569     do {
 570         opal_progress ();
 571     }  while (ompi_osc_rdma_sync_get_count (sync));
 572 #else
 573     mca_btl_base_module_t *btl_module = sync->module->selected_btl;
 574 
 575     do {
 576         if (!ompi_osc_rdma_use_btl_flush (sync->module)) {
 577             opal_progress ();
 578         } else {
 579             btl_module->btl_flush (btl_module, NULL);
 580         }
 581     }  while (ompi_osc_rdma_sync_get_count (sync) || (sync->module->rdma_frag && (sync->module->rdma_frag->pending > 1)));
 582 #endif
 583 }
 584 
 585 /**
 586  * @brief check if an access epoch is active
 587  *
 588  * @param[in] module        osc rdma module
 589  *
 590  * @returns true if any type of access epoch is active
 591  * @returns false otherwise
 592  *
 593  * This function is used to check for conflicting access epochs.
 594  */
 595 static inline bool ompi_osc_rdma_access_epoch_active (ompi_osc_rdma_module_t *module)
 596 {
 597     return (module->all_sync.epoch_active || ompi_osc_rdma_in_passive_epoch (module));
 598 }
 599 
 600 __opal_attribute_always_inline__
 601 static inline bool ompi_osc_rdma_oor (int rc)
 602 {
 603     /* check for OPAL_SUCCESS first to short-circuit the statement in the common case */
 604     return (OPAL_SUCCESS != rc && (OPAL_ERR_OUT_OF_RESOURCE == rc || OPAL_ERR_TEMP_OUT_OF_RESOURCE == rc));
 605 }
 606 
 607 #endif /* OMPI_OSC_RDMA_H */

/* [<][>][^][v][top][bottom][index][help] */