root/ompi/mpi/cxx/constants.h

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

INCLUDED FROM


   1 // -*- c++ -*-
   2 //
   3 // Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   4 //                         University Research and Technology
   5 //                         Corporation.  All rights reserved.
   6 // Copyright (c) 2004-2005 The University of Tennessee and The University
   7 //                         of Tennessee Research Foundation.  All rights
   8 //                         reserved.
   9 // Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
  10 //                         University of Stuttgart.  All rights reserved.
  11 // Copyright (c) 2004-2005 The Regents of the University of California.
  12 //                         All rights reserved.
  13 // Copyright (c) 2008-2009 Cisco Systems, Inc.  All rights reserved.
  14 // Copyright (c) 2011      FUJITSU LIMITED.  All rights reserved.
  15 // Copyright (c) 2017      Research Organization for Information Science
  16 //                         and Technology (RIST). All rights reserved.
  17 // $COPYRIGHT$
  18 //
  19 // Additional copyrights may follow
  20 //
  21 // $HEADER$
  22 //
  23 
  24 // return  codes
  25 static const int SUCCESS = MPI_SUCCESS;
  26 static const int ERR_BUFFER = MPI_ERR_BUFFER;
  27 static const int ERR_COUNT = MPI_ERR_COUNT;
  28 static const int ERR_TYPE = MPI_ERR_TYPE;
  29 static const int ERR_TAG  = MPI_ERR_TAG ;
  30 static const int ERR_COMM = MPI_ERR_COMM;
  31 static const int ERR_RANK = MPI_ERR_RANK;
  32 static const int ERR_REQUEST = MPI_ERR_REQUEST;
  33 static const int ERR_ROOT = MPI_ERR_ROOT;
  34 static const int ERR_GROUP = MPI_ERR_GROUP;
  35 static const int ERR_OP = MPI_ERR_OP;
  36 static const int ERR_TOPOLOGY = MPI_ERR_TOPOLOGY;
  37 static const int ERR_DIMS = MPI_ERR_DIMS;
  38 static const int ERR_ARG = MPI_ERR_ARG;
  39 static const int ERR_UNKNOWN = MPI_ERR_UNKNOWN;
  40 static const int ERR_TRUNCATE = MPI_ERR_TRUNCATE;
  41 static const int ERR_OTHER = MPI_ERR_OTHER;
  42 static const int ERR_INTERN = MPI_ERR_INTERN;
  43 static const int ERR_PENDING = MPI_ERR_PENDING;
  44 static const int ERR_IN_STATUS = MPI_ERR_IN_STATUS;
  45 static const int ERR_ACCESS = MPI_ERR_ACCESS;
  46 static const int ERR_AMODE = MPI_ERR_AMODE;
  47 static const int ERR_ASSERT = MPI_ERR_ASSERT;
  48 static const int ERR_BAD_FILE = MPI_ERR_BAD_FILE;
  49 static const int ERR_BASE = MPI_ERR_BASE;
  50 static const int ERR_CONVERSION = MPI_ERR_CONVERSION;
  51 static const int ERR_DISP = MPI_ERR_DISP;
  52 static const int ERR_DUP_DATAREP = MPI_ERR_DUP_DATAREP;
  53 static const int ERR_FILE_EXISTS = MPI_ERR_FILE_EXISTS;
  54 static const int ERR_FILE_IN_USE = MPI_ERR_FILE_IN_USE;
  55 static const int ERR_FILE = MPI_ERR_FILE;
  56 static const int ERR_INFO_KEY = MPI_ERR_INFO_KEY;
  57 static const int ERR_INFO_NOKEY = MPI_ERR_INFO_NOKEY;
  58 static const int ERR_INFO_VALUE = MPI_ERR_INFO_VALUE;
  59 static const int ERR_INFO = MPI_ERR_INFO;
  60 static const int ERR_IO = MPI_ERR_IO;
  61 static const int ERR_KEYVAL = MPI_ERR_KEYVAL;
  62 static const int ERR_LOCKTYPE = MPI_ERR_LOCKTYPE;
  63 static const int ERR_NAME = MPI_ERR_NAME;
  64 static const int ERR_NO_MEM = MPI_ERR_NO_MEM;
  65 static const int ERR_NOT_SAME = MPI_ERR_NOT_SAME;
  66 static const int ERR_NO_SPACE = MPI_ERR_NO_SPACE;
  67 static const int ERR_NO_SUCH_FILE = MPI_ERR_NO_SUCH_FILE;
  68 static const int ERR_PORT = MPI_ERR_PORT;
  69 static const int ERR_QUOTA = MPI_ERR_QUOTA;
  70 static const int ERR_READ_ONLY = MPI_ERR_READ_ONLY;
  71 static const int ERR_RMA_CONFLICT = MPI_ERR_RMA_CONFLICT;
  72 static const int ERR_RMA_SYNC = MPI_ERR_RMA_SYNC;
  73 static const int ERR_SERVICE = MPI_ERR_SERVICE;
  74 static const int ERR_SIZE = MPI_ERR_SIZE;
  75 static const int ERR_SPAWN = MPI_ERR_SPAWN;
  76 static const int ERR_UNSUPPORTED_DATAREP = MPI_ERR_UNSUPPORTED_DATAREP;
  77 static const int ERR_UNSUPPORTED_OPERATION = MPI_ERR_UNSUPPORTED_OPERATION;
  78 static const int ERR_WIN = MPI_ERR_WIN;
  79 static const int ERR_LASTCODE = MPI_ERR_LASTCODE;
  80 
  81 // assorted constants
  82 OMPI_DECLSPEC extern void* const BOTTOM;
  83 OMPI_DECLSPEC extern void* const IN_PLACE;
  84 static const int PROC_NULL = MPI_PROC_NULL;
  85 static const int ANY_SOURCE = MPI_ANY_SOURCE;
  86 static const int ROOT = MPI_ROOT;
  87 static const int ANY_TAG = MPI_ANY_TAG;
  88 static const int UNDEFINED = MPI_UNDEFINED;
  89 static const int BSEND_OVERHEAD = MPI_BSEND_OVERHEAD;
  90 static const int KEYVAL_INVALID = MPI_KEYVAL_INVALID;
  91 static const int ORDER_C = MPI_ORDER_C;
  92 static const int ORDER_FORTRAN = MPI_ORDER_FORTRAN;
  93 static const int DISTRIBUTE_BLOCK = MPI_DISTRIBUTE_BLOCK;
  94 static const int DISTRIBUTE_CYCLIC = MPI_DISTRIBUTE_CYCLIC;
  95 static const int DISTRIBUTE_NONE = MPI_DISTRIBUTE_NONE;
  96 static const int DISTRIBUTE_DFLT_DARG = MPI_DISTRIBUTE_DFLT_DARG;
  97 
  98 // error-handling specifiers
  99 OMPI_DECLSPEC extern const Errhandler  ERRORS_ARE_FATAL;
 100 OMPI_DECLSPEC extern const Errhandler  ERRORS_RETURN;
 101 OMPI_DECLSPEC extern const Errhandler  ERRORS_THROW_EXCEPTIONS;
 102 
 103 // typeclass definitions for MPI_Type_match_size
 104 static const int TYPECLASS_INTEGER = MPI_TYPECLASS_INTEGER;
 105 static const int TYPECLASS_REAL = MPI_TYPECLASS_REAL;
 106 static const int TYPECLASS_COMPLEX = MPI_TYPECLASS_COMPLEX;
 107 
 108 // maximum sizes for strings
 109 static const int MAX_PROCESSOR_NAME = MPI_MAX_PROCESSOR_NAME;
 110 static const int MAX_ERROR_STRING = MPI_MAX_ERROR_STRING;
 111 static const int MAX_INFO_KEY = MPI_MAX_INFO_KEY;
 112 static const int MAX_INFO_VAL = MPI_MAX_INFO_VAL;
 113 static const int MAX_PORT_NAME = MPI_MAX_PORT_NAME;
 114 static const int MAX_OBJECT_NAME = MPI_MAX_OBJECT_NAME;
 115 
 116 // elementary datatypes (C / C++)
 117 OMPI_DECLSPEC extern const Datatype CHAR;
 118 OMPI_DECLSPEC extern const Datatype SHORT;
 119 OMPI_DECLSPEC extern const Datatype INT;
 120 OMPI_DECLSPEC extern const Datatype LONG;
 121 OMPI_DECLSPEC extern const Datatype SIGNED_CHAR;
 122 OMPI_DECLSPEC extern const Datatype UNSIGNED_CHAR;
 123 OMPI_DECLSPEC extern const Datatype UNSIGNED_SHORT;
 124 OMPI_DECLSPEC extern const Datatype UNSIGNED;
 125 OMPI_DECLSPEC extern const Datatype UNSIGNED_LONG;
 126 OMPI_DECLSPEC extern const Datatype FLOAT;
 127 OMPI_DECLSPEC extern const Datatype DOUBLE;
 128 OMPI_DECLSPEC extern const Datatype LONG_DOUBLE;
 129 OMPI_DECLSPEC extern const Datatype BYTE;
 130 OMPI_DECLSPEC extern const Datatype PACKED;
 131 OMPI_DECLSPEC extern const Datatype WCHAR;
 132 
 133 // datatypes for reductions functions (C / C++)
 134 OMPI_DECLSPEC extern const Datatype FLOAT_INT;
 135 OMPI_DECLSPEC extern const Datatype DOUBLE_INT;
 136 OMPI_DECLSPEC extern const Datatype LONG_INT;
 137 OMPI_DECLSPEC extern const Datatype TWOINT;
 138 OMPI_DECLSPEC extern const Datatype SHORT_INT;
 139 OMPI_DECLSPEC extern const Datatype LONG_DOUBLE_INT;
 140 
 141 // elementary datatype (Fortran)
 142 OMPI_DECLSPEC extern const Datatype INTEGER;
 143 OMPI_DECLSPEC extern const Datatype REAL;
 144 OMPI_DECLSPEC extern const Datatype DOUBLE_PRECISION;
 145 OMPI_DECLSPEC extern const Datatype F_COMPLEX;
 146 OMPI_DECLSPEC extern const Datatype LOGICAL;
 147 OMPI_DECLSPEC extern const Datatype CHARACTER;
 148 
 149 // datatype for reduction functions (Fortran)
 150 OMPI_DECLSPEC extern const Datatype TWOREAL;
 151 OMPI_DECLSPEC extern const Datatype TWODOUBLE_PRECISION;
 152 OMPI_DECLSPEC extern const Datatype TWOINTEGER;
 153 
 154 // optional datatypes (Fortran)
 155 OMPI_DECLSPEC extern const Datatype INTEGER1;
 156 OMPI_DECLSPEC extern const Datatype INTEGER2;
 157 OMPI_DECLSPEC extern const Datatype INTEGER4;
 158 OMPI_DECLSPEC extern const Datatype REAL2;
 159 OMPI_DECLSPEC extern const Datatype REAL4;
 160 OMPI_DECLSPEC extern const Datatype REAL8;
 161 
 162 // optional datatype (C / C++)
 163 OMPI_DECLSPEC extern const Datatype LONG_LONG;
 164 OMPI_DECLSPEC extern const Datatype LONG_LONG_INT;
 165 OMPI_DECLSPEC extern const Datatype UNSIGNED_LONG_LONG;
 166 
 167 // c++ types
 168 OMPI_DECLSPEC extern const Datatype BOOL;
 169 OMPI_DECLSPEC extern const Datatype COMPLEX;
 170 OMPI_DECLSPEC extern const Datatype DOUBLE_COMPLEX;
 171 OMPI_DECLSPEC extern const Datatype F_DOUBLE_COMPLEX;
 172 OMPI_DECLSPEC extern const Datatype LONG_DOUBLE_COMPLEX;
 173 
 174 // special datatypes for contstruction of derived datatypes
 175 OMPI_DECLSPEC extern const Datatype UB;
 176 OMPI_DECLSPEC extern const Datatype LB;
 177 
 178 // datatype decoding constants
 179 static const int COMBINER_NAMED = MPI_COMBINER_NAMED;
 180 static const int COMBINER_DUP = MPI_COMBINER_DUP;
 181 static const int COMBINER_CONTIGUOUS = MPI_COMBINER_CONTIGUOUS;
 182 static const int COMBINER_VECTOR = MPI_COMBINER_VECTOR;
 183 static const int COMBINER_HVECTOR_INTEGER = MPI_COMBINER_HVECTOR_INTEGER;
 184 static const int COMBINER_HVECTOR = MPI_COMBINER_HVECTOR;
 185 static const int COMBINER_INDEXED = MPI_COMBINER_INDEXED;
 186 static const int COMBINER_HINDEXED_INTEGER = MPI_COMBINER_HINDEXED_INTEGER;
 187 static const int COMBINER_HINDEXED = MPI_COMBINER_HINDEXED;
 188 static const int COMBINER_INDEXED_BLOCK = MPI_COMBINER_INDEXED_BLOCK;
 189 static const int COMBINER_STRUCT_INTEGER = MPI_COMBINER_STRUCT_INTEGER;
 190 static const int COMBINER_STRUCT = MPI_COMBINER_STRUCT;
 191 static const int COMBINER_SUBARRAY = MPI_COMBINER_SUBARRAY;
 192 static const int COMBINER_DARRAY = MPI_COMBINER_DARRAY;
 193 static const int COMBINER_F90_REAL = MPI_COMBINER_F90_REAL;
 194 static const int COMBINER_F90_COMPLEX = MPI_COMBINER_F90_COMPLEX;
 195 static const int COMBINER_F90_INTEGER = MPI_COMBINER_F90_INTEGER;
 196 static const int COMBINER_RESIZED = MPI_COMBINER_RESIZED;
 197 
 198 // thread constants
 199 static const int THREAD_SINGLE = MPI_THREAD_SINGLE;
 200 static const int THREAD_FUNNELED = MPI_THREAD_FUNNELED;
 201 static const int THREAD_SERIALIZED = MPI_THREAD_SERIALIZED;
 202 static const int THREAD_MULTIPLE = MPI_THREAD_MULTIPLE;
 203 
 204 // reserved communicators
 205 // JGS these can not be const because Set_errhandler is not const
 206 OMPI_DECLSPEC extern Intracomm COMM_WORLD;
 207 OMPI_DECLSPEC extern Intracomm COMM_SELF;
 208 
 209 // results of communicator and group comparisons
 210 static const int IDENT = MPI_IDENT;
 211 static const int CONGRUENT = MPI_CONGRUENT;
 212 static const int SIMILAR = MPI_SIMILAR;
 213 static const int UNEQUAL = MPI_UNEQUAL;
 214 
 215 // environmental inquiry keys
 216 static const int TAG_UB = MPI_TAG_UB;
 217 static const int HOST = MPI_HOST;
 218 static const int IO = MPI_IO;
 219 static const int WTIME_IS_GLOBAL = MPI_WTIME_IS_GLOBAL;
 220 static const int APPNUM = MPI_APPNUM;
 221 static const int LASTUSEDCODE = MPI_LASTUSEDCODE;
 222 static const int UNIVERSE_SIZE = MPI_UNIVERSE_SIZE;
 223 static const int WIN_BASE = MPI_WIN_BASE;
 224 static const int WIN_SIZE = MPI_WIN_SIZE;
 225 static const int WIN_DISP_UNIT = MPI_WIN_DISP_UNIT;
 226 
 227 // collective operations
 228 OMPI_DECLSPEC extern const Op MAX;
 229 OMPI_DECLSPEC extern const Op MIN;
 230 OMPI_DECLSPEC extern const Op SUM;
 231 OMPI_DECLSPEC extern const Op PROD;
 232 OMPI_DECLSPEC extern const Op MAXLOC;
 233 OMPI_DECLSPEC extern const Op MINLOC;
 234 OMPI_DECLSPEC extern const Op BAND;
 235 OMPI_DECLSPEC extern const Op BOR;
 236 OMPI_DECLSPEC extern const Op BXOR;
 237 OMPI_DECLSPEC extern const Op LAND;
 238 OMPI_DECLSPEC extern const Op LOR;
 239 OMPI_DECLSPEC extern const Op LXOR;
 240 OMPI_DECLSPEC extern const Op REPLACE;
 241 
 242 // null handles
 243 OMPI_DECLSPEC extern const Group        GROUP_NULL;
 244 OMPI_DECLSPEC extern const Win          WIN_NULL;
 245 OMPI_DECLSPEC extern const Info         INFO_NULL;
 246 OMPI_DECLSPEC extern Comm_Null          COMM_NULL;
 247 OMPI_DECLSPEC extern const Datatype     DATATYPE_NULL;
 248 OMPI_DECLSPEC extern Request            REQUEST_NULL;
 249 OMPI_DECLSPEC extern const Op           OP_NULL;
 250 OMPI_DECLSPEC extern const Errhandler   ERRHANDLER_NULL;
 251 OMPI_DECLSPEC extern const File         FILE_NULL;
 252 
 253 // constants specifying empty or ignored input
 254 OMPI_DECLSPEC extern const char**       ARGV_NULL;
 255 OMPI_DECLSPEC extern const char***      ARGVS_NULL;
 256 
 257 // empty group
 258 OMPI_DECLSPEC extern const Group  GROUP_EMPTY;
 259 
 260 // topologies
 261 static const int GRAPH = MPI_GRAPH;
 262 static const int CART = MPI_CART;
 263 
 264 // MPI-2 IO
 265 static const int MODE_CREATE = MPI_MODE_CREATE;
 266 static const int MODE_RDONLY = MPI_MODE_RDONLY;
 267 static const int MODE_WRONLY = MPI_MODE_WRONLY;
 268 static const int MODE_RDWR = MPI_MODE_RDWR;
 269 static const int MODE_DELETE_ON_CLOSE = MPI_MODE_DELETE_ON_CLOSE;
 270 static const int MODE_UNIQUE_OPEN = MPI_MODE_UNIQUE_OPEN;
 271 static const int MODE_EXCL = MPI_MODE_EXCL;
 272 static const int MODE_APPEND = MPI_MODE_APPEND;
 273 static const int MODE_SEQUENTIAL = MPI_MODE_SEQUENTIAL;
 274 
 275 static const int DISPLACEMENT_CURRENT = MPI_DISPLACEMENT_CURRENT;
 276 
 277 #if !defined(OMPI_IGNORE_CXX_SEEK) && OMPI_WANT_MPI_CXX_SEEK
 278 static const int SEEK_SET = ::SEEK_SET;
 279 static const int SEEK_CUR = ::SEEK_CUR;
 280 static const int SEEK_END = ::SEEK_END;
 281 #endif
 282 
 283 static const int MAX_DATAREP_STRING = MPI_MAX_DATAREP_STRING;
 284 
 285 // one-sided constants
 286 static const int MODE_NOCHECK = MPI_MODE_NOCHECK;
 287 static const int MODE_NOPRECEDE = MPI_MODE_NOPRECEDE;
 288 static const int MODE_NOPUT = MPI_MODE_NOPUT;
 289 static const int MODE_NOSTORE = MPI_MODE_NOSTORE;
 290 static const int MODE_NOSUCCEED = MPI_MODE_NOSUCCEED;
 291 
 292 static const int LOCK_EXCLUSIVE = MPI_LOCK_EXCLUSIVE;
 293 static const int LOCK_SHARED = MPI_LOCK_SHARED;

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