Scroll to navigation

Constants(3) MPI Constants(3)

NAME

Constants - Meaning of MPI's defined constants

DATA TYPES

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, type INTEGER in Fortran, and Type(MPI_Datatype) in Fortran08

C DATATYPES

- char
- signed char
- unsigned char
- See standard; like unsigned char
- wide character (wchar_t)
- short
- unsigned short
- int
- unsigned int
- long
- unsigned long
- long long
- synonyn for MPI_LONG_LONG_INT

- unsigned long long
- float
- double
- long double (some systems may not implement this)
- int8_t
- int16_t
- int32_t
- int64_t
- uint8_t
- uint16_t
- uint32_t
- uint64_t
- _Bool
- float _Complex
- float _Complex
- double _Complex
- long double _Complex

The following are datatypes for the MPI functions MPI_MAXLOC and MPI_MINLOC .

- struct { float, int }

- struct { long, int }

- struct { double, int }

- struct { short, int }

- struct { int, int }

- struct { long double, int } ; this is an optional type, and may be set to MPI_DATATYPE_NULL

Special datatypes for C and Fortran

- For MPI_Pack and MPI_Unpack

- For MPI_Type_struct ; an upper-bound indicator. Removed in MPI 3
- For MPI_Type_struct ; a lower-bound indicator. Removed in MPI 3

FORTRAN DATATYPES

- REAL

- INTEGER

- LOGICAL

- DOUBLE PRECISION

- COMPLEX

- complex*16 (or complex*32 ) where supported.

The following datatypes are optional

- integer*1 if supported
- integer*2 if supported
- integer*4 if supported
- integer*8 if supported
- integer*16 if supported
- real*4 if supported
- real*8 if supported
- real*16 if supported
- complex*8 if supported
- complex*16 if supported
- complex*32 if supported

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.

- INTEGER,INTEGER

- REAL, REAL

- DOUBLE PRECISION, DOUBLE PRECISION

MPI Datatypes for MPI Types

- Datatype for an MPI_Aint

- Datatype for an MPI_Offset

- Datatype for an MPI_Count

MPI DATATYPE COMBINER NAMES

- a named predefined datatype
- MPI_TYPE_DUP
- MPI_TYPE_CONTIGUOUS
- MPI_TYPE_VECTOR
- Removed in MPI-3
- MPI_TYPE_CREATE_HVECTOR
- MPI_TYPE_INDEXED
- Removed in MPI-3
- MPI_TYPE_CREATE_HINDEXED
- MPI_TYPE_CREATE_INDEXED_BLOCK
- Removed in MPI-3
- MPI_TYPE_CREATE_STRUCT
- MPI_TYPE_CREATE_SUBARRAY
- MPI_TYPE_CREATE_DARRAY
- MPI_TYPE_CREATE_F90_REAL
- MPI_TYPE_CREATE_F90_COMPLEX
- MPI_TYPE_CREATE_F90_INTEGER
- MPI_TYPE_CREATE_RESIZED
- MPI_TYPE_CREATE_HINDEXED_BLOCK

MPI DATATYPE TYPE CLASSES

MPI Type classes used with routines to return Fortran types with defined precision and range

- REAL

- INTEGER

- COMPLEX

MPI DARRAY AND SUBARRAY VALUES

These values are used to create a datatype with the DARRAY and SUBARRAY constructors.

- Row-major order (as used by C)
- Column-major order (as used by Fortran)
- Block distribution
- Cyclic distribution
- This dimension is not distributed
- Use the default distribution

COMMUNICATORS

Communicators are of type MPI_Comm in C, INTEGER in Fortran, and Type(MPI_Comm) in Fortran08

- Contains all of the processes
- Contains only the calling process

KIND OF COMMUNICATOR FOR 'MPI_COMM_SPLIT_TYPE'

- All processes that can share memory are grouped into the same communicator.

GROUPS

Groups are of type MPI_Group in C, INTEGER in Fortran, and Type(MPI_Group) in Fortran08

- A group containing no members.

RESULTS OF THE COMPARE OPERATIONS ON GROUPS AND COMMUNICATORS

- Identical
- (only for MPI_COMM_COMPARE ) The groups are identical
- Same members, but in a different order
- Different

COLLECTIVE OPERATIONS

The collective combination operations (e.g., 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

- return the maximum
- return the minimum
- return the sum
- return the product
- return the logical and
- return the bitwise and
- return the logical or
- return the bitwise of
- return the logical exclusive or
- return the bitwise exclusive or
- return the minimum and the location (actually, the value of the second element of the structure where the minimum of the first is found)
- return the maximum and the location
- replace b with a
- perform no operation

NOTES ON COLLECTIVE OPERATIONS

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.

The reason for this is the performance problems in ensuring that all collective routines return the same error value.

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.

PERMANENT KEY VALUES

These are the same in C and Fortran

- Largest tag value
- Rank of process that is host, if any
- Rank of process that can do I/O
- Has value 1 if MPI_WTIME is globally synchronized.
- Number of available processes. See the standard for a description of limitations on this value
- Last used MPI error code (check - code or class?)
- Application number, starting from 0. See the standard for MPI_COMM_SPAWN_MULTIPLE and mpiexec for details

NULL OBJECTS

- Null communicator
- Null operation
- Null group
- Null datatype
- Null request
- Null error handler
- Null window handle
- Null file handle
- Null info handle
- Null message handle
- Empty ARGV value for spawn commands
- Empty ARGV array for spawn-multiple command
- Null MPI_T enum
- Null MPI_T control variable handle
- Null MPI_T performance variable handle
- Null MPI_T performance variable session handle

PREDEFINED CONSTANTS

- Maximum length of name returned by MPI_GET_PROCESSOR_NAME

- Maximum length of string return by MPI_ERROR_STRING

- Maximum length of string returned by MPI_GET_LIBRARY_VERSION_STRING ???
- Maximum length of a port
- Maximum length of an object (?)
- Maximum length of an info key
- Maximum length of an info value
- Used by many routines to indicated undefined or unknown integer value
- Unknown rank
- Special keyval that may be used to detect uninitialized keyvals.
- Add this to the size of a MPI_BSEND buffer for each outstanding message
- This rank may be used to send or receive from no-one.
- In a receive, accept a message from anyone.
- In a receive, accept a message with any tag value.
- May be used to indicate the bottom of the address space
- Special location for buffer in some collective communication routines
- Numeric value of MPI version (e.g., 3)
- Numeric value of MPI subversion (e.g., 1)

TOPOLOGY TYPES

- Cartesian grid
- General graph
- General distributed graph

SPECIAL VALUES FOR DISTRIBUTED GRAPH

- Indicates that the edges are unweighted
- Special address that indicates no array of weights information

FILE MODES

- Read only
- Read and write
- Write only
- Create the file if it does not exist
- It is an error if creating a file that already exists
- Delete the file on close
- The file will not be concurrently opened elsewhere
- The initial position of all file pointers is at the end of the file
- File will only be accessed sequentially

FILE DISPLACEMENT

- Use with files opened with mode MPI_MODE_SEQUENTIAL in calls to MPI_FILE_SET_VIEW

FILE POSITIONING

- Set the pointer to offset

- Set the pointer to the current position plus offset

- Set the pointer to the end of the file plus offset

WINDOW ATTRIBUTES

- window base address.
- window size, in bytes
- displacement unit associated with the window
- how the window was created
- memory model for window

WINDOW FLAVORS

- Window was created with MPI_WIN_CREATE.
- Window was created with MPI_WIN_ALLOCATE.
- Window was created with MPI_WIN_CREATE_DYNAMIC.
- Window was created with MPI_WIN_ALLOCATE_SHARED.

WINDOW MEMORY MODEL

- Separate public and private copies of window memory
- The public and private copies are identical (by which we mean that updates are eventually observed without additional RMA operations)

WINDOW LOCK TYPES

- Only one process at a time will execute accesses within the lock
- Not exclusive; multiple processes may execute accesses within the lock

WINDOW ASSERTIONS

See section 11.5 in MPI 3.1 for a detailed description of each of these assertion values.

- The matching calls to MPI_WIN_POST or MPI_WIN_START have already completed, or no process holds or will attempt to acquire, a conflicting lock.
- The local window has not been updated by stores since the last synchronization
- The local window will not be updated by put or accumulate until the next synchronization
- The fence does not complete any locally issued RMA calls
- The fence does not start any locally issued RMA calls

PREDEFINED INFO OBJECT

- Contains the execution environment

MPI STATUS

The MPI_Status datatype is a structure in C. The three elements for use by programmers are

- Who sent the message
- What tag the message was sent with
- Any error return (only when the error returned by the routine has error class MPI_ERR_IN_STATUS )

- Ignore a single MPI_Status argument
- Ignore an array of MPI_Status

SPECIAL VALUE FOR ERROR CODES ARRAY

- Ignore an array of error codes

MPI_T CONSTANTS

- Basic information of interest to users
- Detailed information of interest to users
- All remaining information of interest to users
- Basic information required for tuning
- Detailed information required for tuning
- All remaining information required for tuning
- Basic information for MPI implementors

- Detailed information for MPI implementors
- All remaining information for MPI implementors
- Applies globally to entire MPI process
- MPI communicators
- MPI datatypes
- MPI error handlers
- MPI file handles
- MPI groups
- MPI reduction operators
- MPI requests
- MPI windows for one-sided communication
- MPI message object
- MPI info object
- read-only, value is constant
- read-only, cannot be written, but can change
- may be writeable, writing is a local operation
- may be writeable, must be done to a group of processes, all processes in a group must be set to consistent values
- may be writeable, must be done to a group of processes, all processes in a group must be set to the same value
- may be writeable, must be done to all processes, all connected processes must be set to consistent values
- may be writeable, must be done to all processes, all connected processes must be set to the same value
- set of discrete states (MPI_INT)
- utilization level of a resource
- size of a resource
- percentage utilization of a resource
- high watermark of a resource
- low watermark of a resource
- number of occurrences of an event
- aggregate value over an event (e.g., sum of all memory allocations)
- aggretate time spent executing event
- used for any other time of performance variable

THREAD LEVELS

- Only one thread executes
- Only the main thread makes MPI calls
- Only one thread at a time makes MPI calls
- Multiple threads may make MPI calls

SPECIAL MPI TYPES AND FUNCTIONS

- C type that holds any valid address.
- C type that holds any valid count.
- C type that holds any valid file offset.
- C function for handling errors (see MPI_Errhandler_create ) .
- C function to combine values (see collective operations and MPI_Op_create )
- Function to copy attributes (see MPI_Keyval_create )
- Function to delete attributes (see MPI_Keyval_create )
- Error handler that forces exit on error
- Error handler that returns error codes (as value of MPI routine in C and through last argument in Fortran)
- Error handler that forces exit on error (only aborts local process if the error handler is invoked on a session)

MPI ATTRIBUTE DEFAULT FUNCTIONS

- Predefined attribute copy function for communicators
- Predefined attribute delete function for communicators
- Predefined attribute duplicate function for communicators
- Predefined attribute copy function for windows
- Predefined attribute delete function for windows
- Predefined attribute duplicate function for windows
- Predefined attribute copy function for datatypes
- Predefined attribute delete function for datatypes
- Predefined attribute duplicate function for datatypes

MPI-1 ATTRIBUTE DEFAULT FUNCTIONS

- Predefined copy function
- Predefined delete function
- Predefined duplication function

MPI ERROR CLASSES

- Successful return code
- Invalid buffer pointer
- Invalid count argument
- Invalid datatype argument
- Invalid tag argument
- Invalid communicator
- Invalid rank
- Invalid root
- Null group passed to function
- Invalid operation
- Invalid topology
- Illegal dimension argument
- Invalid argument
- Unknown error
- Message truncated on receive
- Other error; use Error_string
- Internal error code
- Look in status for error value
- Pending request
- Invalid mpi_request handle
- Permission denied
- Error related to the amode passed to MPI_FILE_OPEN

- Invalid file name (e.g., path name too long)
- An error occurred in a user supplied data conversion function
- Conversion functions could not be registered because a data representation identifier that was already defined was passed to MPI_REGISTER_DATAREP

- File exists
- File operation could not be completed, as the file is currently open by some process
- Invalid file handle
- Other I/O error
- Not enough space
- File does not exist
- Read-only file or file system
- Unsupported datarep passed to MPI_FILE_SET_VIEW

- Invalid info argument
- Key longer than MPI_MAX_INFO_KEY
- Value longer than MPI_MAX_INFO_VAL
- Invalid key passed to MPI_INFO_DELETE
- Invalid service name passed to MPI_LOOKUP_NAME
- Alloc_mem could not allocate memory
- Collective argument not identical on all processes, or collective routines called in a different order by different processes
- Invalid port name passed to MPI_COMM_CONNECT
- Quota exceeded
- Invalid service name passed to MPI_UNPUBLISH_NAME
- Error in spawning processes
- Unsupported operation, such as seeking on a file which supports sequential access only
- Invalid win argument
- Invalid base passed to MPI_FREE_MEM
- Invalid locktype argument
- Erroneous attribute key
- Conflicting accesses to window
- Wrong synchronization of RMA calls
- Invalid size argument
- Invalid disp argument
- Invalid assert argument
- Target memory is not part of the window (in the case of a window created with MPI_WIN_CREATE_DYNAMIC, target memory is not attached)
- Memory cannot be attached (e.g., because of resource exhaustion)
- Memory cannot be shared (e.g., some process in the group of the specified communicator cannot expose shared memory)
- Passed window has the wrong flavor for the called function
- Last error code -- always at end

ERROR CODES FOR MPI_T

- Out of memory
- Interface not initialized
- Interface not in the state to be initialized
- The index is invalid or has been deleted
- The handle is invalid
- No more handles available
- No more sessions available
- Session argument is not valid
- Cvar cannot be set at this moment
- Cvar cannot be set until end of execution
- Pvar can't be started or stopped
- Pvar can't be written or reset
- Pvar can't be R/W atomically
- Name doesn't match
- Invalid use of the interface or bad parameter values(s)

3/3/2023