root/ompi/mca/mtl/ofi/mtl_ofi_compat.h

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

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2015 Intel, Inc.  All rights reserved.
   3  * Copyright (c) 2015 Cisco Systems, Inc.  All rights reserved.
   4  * $COPYRIGHT$
   5  *
   6  * Additional copyrights may follow
   7  *
   8  * $HEADER$
   9  */
  10 
  11 /* This header contains macros to help minimize usnic BTL differences
  12  * between v1.7/v1.8 and v1.9/v2.0. */
  13 
  14 #ifndef MTL_OFI_COMPAT_H
  15 #define MTL_OFI_COMPAT_H
  16 
  17 /************************************************************************/
  18 
  19 /* v2.0 and beyond */
  20 
  21 #if (OPAL_MAJOR_VERSION >= 2)
  22 
  23 #include "opal/mca/pmix/pmix.h"
  24 #include "opal/mca/pmix/pmix_types.h"
  25 
  26 #define OFI_COMPAT_MODEX_RECV(ret, mtl_version, proc, ep_name, size) \
  27     OPAL_MODEX_RECV((ret), (mtl_version), &(proc)->super.proc_name, (ep_name), (size));
  28 
  29 #define OFI_COMPAT_MODEX_SEND(ret, mtl_version, ep_name, namelen) \
  30     OPAL_MODEX_SEND((ret),          \
  31                     OPAL_PMIX_GLOBAL,    \
  32                     (mtl_version),  \
  33                     (ep_name)[0],   \
  34                     (namelen));
  35 
  36 #define OFI_COMPAT_MCA_VERSION \
  37     MCA_BASE_MAKE_VERSION(component, \
  38                           OMPI_MAJOR_VERSION, \
  39                           OMPI_MINOR_VERSION, \
  40                           OMPI_RELEASE_VERSION)
  41 
  42 
  43 /************************************************************************/
  44 
  45 /* v1.7, v1.8, and v1.10 (there was no v1.9) */
  46 
  47 #elif (OPAL_MAJOR_VERSION == 1 && OPAL_MINOR_VERSION >= 7)
  48 
  49 #include "ompi/runtime/ompi_module_exchange.h"
  50 
  51 #define OFI_COMPAT_MODEX_RECV(ret, mtl_version, proc, ep_name, size) \
  52     (ret) = ompi_modex_recv((mtl_version), (proc), (ep_name), (size));
  53 
  54 #define OFI_COMPAT_MODEX_SEND(ret, mtl_version, ep_name, namelen) \
  55     (ret) = ompi_modex_send((mtl_version), (ep_name), (namelen));
  56 
  57 #define OFI_COMPAT_MCA_VERSION \
  58     OMPI_MAJOR_VERSION, \
  59     OMPI_MINOR_VERSION, \
  60     OMPI_RELEASE_VERSION
  61 
  62 /************************************************************************/
  63 
  64 #else
  65 #  error OMPI version too old (< 1.7)
  66 #endif
  67 
  68 #endif /* MTL_OFI_COMPAT_H */

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