---
name: "MPI_ERR_COMM_INTRA"
section: "3"
platform: "linux"
package: "mpi-doc"
version: "1.2.7-9.1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Constants"
---

# MPI\_ERR\_COMM\_INTRA(3)

Meaning of MPI s defined constants

Part of [Constants(3)](/Constants/3.md).

## 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 and of tyep* INTEGER *in Fortran.*

## C DATATYPES

- **MPI\_CHAR**

  \- char

- **MPI\_BYTE**

  \- See standard; like unsigned char

- **MPI\_SHORT**

  \- short

- **MPI\_INT**

  \- int

- **MPI\_LONG**

  \- long

- **MPI\_FLOAT**

  \- float

- **MPI\_DOUBLE**

  \- double

- **MPI\_UNSIGNED\_CHAR**

  \- unsigned char

- **MPI\_UNSIGNED\_SHORT**

  \- unsigned short

- **MPI\_UNSIGNED**

  \- unsigned int

- **MPI\_UNSIGNED\_LONG**

  \- unsigned long

- **MPI\_LONG\_DOUBLE**

  \- long double (some systems may not implement)

- **MPI\_LONG\_LONG\_INT**

  \- long long (some systems may not implement)

  The following are datatypes for the MPI functions  MPI\_MAXLOC *and* MPI\_MINLOC *.*

- **MPI\_FLOAT\_INT**

  \-  struct { float, int }

- **MPI\_LONG\_INT**

  *-*  struct { long, int }

- **MPI\_DOUBLE\_INT**

  *-*  struct { double, int }

- **MPI\_SHORT\_INT**

  *-*  struct { short, int }

- **MPI\_2INT**

  *-*  struct { int, int }

- **MPI\_LONG\_DOUBLE\_INT**

  *-*  struct { long double, int }; this  is an OPTIONAL type, and may be set to NULL

  Note that there is no  *MPI\_LONG\_LONG\_INT* type corresponding to a  *struct { long long, int }* .

  Special datatypes for C and Fortran

- **MPI\_PACKED**

  \- For  *MPI\_Pack* and  *MPI\_Unpack*

- **MPI\_UB**

  \- For  *MPI\_Type\_struct* ; an upper-bound indicator

- **MPI\_LB**

  \- For  *MPI\_Type\_struct* ; a lower-bound indicator

## FORTRAN DATATYPES

- **MPI\_REAL**

  \-  *REAL*

- **MPI\_INTEGER**

  \-  *INTEGER*

- **MPI\_LOGICAL**

  \-  *LOGICAL*

- **MPI\_DOUBLE\_PRECISION**

  \-  *DOUBLE PRECISION*

- **MPI\_COMPLEX**

  \-  *COMPLEX*

- **MPI\_DOUBLE\_COMPLEX**

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

  The following datatypes are optional

- **MPI\_INTEGER1**

  \-  *integer\*1* if supported

- **MPI\_INTEGER2**

  \-  *integer\*2* if supported

- **MPI\_INTEGER4**

  \-  *integer\*4* if supported

- **MPI\_REAL4**

  \-  *real\*4* if supported

- **MPI\_REAL8**

  \-  *real\*8* 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.

- **MPI\_2INTEGER**

  \-  *INTEGER,INTEGER*

- **MPI\_2REAL**

  \-  *REAL, REAL*

- **MPI\_2DOUBLE\_PRECISION**

  \-  *DOUBLE PRECISION, DOUBLE PRECISION*

- **MPI\_2COMPLEX**

  \-  *COMPLEX, COMPLEX*

- **MPI\_2DOUBLE\_COMPLEX**

  \-  *complex\*16, complex\*16*

## COMMUNICATORS

Communicators are of type  *MPI\_Comm* in C and  *INTEGER* in Fortran

- **MPI\_COMM\_WORLD**

  \- Contains all of the processes

- **MPI\_COMM\_SELF**

  \- Contains only the calling process

## GROUPS

Groups are of type  *MPI\_Group* in C and  *INTEGER* in Fortran

- **MPI\_GROUP\_EMPTY**

  \- A group containing no members.

## RESULTS OF THE COMPARE OPERATIONS

- **MPI\_IDENT**

  \- Identical

- **MPI\_CONGRUENT**

  \- (only for  *MPI\_COMM\_COMPARE* ) The groups are identical

- **MPI\_SIMILAR**

  \- Same members, but in a different order

- **MPI\_UNEQUAL**

  \- Different

## COLLECTIVE OPERATIONS

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

- **MPI\_MAX**

  \- return the maximum

- **MPI\_MIN**

  \- return the minumum

- **MPI\_SUM**

  \- return the sum

- **MPI\_PROD**

  \- return the product

- **MPI\_LAND**

  \- return the logical and

- **MPI\_BAND**

  \- return the bitwise and

- **MPI\_LOR**

  \- return the logical or

- **MPI\_BOR**

  \- return the bitwise of

- **MPI\_LXOR**

  \- return the logical exclusive or

- **MPI\_BXOR**

  \- return the bitwise exclusive or

- **MPI\_MINLOC**

  \- return the minimum and the location (actually, the value of the second element of the structure where the minimum of the first is found)

- **MPI\_MAXLOC**

  \- return the maximum and the location

## 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

- **MPI\_TAG\_UB**

  \- Largest tag value

- **MPI\_HOST**

  \- Rank of process that is host, if any

- **MPI\_IO**

  \- Rank of process that can do I/O

- **MPI\_WTIME\_IS\_GLOBAL**

  \- Has value 1 if  *MPI\_WTIME* is globally synchronized.

## NULL OBJECTS

- **MPI\_COMM\_NULL**

  \- Null communicator

- **MPI\_OP\_NULL**

  \- Null operation

- **MPI\_GROUP\_NULL**

  \- Null group

- **MPI\_DATATYPE\_NULL**

  \- Null datatype

- **MPI\_REQUEST\_NULL**

  \- Null request

- **MPI\_ERRHANDLER\_NULL**

  \- Null error handler

## PREDEFINED CONSTANTS

- **MPI\_MAX\_PROCESSOR\_NAME**

  \- Maximum length of name returned by *MPI\_GET\_PROCESSOR\_NAME*

- **MPI\_MAX\_ERROR\_STRING**

  \- Maximum length of string return by *MPI\_ERROR\_STRING*

- **MPI\_UNDEFINED**

  \- Used by many routines to indicated undefined or unknown integer value

- **MPI\_UNDEFINED\_RANK**

  \- Unknown rank

- **MPI\_KEYVAL\_INVALID**

  \- Special keyval that may be used to detect uninitialized keyvals.

- **MPI\_BSEND\_OVERHEAD**

  \- Add this to the size of a  *MPI\_BSEND* buffer for each outstanding message

- **MPI\_PROC\_NULL**

  \- This rank may be used to send or receive from no-one.

- **MPI\_ANY\_SOURCE**

  \- In a receive, accept a message from anyone.

- **MPI\_ANY\_TAG**

  \- In a receive, accept a message with any tag value.

- **MPI\_BOTTOM**

  \- May be used to indicate the bottom of the address space

## TOPOLOGY TYPES

- **MPI\_GRAPH**

  \- General graph

- **MPI\_CART**

  \- Cartesian grid

## MPI STATUS

The  *MPI\_Status* datatype is a structure.  The three elements for use by programmers are

- **MPI\_SOURCE**

  \- Who sent the message

- **MPI\_TAG**

  \- What tag the message was sent with

- **MPI\_ERROR**

  \- Any error return

## SPECIAL MPI TYPES AND FUNCTIONS

- **MPI\_Aint**

  \- C type that holds any valid address.

- **MPI\_Handler\_function**

  \- C function for handling errors (see *MPI\_Errhandler\_create* ) .

- **MPI\_User\_function**

  \- C function to combine values (see collective operations and  *MPI\_Op\_create* )

- **MPI\_Copy\_function**

  \- Function to copy attributes (see  *MPI\_Keyval\_create* )

- **MPI\_NULL\_COPY\_FN**

  \- Predefined copy function

- **MPI\_Delete\_function**

  \- Function to delete attributes (see  *MPI\_Keyval\_create* )

- **MPI\_NULL\_DELETE\_FN**

  \- Predefined delete function

- **MPI\_DUP\_FN**

  \- Predefined duplication function

- **MPI\_ERRORS\_ARE\_FATAL**

  \- Error handler that forces exit on error

- **MPI\_ERRORS\_RETURN**

  \- Error handler that returns error codes (as value of MPI routine in C and through last argument in Fortran)

## MPI ERROR CLASSES

- **MPI\_SUCCESS**

  \- Successful return code

- **MPI\_ERR\_BUFFER**

  \- Invalid buffer pointer

- **MPI\_ERR\_COUNT**

  \- Invalid count argument

- **MPI\_ERR\_TYPE**

  \- Invalid datatype argument

- **MPI\_ERR\_TAG**

  \- Invalid tag argument

- **MPI\_ERR\_COMM**

  \- Invalid communicator

- **MPI\_ERR\_RANK**

  \- Invalid rank

- **MPI\_ERR\_ROOT**

  \- Invalid root

- **MPI\_ERR\_GROUP**

  \- Null group passed to function

- **MPI\_ERR\_OP**

  \- Invalid operation

- **MPI\_ERR\_TOPOLOGY**

  \- Invalid topology

- **MPI\_ERR\_DIMS**

  \- Illegal dimension argument

- **MPI\_ERR\_ARG**

  \- Invalid argument

- **MPI\_ERR\_UNKNOWN**

  \- Unknown error

- **MPI\_ERR\_TRUNCATE**

  \- message truncated on receive

- **MPI\_ERR\_OTHER**

  \- Other error; use Error\_string

- **MPI\_ERR\_INTERN**

  \- internal error code

- **MPI\_ERR\_IN\_STATUS**

  \- Look in status for error value

- **MPI\_ERR\_PENDING**

  \- Pending request

- **MPI\_ERR\_REQUEST**

  \- illegal mpi\_request handle

- **MPI\_ERR\_LASTCODE**

  \- Last error code -- always at end

## LOCATION

/home/MPI/mansrc/mpiconsts.txt
