root/opal/mca/btl/usnic/btl_usnic_compat.h

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

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. usnic_compat_proc_name_compare

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2013-2019 Cisco Systems, Inc.  All rights reserved
   4  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
   5  *                         reserved.
   6  * Copyright (c) 2018      Intel, Inc. All rights reserved.
   7  * $COPYRIGHT$
   8  *
   9  * Additional copyrights may follow
  10  *
  11  * $HEADER$
  12  */
  13 
  14 /* This header contains macros to help minimize usnic BTL differences
  15  * between v1.7/v1.8, v1.9/v2.0, and v2.0/v2.1. */
  16 
  17 #ifndef BTL_USNIC_COMPAT_H
  18 #define BTL_USNIC_COMPAT_H
  19 
  20 #include "opal/mca/rcache/rcache.h"
  21 #include "opal/mca/btl/btl.h"
  22 
  23 /************************************************************************/
  24 
  25 /* OMPI_ERROR_LOG and friends */
  26 #include "opal/util/error.h"
  27 
  28 /* PMIX / modex stuff */
  29 #include "opal/mca/pmix/pmix.h"
  30 
  31 /* Proc stuff */
  32 #include "opal/util/proc.h"
  33 
  34 /* Free lists are unified into OPAL free lists */
  35 #include "opal/class/opal_free_list.h"
  36 
  37 /* Inclue the progress thread stuff */
  38 #include "opal/runtime/opal_progress_threads.h"
  39 
  40 #define USNIC_OUT opal_btl_base_framework.framework_output
  41 /* JMS Really want to be able to get the job size somehow...  But for
  42    now, so that we can compile, just set it to a constant :-( */
  43 #define USNIC_MCW_SIZE 2
  44 #define proc_bound() (NULL != opal_process_info.cpuset ? 1 : 0)
  45 #define USNIC_BTL_DEFAULT_VERSION(name) MCA_BTL_DEFAULT_VERSION(name)
  46 
  47 #define USNIC_SEND_LOCAL        des_segments
  48 #define USNIC_SEND_LOCAL_COUNT  des_segment_count
  49 #define USNIC_SEND_REMOTE       des_segments
  50 #define USNIC_SEND_REMOTE_COUNT des_segment_count
  51 
  52 #define USNIC_RECV_LOCAL        des_segments
  53 #define USNIC_RECV_LOCAL_COUNT  des_segment_count
  54 #define USNIC_RECV_REMOTE       des_segments
  55 #define USNIC_RECV_REMOTE_COUNT des_segment_count
  56 
  57 #define USNIC_PUT_LOCAL         des_segments
  58 #define USNIC_PUT_LOCAL_COUNT   des_segment_count
  59 #define USNIC_PUT_REMOTE        des_segments
  60 #define USNIC_PUT_REMOTE_COUNT  des_segments_count
  61 
  62 #define USNIC_COMPAT_FREE_LIST_GET(list, item) \
  63     (item) = opal_free_list_get((list))
  64 #define USNIC_COMPAT_FREE_LIST_RETURN(list, item) \
  65     opal_free_list_return((list), (item))
  66 
  67 #define usnic_compat_free_list_init opal_free_list_init
  68 
  69 /*
  70  * Performance critical; needs to be inline
  71  */
  72 static inline int
  73 usnic_compat_proc_name_compare(opal_process_name_t a,
  74                                opal_process_name_t b)
  75 {
  76     return (bool) (a.jobid == b.jobid && a.vpid == b.vpid);
  77 }
  78 
  79 /************************************************************************/
  80 
  81 /* Forward declare to avoid #include ordering complications */
  82 struct opal_btl_usnic_modex_t;
  83 
  84 void usnic_compat_modex_send(int *rc,
  85                              mca_base_component_t *component,
  86                              struct opal_btl_usnic_modex_t *modexes,
  87                              size_t size);
  88 
  89 void usnic_compat_modex_recv(int *rc,
  90                              mca_base_component_t *component,
  91                              opal_proc_t *proc,
  92                              struct opal_btl_usnic_modex_t **modexes,
  93                              size_t *size);
  94 
  95 uint64_t usnic_compat_rte_hash_name(opal_process_name_t *pname);
  96 const char *usnic_compat_proc_name_print(opal_process_name_t *pname);
  97 
  98 /************************************************************************/
  99 
 100 struct mca_btl_base_module_t;
 101 struct mca_btl_base_endpoint_t;
 102 
 103 struct mca_btl_base_descriptor_t *
 104 opal_btl_usnic_prepare_src(struct mca_btl_base_module_t *base_module,
 105                            struct mca_btl_base_endpoint_t *endpoint,
 106                            struct opal_convertor_t *convertor,
 107                            uint8_t order,
 108                            size_t reserve,
 109                            size_t *size,
 110                            uint32_t flags);
 111 
 112 int
 113 opal_btl_usnic_put(struct mca_btl_base_module_t *base_module,
 114                    struct mca_btl_base_endpoint_t *endpoint,
 115                    void *local_address, uint64_t remote_address,
 116                    struct mca_btl_base_registration_handle_t *local_handle,
 117                    struct mca_btl_base_registration_handle_t *remote_handle,
 118                    size_t size, int flags, int order,
 119                    mca_btl_base_rdma_completion_fn_t cbfunc,
 120                    void *cbcontext, void *cbdata);
 121 
 122 #endif /* BTL_USNIC_COMPAT_H */

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