| | 1 | [[PageOutline]] |
| | 2 | = Constants = |
| | 3 | Meaning of MPIs defined constants |
| | 4 | |
| | 5 | = Data types = |
| | 6 | Note that the Fortran types should only be used in Fortran programs, and the C types should only be used in C programs. For example, it is in error to use MPI_INT for a Fortran INTEGER. Datatypes are of type MPI_Datatype in C and of tyep INTEGER in Fortran. |
| | 7 | |
| | 8 | = C datatypes = |
| | 9 | |
| | 10 | MPI_CHAR |
| | 11 | char |
| | 12 | |
| | 13 | MPI_BYTE |
| | 14 | See standard; like unsigned char |
| | 15 | |
| | 16 | MPI_SHORT |
| | 17 | short |
| | 18 | |
| | 19 | MPI_INT |
| | 20 | int |
| | 21 | |
| | 22 | MPI_LONG |
| | 23 | long |
| | 24 | |
| | 25 | MPI_FLOAT |
| | 26 | float |
| | 27 | |
| | 28 | MPI_DOUBLE |
| | 29 | double |
| | 30 | |
| | 31 | MPI_UNSIGNED_CHAR |
| | 32 | unsigned char |
| | 33 | |
| | 34 | MPI_UNSIGNED_SHORT |
| | 35 | unsigned short |
| | 36 | |
| | 37 | MPI_UNSIGNED |
| | 38 | unsigned int |
| | 39 | |
| | 40 | MPI_UNSIGNED_LONG |
| | 41 | unsigned long |
| | 42 | |
| | 43 | MPI_LONG_DOUBLE |
| | 44 | long double (some systems may not implement) |
| | 45 | |
| | 46 | MPI_LONG_LONG_INT |
| | 47 | long long (some systems may not implement) |
| | 48 | |
| | 49 | |
| | 50 | |
| | 51 | '''The following are datatypes for the MPI functions MPI_MAXLOC and MPI_MINLOC.''' |
| | 52 | |
| | 53 | MPI_FLOAT_INT |
| | 54 | struct { float, int } |
| | 55 | |
| | 56 | MPI_LONG_INT |
| | 57 | struct { long, int } |
| | 58 | |
| | 59 | MPI_DOUBLE_INT |
| | 60 | struct { double, int } |
| | 61 | |
| | 62 | MPI_SHORT_INT |
| | 63 | struct { short, int } |
| | 64 | |
| | 65 | MPI_2INT |
| | 66 | struct { int, int } |
| | 67 | |
| | 68 | MPI_LONG_DOUBLE_INT |
| | 69 | struct { long double, int }; this is an OPTIONAL type, and may be set to NULL |
| | 70 | |
| | 71 | |
| | 72 | |
| | 73 | '''Note that there is no MPI_LONG_LONG_INT type corresponding to a struct { long long, int }.[[BR]] |
| | 74 | Special datatypes for C and Fortran''' |
| | 75 | |
| | 76 | MPI_PACKED |
| | 77 | For MPI_Pack and MPI_Unpack |
| | 78 | |
| | 79 | MPI_UB |
| | 80 | For MPI_Type_struct; an upper-bound indicator |
| | 81 | |
| | 82 | MPI_LB |
| | 83 | For MPI_Type_struct; a lower-bound indicator |
| | 84 | |
| | 85 | |
| | 86 | |
| | 87 | = Fortran datatypes = |
| | 88 | |
| | 89 | MPI_REAL |
| | 90 | REAL |
| | 91 | |
| | 92 | MPI_INTEGER |
| | 93 | INTEGER |
| | 94 | |
| | 95 | MPI_LOGICAL |
| | 96 | LOGICAL |
| | 97 | |
| | 98 | MPI_DOUBLE_PRECISION |
| | 99 | DOUBLE PRECISION |
| | 100 | |
| | 101 | MPI_COMPLEX |
| | 102 | COMPLEX |
| | 103 | |
| | 104 | MPI_DOUBLE_COMPLEX |
| | 105 | complex*16 (or complex*32) where supported. |
| | 106 | |
| | 107 | |
| | 108 | |
| | 109 | '''The following datatypes are optional''' |
| | 110 | |
| | 111 | MPI_INTEGER1 |
| | 112 | integer*1 if supported |
| | 113 | |
| | 114 | MPI_INTEGER2 |
| | 115 | integer*2 if supported |
| | 116 | |
| | 117 | MPI_INTEGER4 |
| | 118 | integer*4 if supported |
| | 119 | |
| | 120 | MPI_REAL4 |
| | 121 | real*4 if supported |
| | 122 | |
| | 123 | MPI_REAL8 |
| | 124 | real*8 if supported |
| | 125 | |
| | 126 | |
| | 127 | |
| | 128 | '''The following are datatypes for the MPI functions MPI_MAXLOC and MPI_MINLOC. In Fortran, these datatype always consist of two elements of the same Fortran type.''' |
| | 129 | |
| | 130 | MPI_2INTEGER |
| | 131 | INTEGER,INTEGER |
| | 132 | |
| | 133 | MPI_2REAL |
| | 134 | REAL, REAL |
| | 135 | |
| | 136 | MPI_2DOUBLE_PRECISION |
| | 137 | DOUBLE PRECISION, DOUBLE PRECISION |
| | 138 | |
| | 139 | MPI_2COMPLEX |
| | 140 | COMPLEX, COMPLEX |
| | 141 | |
| | 142 | MPI_2DOUBLE_COMPLEX |
| | 143 | complex*16, complex*16 |
| | 144 | |
| | 145 | |
| | 146 | |
| | 147 | = Communicators = |
| | 148 | Communicators are of type MPI_Comm in C and INTEGER in Fortran |
| | 149 | |
| | 150 | MPI_COMM_WORLD |
| | 151 | Contains all of the processes |
| | 152 | |
| | 153 | MPI_COMM_SELF |
| | 154 | Contains only the calling process |
| | 155 | |
| | 156 | |
| | 157 | |
| | 158 | = Groups = |
| | 159 | Groups are of type MPI_Group in C and INTEGER in Fortran |
| | 160 | |
| | 161 | MPI_GROUP_EMPTY |
| | 162 | A group containing no members. |
| | 163 | |
| | 164 | Results of the compare operations |
| | 165 | |
| | 166 | MPI_IDENT |
| | 167 | Identical |
| | 168 | |
| | 169 | MPI_CONGRUENT |
| | 170 | (only for MPI_COMM_COMPARE) The groups are identical |
| | 171 | |
| | 172 | MPI_SIMILAR |
| | 173 | Same members, but in a different order |
| | 174 | |
| | 175 | MPI_UNEQUAL |
| | 176 | Different |
| | 177 | |
| | 178 | |
| | 179 | |
| | 180 | = Collective operations = |
| | 181 | The collective combination operations (MPI_REDUCE, MPI_ALLREDUCE, MPI_REDUCE_SCATTER, and MPI_SCAN) take a combination operation. This operation is of type MPI_Op in C and of type INTEGER in Fortran. The predefined operations are |
| | 182 | |
| | 183 | MPI_MAX |
| | 184 | return the maximum |
| | 185 | |
| | 186 | MPI_MIN |
| | 187 | return the minumum |
| | 188 | |
| | 189 | MPI_SUM |
| | 190 | return the sum |
| | 191 | |
| | 192 | MPI_PROD |
| | 193 | return the product |
| | 194 | |
| | 195 | MPI_LAND |
| | 196 | return the logical and |
| | 197 | |
| | 198 | MPI_BAND |
| | 199 | return the bitwise and |
| | 200 | |
| | 201 | MPI_LOR |
| | 202 | return the logical or |
| | 203 | |
| | 204 | MPI_BOR |
| | 205 | return the bitwise of |
| | 206 | |
| | 207 | MPI_LXOR |
| | 208 | return the logical exclusive or |
| | 209 | |
| | 210 | MPI_BXOR |
| | 211 | return the bitwise exclusive or |
| | 212 | |
| | 213 | MPI_MINLOC |
| | 214 | return the minimum and the location (actually, the value of the second element of the structure where the minimum of the first is found) |
| | 215 | |
| | 216 | MPI_MAXLOC |
| | 217 | return the maximum and the location |
| | 218 | |
| | 219 | |
| | 220 | |
| | 221 | = Notes on collective operations = |
| | 222 | |
| | 223 | The reduction functions (MPI_Op) do not return an error value. As a result, if the functions detect an error, all they can do is either call MPI_Abort or silently skip the problem. Thus, if you change the error handler from MPI_ERRORS_ARE_FATAL to something else, for example, MPI_ERRORS_RETURN, then no error may be indicated. |
| | 224 | |
| | 225 | The reason for this is the performance problems in ensuring that all collective routines return the same error value. |
| | 226 | |
| | 227 | Note that not all datatypes are valid for these functions. For example, MPI_COMPLEX is not valid for MPI_MAX and MPI_MIN. In addition, the MPI 1.1 standard did not include the C types MPI_CHAR and MPI_UNSIGNED_CHAR among the lists of arithmetic types for operations like MPI_SUM. However, since the C type char is an integer type (like short), it should have been included. The MPI Forum will probably include char and unsigned char as a clarification to MPI 1.1; until then, users are advised that MPI implementations may not accept MPI_CHAR and MPI_UNSIGNED_CHAR as valid datatypes for MPI_SUM, MPI_PROD, etc. MPICH does allow these datatypes. |
| | 228 | |
| | 229 | |
| | 230 | |
| | 231 | = Permanent key values = |
| | 232 | These are the same in C and Fortran |
| | 233 | |
| | 234 | MPI_TAG_UB |
| | 235 | Largest tag value |
| | 236 | |
| | 237 | MPI_HOST |
| | 238 | Rank of process that is host, if any |
| | 239 | |
| | 240 | MPI_IO |
| | 241 | Rank of process that can do I/O |
| | 242 | |
| | 243 | MPI_WTIME_IS_GLOBAL |
| | 244 | Has value 1 if MPI_WTIME is globally synchronized. |
| | 245 | |
| | 246 | |
| | 247 | |
| | 248 | = Null objects = |
| | 249 | |
| | 250 | MPI_COMM_NULL |
| | 251 | Null communicator |
| | 252 | |
| | 253 | MPI_OP_NULL |
| | 254 | Null operation |
| | 255 | |
| | 256 | MPI_GROUP_NULL |
| | 257 | Null group |
| | 258 | |
| | 259 | MPI_DATATYPE_NULL |
| | 260 | Null datatype |
| | 261 | |
| | 262 | MPI_REQUEST_NULL |
| | 263 | Null request |
| | 264 | |
| | 265 | MPI_ERRHANDLER_NULL |
| | 266 | Null error handler |
| | 267 | |
| | 268 | |
| | 269 | |
| | 270 | = Predefined Constants = |
| | 271 | |
| | 272 | MPI_MAX_PROCESSOR_NAME |
| | 273 | Maximum length of name returned by MPI_GET_PROCESSOR_NAME |
| | 274 | |
| | 275 | MPI_MAX_ERROR_STRING |
| | 276 | Maximum length of string return by MPI_ERROR_STRING |
| | 277 | |
| | 278 | MPI_UNDEFINED |
| | 279 | Used by many routines to indicated undefined or unknown integer value |
| | 280 | |
| | 281 | MPI_UNDEFINED_RANK |
| | 282 | Unknown rank |
| | 283 | |
| | 284 | MPI_KEYVAL_INVALID |
| | 285 | Special keyval that may be used to detect uninitialized keyvals. |
| | 286 | |
| | 287 | MPI_BSEND_OVERHEAD |
| | 288 | Add this to the size of a MPI_BSEND buffer for each outstanding message |
| | 289 | |
| | 290 | MPI_PROC_NULL |
| | 291 | This rank may be used to send or receive from no-one. |
| | 292 | |
| | 293 | MPI_ANY_SOURCE |
| | 294 | In a receive, accept a message from anyone. |
| | 295 | |
| | 296 | MPI_ANY_TAG |
| | 297 | In a receive, accept a message with any tag value. |
| | 298 | |
| | 299 | MPI_BOTTOM |
| | 300 | May be used to indicate the bottom of the address space |
| | 301 | |
| | 302 | |
| | 303 | |
| | 304 | = Topology types = |
| | 305 | |
| | 306 | MPI_GRAPH |
| | 307 | General graph |
| | 308 | |
| | 309 | MPI_CART |
| | 310 | Cartesian grid |
| | 311 | |
| | 312 | |
| | 313 | |
| | 314 | = MPI Status = |
| | 315 | The MPI_Status datatype is a structure. The three elements for use by programmers are |
| | 316 | |
| | 317 | MPI_SOURCE |
| | 318 | Who sent the message |
| | 319 | |
| | 320 | MPI_TAG |
| | 321 | What tag the message was sent with |
| | 322 | |
| | 323 | MPI_ERROR |
| | 324 | Any error return |
| | 325 | |
| | 326 | |
| | 327 | |
| | 328 | = Special MPI types and functions = |
| | 329 | |
| | 330 | MPI_Aint |
| | 331 | C type that holds any valid address. |
| | 332 | |
| | 333 | MPI_Handler_function |
| | 334 | C function for handling errors (see MPI_Errhandler_create) . |
| | 335 | |
| | 336 | MPI_User_function |
| | 337 | C function to combine values (see collective operations and MPI_Op_create) |
| | 338 | |
| | 339 | MPI_Copy_function |
| | 340 | Function to copy attributes (see MPI_Keyval_create) |
| | 341 | |
| | 342 | MPI_NULL_COPY_FN |
| | 343 | Predefined copy function |
| | 344 | |
| | 345 | MPI_Delete_function |
| | 346 | Function to delete attributes (see MPI_Keyval_create) |
| | 347 | |
| | 348 | MPI_NULL_DELETE_FN |
| | 349 | Predefined delete function |
| | 350 | |
| | 351 | MPI_DUP_FN |
| | 352 | Predefined duplication function |
| | 353 | |
| | 354 | MPI_ERRORS_ARE_FATAL |
| | 355 | Error handler that forces exit on error |
| | 356 | |
| | 357 | MPI_ERRORS_RETURN |
| | 358 | Error handler that returns error codes (as value of MPI routine in C and through last argument in Fortran) |
| | 359 | |
| | 360 | |
| | 361 | |
| | 362 | = MPI Error classes = |
| | 363 | |
| | 364 | MPI_SUCCESS |
| | 365 | Successful return code |
| | 366 | |
| | 367 | MPI_ERR_BUFFER |
| | 368 | Invalid buffer pointer |
| | 369 | |
| | 370 | MPI_ERR_COUNT |
| | 371 | Invalid count argument |
| | 372 | |
| | 373 | MPI_ERR_TYPE |
| | 374 | Invalid datatype argument |
| | 375 | |
| | 376 | MPI_ERR_TAG |
| | 377 | Invalid tag argument |
| | 378 | |
| | 379 | MPI_ERR_COMM |
| | 380 | Invalid communicator |
| | 381 | |
| | 382 | MPI_ERR_RANK |
| | 383 | Invalid rank |
| | 384 | |
| | 385 | MPI_ERR_ROOT |
| | 386 | Invalid root |
| | 387 | |
| | 388 | MPI_ERR_GROUP |
| | 389 | Null group passed to function |
| | 390 | |
| | 391 | MPI_ERR_OP |
| | 392 | Invalid operation |
| | 393 | |
| | 394 | MPI_ERR_TOPOLOGY |
| | 395 | Invalid topology |
| | 396 | |
| | 397 | MPI_ERR_DIMS |
| | 398 | Illegal dimension argument |
| | 399 | |
| | 400 | MPI_ERR_ARG |
| | 401 | Invalid argument |
| | 402 | |
| | 403 | MPI_ERR_UNKNOWN |
| | 404 | Unknown error |
| | 405 | |
| | 406 | MPI_ERR_TRUNCATE |
| | 407 | message truncated on receive |
| | 408 | |
| | 409 | MPI_ERR_OTHER |
| | 410 | Other error; use Error_string |
| | 411 | |
| | 412 | MPI_ERR_INTERN |
| | 413 | internal error code |
| | 414 | |
| | 415 | MPI_ERR_IN_STATUS |
| | 416 | Look in status for error value |
| | 417 | |
| | 418 | MPI_ERR_PENDING |
| | 419 | Pending request |
| | 420 | |
| | 421 | MPI_ERR_REQUEST |
| | 422 | illegal mpi_request handle |
| | 423 | |
| | 424 | MPI_ERR_LASTCODE |
| | 425 | Last error code -- always at end |
| | 426 | |
| | 427 | Location:/home/MPI/mansrc/mpiconsts.txt |
| | 428 | |
| | 429 | from:[http://www-unix.mcs.anl.gov/mpi/www/www3/Constants.html] |