Appendix A


Reserved Names

NEC MPI provides include files that define reserved names such as datatypes and error codes. All reserved names begin with the prefix MPI_. Three include files, mpi.h for C and C++, mpi++.h for C++, and mpif.h for Fortran, are available.

The following examples show how to include them.

For C:

#include "mpi.h"
main( argc, argv )
int argc ;
char **argv ;
{
     :

For Fortran:

SUBROUTINE SUB(I,J)
INCLUDE "mpif.h"
INTEGER I,J

     :




A.1   Datatypes

This section describes predefined datatypes NEC MPI supports for respective programming languages. Users can create user-defined datatypes based on them.

The following table shows the MPI datatypes for Fortran and corresponding Fortran types.

Table A-1   MPI Datatypes for Fortran

MPI DatatypeFortran Type
MPI_INTEGER INTEGER
MPI_INTEGER2 INTEGER*2
MPI_INTEGER4 INTEGER*4
MPI_INTEGER8 INTEGER*8
MPI_LOGICAL LOGICAL
MPI_LOGICAL1 c LOGICAL*1
MPI_LOGICAL4 (*1) LOGICAL*4
MPI_LOGICAL8 (*1) LOGICAL*8
MPI_REAL REAL
MPI_REAL2 (*2) REAL*2
MPI_REAL4 REAL*4
MPI_REAL8 REAL*8
MPI_REAL16 READ*16
MPI_DOUBLE_PRECISION DOUBLE PRECISION
MPI_QUADRUPLE_PRECISION (*1) QUADRUPLE PRECISION
MPI_COMPLEX COMPLEX
MPI_COMPLEX8 COMPLEX*8
MPI_COMPLEX16 COMPLEX*16
MPI_COMPLEX32 COMPLEX*32
MPI_DOUBLE_COMPLEX DOUBLE COMPLEX
MPI_QUADRUPLE_COMPLEX (*1) COMPLEX QUADRUPLE
MPI_CHARACTER CHARACTER(1)
MPI_AINT INTEGER(KIND=MPI_ADDRESS_KIND)
MPI_COUNT INTEGER(KIND=MPI_COUNT_KIND)
MPI_OFFSET INTEGER(KIND=MPI_OFFSET_KIND)

(*1) Additional support in NEC MPI.

(*2) Not supported for running on VE10, VE10E, VE20, VH or scalar hosts. Only supported running on VE30.

The following table shows the MPI datatypes for C and corresponding C types.

Table A-2   MPI Datatypes for C

MPI DatatypeC Type
MPI_CHAR char
MPI_SHORT short
MPI_INT int
MPI_LONG long
MPI_LONG_LONG_INT long long
MPI_LONG_LONG long long
MPI_SIGNED_CHAR signed char
MPI_UNSIGNED_CHAR unsigned char
MPI_UNSIGNED_SHORT unsigned short
MPI_UNSIGNED unsigned int
MPI_UNSIGNED_LONG unsigned long
MPI_UNSIGNED_LONG_LONG unsigned long long
MPI_FLOAT float
MPI_DOUBLE double
MPI_LONG_DOUBLE long double
MPI_WCHAR wchar_t
MPI_C_BOOL _Bool
MPI_INT8_T int8_t
MPI_INT16_T int16_t
MPI_INT32_T int32_t
MPI_INT64_T int64_t
MPI_UINT8_T uint8_t
MPI_UINT16_T uint16_t
MPI_UINT32_T uint32_t
MPI_UINT64_T uint64_t
MPI_AINT MPI_Aint
MPI_COUNT MPI_Count
MPI_OFFSET MPI_Offset
MPI_C_COMPLEX float _Complex
MPI_C_FLOAT_COMPLEX float _Complex
MPI_C_DOUBLE_COMPLEX double _Complex
MPI_C_LONG_DOUBLE_COMPLEX long double _Complex
NEC_MPI_FLOAT16(*1)(*2) __float16

(*1) Additional support in NEC MPI.

(*2) Not supported for running on VE10, VE10E, VE20, VH or scalar hosts. Only supported running on VE30.

The following table shows the MPI datatypes for C++ and corresponding C++ types.

Table A-3   MPI Datatypes for C++

MPI DatatypeC++ Type
MPI_CXX_BOOL bool
MPI_CXX_FLOAT_COMPLEX std::complex<float>
MPI_CXX_DOUBLE_COMPLEX std::complex<double>
MPI_CXX_LONG_DOUBLE_COMPLEX std::complex<long double>

The following MPI datatypes are common across Fortran and C.

Table A-4   MPI Datatypes for Fortran and C

MPI DatatypeType
MPI_BYTE Any types
MPI_PACKED Any types


A.2   Datatypes for Reduction Operation

The following datatypes can be used in the reduction operations MPI_MAXLOC and MPI_MINLOC in Fortran.

(*1) Additional support in NEC MPI

(*2) Not supported for running on VE10, VE10E, VE20, VH or scalar hosts. Only supported running on VE30.

The following datatypes can be used in the reduction operations MPI_MAXLOC and MPI_MINLOC in C.

(*1) Additional support in NEC MPI

(*2) Not supported for running on VE10, VE10E, VE20, VH or scalar hosts. Only supported running on VE30.


A.3   Error Codes

The following table shows the list of error codes NEC MPI returns when errors occur during execution of MPI procedures.
In Fortran, a return code is returned as the last argument.
In C, it is returned as the function value.
Standard error codes are called error classes, and each error code belongs to an error class.

Table A-4   The List of Error Codes

Error code ValueMeaning
MPI_SUCCESS0Normal termination.
MPI_ERR_BUFFER1Illegal buffer pointer specified in an argument.
MPI_ERR_COUNT2 Illegal element count or block count specified in an argument.
MPI_ERR_TYPE3Illegal data type specified in an argument.
MPI_ERR_TAG4Illegal tag specified in an argument.
MPI_ERR_COMM5Illegal communicator specified in an argument.
MPI_ERR_RANK6Illegal rank specified in an argument.
MPI_ERR_REQUEST19Illegal communication request specified in an argument.
MPI_ERR_ROOT7Illegal root specified in an argument.
MPI_ERR_GROUP8Illegal group value specified in an argument.
MPI_ERR_OP9Illegal operation request specified in an argument.
MPI_ERR_TOPOLOGY10Illegal topology specified in an argument.
MPI_ERR_DIMS11Illegal dimension specified in an argument.
MPI_ERR_ARG12Illegal argument specified.
MPI_ERR_UNKNOWN13An error not recognizable by NEC MPI occurred.
MPI_ERR_TRUNCATE14Invalid truncation of the receive message.
MPI_ERR_OTHER15An undefined error occurred.*
MPI_ERR_INTERN16An error internal to the NEC MPI processing system occurred.
MPI_ERR_IN_STATUS17An error code returned in STATUS (message) argument.
MPI_ERR_PENDING18Communication request by the communication request still pending.
MPI_ERR_KEYVAL36Invalid keyval has been passed.
MPI_ERR_NO_MEM39MPI_ALLOC_MEM failed because memory is exhausted.
MPI_ERR_BASE25Invalid base passed to MPI_FREE_MEM.
MPI_ERR_INFO_KEY32Key longer than MPI_MAX_INFO_KEY.
MPI_ERR_INFO_VALUE34Value longer than MPI_MAX_INFO_VAL.
MPI_ERR_INFO_NOKEY33Invalid key passed to MPI_INFO_DELETE.
MPI_ERR_SPAWN50Error in spawning processes.
MPI_ERR_PORT43Invalid port name passed to MPI_COMM_CONNECT.
MPI_ERR_SERVICE48Invalid service name passed to MPI_UNPUBLISH_NAME.
MPI_ERR_NAME38Invalid service name passed to MPI_LOOKUP_NAME.
MPI_ERR_WIN53Invalid win argument.
MPI_ERR_SIZE49Invalid size argument.
MPI_ERR_DISP27Invalid disp argument.
MPI_ERR_INFO35Invalid info argument.
MPI_ERR_LOCKTYPE37Invalid locktype argument.
MPI_ERR_ASSERT23Invalid assert argument.
MPI_ERR_RMA_CONFLICT46Conflicting accesses to window.
MPI_ERR_RMA_SYNC47Wrong synchronization of RMA calls.
MPI_ERR_RMA_RANGE57Target memory is not part of the window.
MPI_ERR_RMA_ATTACH55Memory cannot be attached.
MPI_ERR_RMA_SHARED54Memory cannot be shared.
MPI_ERR_RMA_FLAVOR56Passed window has the wrong flavor for the called function.
MPI_ERR_FILE31Invalid file handle.
MPI_ERR_NOT_SAME40Collective argument not identical on all processes, or collective routines called in a different order by different processes.
MPI_ERR_AMODE22Error related to the amode passed to MPI_FILE_OPEN.
MPI_ERR_UNSUPPORTED_DATAREP51Unsupported datarep passed to MPI_FILE_SET_VIEW.
MPI_ERR_UNSUPPORTED_OPERATION52Unsupported operation, such as seeking on a file which supports sequential access only.
MPI_ERR_NO_SUCH_FILE42File does not exist.
MPI_ERR_FILE_EXISTS29File exists.
MPI_ERR_BAD_FILE24Invalid file name (e.g., path name too long).
MPI_ERR_ACCESS21Permission denied.
MPI_ERR_NO_SPACE41Not enough space.
MPI_ERR_QUOTA44Quota exceeded.
MPI_ERR_READ_ONLY45Read-only file or file system.
MPI_ERR_FILE_IN_USE30File operation could not be completed, as the file is currently open by some process.
MPI_ERR_DUP_DATAREP28Conversion functions could not be registered because a data representation identifier that was already defined was passed to MPI_REGISTER_DATAREP.
MPI_ERR_CONVERSION26An error occurred in a user supplied data conversion function.
MPI_ERR_IO20Other I/O error
MPI_ERR_LASTCODE32768Last error code (Without meaning as an error).

Note:


A.4   Reserved Communicator Names

NEC MPI supports the following predefined communicators.

Table A-5   Reserved Communicator Names

Communicator Name Meaning
MPI_COMM_WORLD Communicator to which all MPI processes belong.
MPI_COMM_SELF Communicator to which only the executing process belongs


A.5   Reduction Operators

Execution of reduction operation calculates a value by combining a data element on each process with an operator. NEC MPI supports the following predefined reduction operators:

Table A-6   Reduction Operators

Reduction OperatorDescription
MPI_MAXMaximum
MPI_MINMinimum
MPI_SUMSum
MPI_PRODProduct
MPI_MAXLOCInformation corresponding to the maximum
MPI_MINLOCInformation corresponding to the minimum
MPI_BANDBit-wise AND
MPI_BORBit-wise OR
MPI_BXORBit-wise XOR
MPI_LANDLogical AND
MPI_LORLogical OR
MPI_LXORLogical XOR


Contents Previous ChapterGlossary Index