root/opal/mca/hwloc/external/external.h

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

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2011-2019 Cisco Systems, Inc.  All rights reserved
   3  * Copyright (c) 2016-2019 Research Organization for Information Science
   4  *                         and Technology (RIST). All rights reserved.
   5  *
   6  * Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
   7  * $COPYRIGHT$
   8  *
   9  * Additional copyrights may follow
  10  *
  11  * $HEADER$
  12  *
  13  * When this component is used, this file is included in the rest of
  14  * the OPAL/ORTE/OMPI code base via opal/mca/hwloc/hwloc-internal.h.  As such,
  15  * this header represents the public interface to this static component.
  16  */
  17 
  18 #ifndef MCA_OPAL_HWLOC_EXTERNAL_H
  19 #define MCA_OPAL_HWLOC_EXTERNAL_H
  20 
  21 BEGIN_C_DECLS
  22 
  23 #include <opal_config.h>
  24 
  25 /* Top-level configure will always configure the embedded hwloc
  26  * component, even if we already know that we'll be using an external
  27  * hwloc (because of complicated reasons). A side-effect of this is
  28  * that the embedded hwloc will AC_DEFINE HWLOC_VERSION (and friends)
  29  * in opal_config.h. If the external hwloc defines a different value
  30  * of HWLOC_VERSION (etc.), we'll get zillions of warnings about the
  31  * two HWLOC_VERSION values not matching.  Hence, we undefined all of
  32  * them here (so that the external <hwloc.h> can define them to
  33  * whatever it wants). */
  34 
  35 #undef HWLOC_VERSION
  36 #undef HWLOC_VERSION_MAJOR
  37 #undef HWLOC_VERSION_MINOR
  38 #undef HWLOC_VERSION_RELEASE
  39 #undef HWLOC_VERSION_GREEK
  40 
  41 #include MCA_hwloc_external_header
  42 
  43 /* If the including file requested it, also include the hwloc verbs
  44    helper file.  We can't just always include this file (even if we
  45    know we have <infiniband/verbs.h>) because there are some inline
  46    functions in that file that invoke ibv_* functions.  Some linkers
  47    (e.g., Solaris Studio Compilers) will instantiate those static
  48    inline functions even if we don't use them, and therefore we need
  49    to be able to resolve the ibv_* symbols at link time.
  50 
  51    Since -libverbs is only specified in places where we use other
  52    ibv_* functions (e.g., the OpenFabrics-based BTLs), that means that
  53    linking random executables can/will fail (e.g., orterun).
  54  */
  55 #if defined(OPAL_HWLOC_WANT_VERBS_HELPER) && OPAL_HWLOC_WANT_VERBS_HELPER
  56 #    if defined(HAVE_INFINIBAND_VERBS_H)
  57 #        include MCA_hwloc_external_openfabrics_header
  58 #    else
  59 #        error Tried to include hwloc verbs helper file, but hwloc was compiled with no OpenFabrics support
  60 #    endif
  61 #endif
  62 
  63 #if defined(OPAL_HWLOC_WANT_SHMEM) && OPAL_HWLOC_WANT_SHMEM
  64 #    if HWLOC_API_VERSION >= 0x20000
  65 #        include MCA_hwloc_external_shmem_header
  66 #    endif
  67 /* Do nothing in the 1.x case because the caller doesn't know HWLOC_API_VERSION when it sets OPAL_HWLOC_WANT_SHMEM.
  68  * Calls to hwloc/shmem.h are protected by HWLOC_API_VERSION >= 0x20000 in the actual code.
  69  */
  70 #endif
  71 
  72 #if HWLOC_API_VERSION < 0x00010b00
  73 #define HWLOC_OBJ_NUMANODE HWLOC_OBJ_NODE
  74 #define HWLOC_OBJ_PACKAGE HWLOC_OBJ_SOCKET
  75 #endif
  76 
  77 END_C_DECLS
  78 
  79 #endif /* MCA_OPAL_HWLOC_EXTERNAL_H */

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