This source file includes following definitions.
- OMPI_CAST_RTE_NAME
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 #ifndef MCA_OMPI_RTE_PMIX_H
  25 #define MCA_OMPI_RTE_PMIX_H
  26 
  27 #include "ompi_config.h"
  28 #include "ompi/constants.h"
  29 
  30 #include <stdint.h>
  31 
  32 #ifdef HAVE_SYS_TYPES_H
  33 #include <sys/types.h>
  34 #endif
  35 
  36 struct opal_proc_t;
  37 
  38 #include "opal/threads/threads.h"
  39 #include "opal/util/proc.h"
  40 #include "opal/mca/hwloc/hwloc-internal.h"
  41 #include "opal/mca/pmix/pmix.h"
  42 
  43 struct ompi_proc_t;
  44 struct ompi_communicator_t;
  45 
  46 BEGIN_C_DECLS
  47 
  48 
  49 typedef opal_process_name_t ompi_process_name_t;
  50 typedef uint32_t ompi_jobid_t;
  51 typedef uint32_t ompi_vpid_t;
  52 
  53 
  54 OMPI_DECLSPEC extern opal_process_name_t pmix_name_wildcard;
  55 OMPI_DECLSPEC extern hwloc_cpuset_t ompi_proc_applied_binding;
  56 
  57 #define OMPI_PROC_MY_NAME (&pmix_process_info.my_name)
  58 #define OMPI_NAME_WILDCARD  (&pmix_name_wildcard)
  59 
  60 typedef uint8_t ompi_rte_cmp_bitmask_t;
  61 #define OMPI_RTE_CMP_NONE   0x00
  62 #define OMPI_RTE_CMP_JOBID  0x02
  63 #define OMPI_RTE_CMP_VPID   0x04
  64 #define OMPI_RTE_CMP_ALL    0x0f
  65 #define OMPI_RTE_CMP_WILD   0x10
  66 
  67 OMPI_DECLSPEC char* ompi_pmix_print_name(const ompi_process_name_t *name);
  68 
  69 #define OMPI_NAME_PRINT(a) ompi_pmix_print_name(a)
  70 OMPI_DECLSPEC int ompi_rte_compare_name_fields(ompi_rte_cmp_bitmask_t mask,
  71                                                const opal_process_name_t* name1,
  72                                                const opal_process_name_t* name2);
  73 OMPI_DECLSPEC int ompi_rte_convert_string_to_process_name(opal_process_name_t *name,
  74                                                           const char* name_string);
  75 OMPI_DECLSPEC int ompi_rte_convert_process_name_to_string(char** name_string,
  76                                                           const opal_process_name_t *name);
  77 
  78 #define OMPI_LOCAL_JOBID(n) \
  79     ( (n) & 0x0000ffff)
  80 #define OMPI_JOB_FAMILY(n)  \
  81     (((n) >> 16) & 0x0000ffff)
  82 #define OMPI_CONSTRUCT_LOCAL_JOBID(local, job) \
  83     ( ((local) & 0xffff0000) | ((job) & 0x0000ffff) )
  84 #define OMPI_CONSTRUCT_JOB_FAMILY(n) \
  85     ( ((n) << 16) & 0xffff0000)
  86 
  87 #define OMPI_CONSTRUCT_JOBID(family, local) \
  88     OMPI_CONSTRUCT_LOCAL_JOBID(OMPI_CONSTRUCT_JOB_FAMILY(family), local)
  89 
  90 
  91 #define OMPI_NAME OPAL_NAME
  92 #define OMPI_PROCESS_NAME_HTON OPAL_PROCESS_NAME_HTON
  93 #define OMPI_PROCESS_NAME_NTOH OPAL_PROCESS_NAME_NTOH
  94 
  95 #if OPAL_ENABLE_DEBUG
  96 static inline opal_process_name_t * OMPI_CAST_RTE_NAME(opal_process_name_t * name) {
  97     return (opal_process_name_t *)name;
  98 }
  99 #else
 100 #define OMPI_CAST_RTE_NAME(a) ((opal_process_name_t*)(a))
 101 #endif
 102 
 103 
 104 typedef uint16_t ompi_node_rank_t;
 105 typedef uint16_t ompi_local_rank_t;
 106 #define OMPI_NODE_RANK_INVALID UINT16_MAX
 107 #define OMPI_LOCAL_RANK_INVALID UINT16_MAX
 108 
 109 typedef struct {
 110     opal_process_name_t my_name;
 111     char *my_hnp_uri;
 112     char *nodename;
 113     pid_t pid;
 114     char *job_session_dir;
 115     char *proc_session_dir;
 116     uint16_t my_local_rank;
 117     uint16_t my_node_rank;
 118     int32_t num_local_peers;
 119     uint32_t num_procs;
 120     uint32_t app_num;
 121     char *cpuset;
 122 } pmix_process_info_t;
 123 OMPI_DECLSPEC extern pmix_process_info_t pmix_process_info;
 124 #define ompi_process_info pmix_process_info
 125 
 126 OMPI_DECLSPEC extern bool pmix_proc_is_bound;
 127 #define ompi_rte_proc_is_bound pmix_proc_is_bound
 128 
 129 
 130 OMPI_DECLSPEC void __opal_attribute_noreturn__
 131   ompi_rte_abort(int error_code, char *fmt, ...);
 132 OMPI_DECLSPEC void ompi_rte_abort_peers(opal_process_name_t *procs,
 133                                         int32_t num_procs,
 134                                         int error_code);
 135 #define OMPI_ERROR_LOG OPAL_ERROR_LOG
 136 
 137 
 138 OMPI_DECLSPEC int ompi_rte_init(int *argc, char ***argv);
 139 OMPI_DECLSPEC int ompi_rte_finalize(void);
 140 OMPI_DECLSPEC void ompi_rte_wait_for_debugger(void);
 141 
 142 
 143 OMPI_DECLSPEC bool ompi_rte_connect_accept_support(const char *port);
 144 
 145 END_C_DECLS
 146 
 147 #endif