Changes between Initial Version and Version 1 of mpich/constants


Ignore:
Timestamp:
Mar 26, 2008, 5:24:16 PM (17 years ago)
Author:
wade
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mpich/constants

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