root/ompi/mca/mtl/psm/mtl_psm_types.h

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

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2007 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2006 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2006      QLogic Corporation. All rights reserved.
  13  * Copyright (c) 2011      Los Alamos National Security, LLC.
  14  *                         All rights reserved.
  15  * $COPYRIGHT$
  16  *
  17  * Additional copyrights may follow
  18  *
  19  * $HEADER$
  20  */
  21 
  22 #ifndef MTL_PSM_TYPES_H_HAS_BEEN_INCLUDED
  23 #define MTL_PSM_TYPES_H_HAS_BEEN_INCLUDED
  24 
  25 #include "ompi_config.h"
  26 #include "mtl_psm.h"
  27 
  28 #include "ompi/mca/mtl/mtl.h"
  29 #include "ompi/mca/mtl/base/base.h"
  30 #include "mtl_psm_endpoint.h"
  31 
  32 #include "psm.h"
  33 
  34 
  35 BEGIN_C_DECLS
  36 
  37 /**
  38  * MTL Module Interface
  39  */
  40 struct mca_mtl_psm_module_t {
  41     mca_mtl_base_module_t super; /**< base MTL interface */
  42 
  43     int32_t      connect_timeout;
  44 
  45     int32_t      debug_level;
  46     int32_t      ib_unit;
  47     int32_t      ib_port;
  48     int32_t      ib_service_level;
  49     uint64_t     ib_pkey;
  50 
  51 #if PSM_VERNO >= 0x010d
  52     unsigned long long ib_service_id;
  53     /* use int instead of psm_path_res_t so we can register this with
  54        the MCA variable system */
  55     int          path_res_type;
  56 #endif
  57 
  58     psm_ep_t     ep;
  59     psm_mq_t     mq;
  60     psm_epid_t   epid;
  61     psm_epaddr_t epaddr;
  62 };
  63 
  64 typedef struct mca_mtl_psm_module_t mca_mtl_psm_module_t;
  65 
  66 extern mca_mtl_psm_module_t ompi_mtl_psm;
  67 
  68 struct mca_mtl_psm_component_t {
  69     mca_mtl_base_component_2_0_0_t          super;  /**< base MTL component */
  70 };
  71 typedef struct mca_mtl_psm_component_t mca_mtl_psm_component_t;
  72 
  73 OMPI_DECLSPEC extern mca_mtl_psm_component_t mca_mtl_psm_component;
  74 
  75 #define PSM_MAKE_MQTAG(ctxt,rank,utag)              \
  76         ( (((ctxt)&0xffffULL)<<48)| (((rank)&0xffffULL)<<32)| \
  77           (((utag)&0xffffffffULL)) )
  78 
  79 #define PSM_GET_MQRANK(tag_u64) ((int)(((tag_u64)>>32)&0xffff))
  80 #define PSM_GET_MQUTAG(tag_u64) ((int)((tag_u64)&0xffffffffULL))
  81 
  82 #define PSM_MAKE_TAGSEL(user_rank, user_tag, user_ctxt, tag, tagsel)            \
  83         do {                                                                    \
  84             (tagsel) = 0xffffffffffffffffULL;                                   \
  85             (tag)    = PSM_MAKE_MQTAG((user_ctxt),(user_rank),(user_tag));      \
  86             if ((user_tag) == MPI_ANY_TAG) {                                    \
  87                 (tagsel) &= ~0x7fffffffULL;                                     \
  88                 (tag) &= ~0xffffffffULL;                                        \
  89             }                                                                   \
  90             if ((user_rank) == MPI_ANY_SOURCE)                                  \
  91                 (tagsel) &= ~0xffff00000000ULL;                                 \
  92         } while (0)
  93 
  94 END_C_DECLS
  95 
  96 #endif  /* MTL_PSM_TYPES_H_HAS_BEEN_INCLUDED */
  97 

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