Constants(3)
โจ Constants(3) โจ
okay bestie, welcome to the MPI constants page ๐
this is the part where we find out what all those shouty ALL-CAPS names actually mean. it's the Constants man page, from the MPI manual, section 3. it's a chonky one so it comes in parts, and this is part 1 โ grab a snack, we're doing this ๐
๐ธ NAME ๐ธ
Constants โ the meaning of MPI's defined constants. that's it, that's the vibe โจ
๐ DATA TYPES ๐
heads up bestie, read this one twice ๐
the Fortran types are for Fortran programs only, and the C types are for C programs only. like, for real. using MPI_INT for a Fortran INTEGER is an error โ not a quirky little whoopsie, an actual error. ๐
datatypes are of type MPI_Datatype in C, type INTEGER in Fortran, and Type(MPI_Datatype) in Fortran08. periodt.
๐ C DATATYPES ๐
MPI_CHARโcharMPI_SIGNED_CHARโsigned charMPI_UNSIGNED_CHARโunsigned charMPI_BYTEโ see the standard; likeunsigned charMPI_WCHARโ wide character (wchar_t)MPI_SHORTโshortMPI_UNSIGNED_SHORTโunsigned shortMPI_INTโintMPI_UNSIGNEDโunsigned intMPI_LONGโlongMPI_UNSIGNED_LONGโunsigned longMPI_LONG_LONG_INTโlong longMPI_LONG_LONGโ synonym forMPI_LONG_LONG_INTMPI_UNSIGNED_LONG_LONGโunsigned long longMPI_FLOATโfloatMPI_DOUBLEโdoubleMPI_LONG_DOUBLEโlong double(some systems may not implement this ๐ญ not everyone got the range)MPI_INT8_Tโint8_tMPI_INT16_Tโint16_tMPI_INT32_Tโint32_tMPI_INT64_Tโint64_tMPI_UINT8_Tโuint8_tMPI_UINT16_Tโuint16_tMPI_UINT32_Tโuint32_tMPI_UINT64_Tโuint64_tMPI_C_BOOLโ_BoolMPI_C_FLOAT_COMPLEXโfloat _ComplexMPI_C_COMPLEXโfloat _ComplexMPI_C_DOUBLE_COMPLEXโdouble _ComplexMPI_C_LONG_DOUBLE_COMPLEXโlong double _Complex
these next ones are the datatypes for the MPI functions MPI_MAXLOC and MPI_MINLOC, iykyk:
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 one is an optional type, and it may be set toMPI_DATATYPE_NULL
and now, special datatypes for C and Fortran โจ
MPI_PACKEDโ forMPI_PackandMPI_UnpackMPI_UBโ forMPI_Type_struct; an upper-bound indicator. Removed in MPI 3MPI_LBโ forMPI_Type_struct; a lower-bound indicator. Removed in MPI 3
๐ฆ FORTRAN DATATYPES ๐ฆ
MPI_REALโREALMPI_INTEGERโINTEGERMPI_LOGICALโLOGICALMPI_DOUBLE_PRECISIONโDOUBLE PRECISIONMPI_COMPLEXโCOMPLEXMPI_DOUBLE_COMPLEXโcomplex*16(orcomplex*32) where supported.
the following datatypes are optional (as in, may or may not show up ๐):
MPI_INTEGER1โinteger*1if supportedMPI_INTEGER2โinteger*2if supportedMPI_INTEGER4โinteger*4if supportedMPI_INTEGER8โinteger*8if supportedMPI_INTEGER16โinteger*16if supportedMPI_REAL4โreal*4if supportedMPI_REAL8โreal*8if supportedMPI_REAL16โreal*16if supportedMPI_COMPLEX8โcomplex*8if supportedMPI_COMPLEX16โcomplex*16if supportedMPI_COMPLEX32โcomplex*32if supported
these are for MPI_MAXLOC and MPI_MINLOC. in Fortran, these datatypes always consist of two elements of the same Fortran type โ no mixing, bestie ๐ค
MPI_2INTEGERโINTEGER,INTEGERMPI_2REALโREAL, REALMPI_2DOUBLE_PRECISIONโDOUBLE PRECISION, DOUBLE PRECISION
MPI datatypes for MPI types, going full meta:
MPI_AINTโ datatype for anMPI_AintMPI_OFFSETโ datatype for anMPI_OffsetMPI_COUNTโ datatype for anMPI_Count
๐ MPI DATATYPE COMBINER NAMES ๐
MPI_COMBINER_NAMEDโ a named predefined datatypeMPI_COMBINER_DUPโMPI_TYPE_DUPMPI_COMBINER_CONTIGUOUSโMPI_TYPE_CONTIGUOUSMPI_COMBINER_VECTORโMPI_TYPE_VECTORMPI_COMBINER_HVECTOR_INTEGERโ Removed in MPI-3MPI_COMBINER_HVECTORโMPI_TYPE_CREATE_HVECTORMPI_COMBINER_INDEXEDโMPI_TYPE_INDEXEDMPI_COMBINER_HINDEXED_INTEGERโ Removed in MPI-3MPI_COMBINER_HINDEXEDโMPI_TYPE_CREATE_HINDEXEDMPI_COMBINER_INDEXED_BLOCKโMPI_TYPE_CREATE_INDEXED_BLOCKMPI_COMBINER_STRUCT_INTEGERโ Removed in MPI-3MPI_COMBINER_STRUCTโMPI_TYPE_CREATE_STRUCTMPI_COMBINER_SUBARRAYโMPI_TYPE_CREATE_SUBARRAYMPI_COMBINER_DARRAYโMPI_TYPE_CREATE_DARRAYMPI_COMBINER_F90_REALโMPI_TYPE_CREATE_F90_REALMPI_COMBINER_F90_COMPLEXโMPI_TYPE_CREATE_F90_COMPLEXMPI_COMBINER_F90_INTEGERโMPI_TYPE_CREATE_F90_INTEGERMPI_COMBINER_RESIZEDโMPI_TYPE_CREATE_RESIZEDMPI_COMBINER_HINDEXED_BLOCKโMPI_TYPE_CREATE_HINDEXED_BLOCK
๐ MPI DATATYPE TYPE CLASSES ๐
MPI type classes โ these get used with routines that return Fortran types with defined precision and range ๐ฏ
MPI_TYPECLASS_REALโREALMPI_TYPECLASS_INTEGERโINTEGERMPI_TYPECLASS_COMPLEXโCOMPLEX
โญ MPI DARRAY AND SUBARRAY VALUES โญ
you use these to make a datatype with the DARRAY and SUBARRAY constructors โจ
MPI_ORDER_Cโ row-major order (as used by C)MPI_ORDER_FORTRANโ column-major order (as used by Fortran)MPI_DISTRIBUTE_BLOCKโ block distributionMPI_DISTRIBUTE_CYCLICโ cyclic distributionMPI_DISTRIBUTE_NONEโ this dimension is not distributedMPI_DISTRIBUTE_DFLT_DARGโ use the default distribution
๐ COMMUNICATORS ๐
communicators are of type MPI_Comm in C, INTEGER in Fortran, and Type(MPI_Comm) in Fortran08 ๐ซ
MPI_COMM_WORLDโ contains all of the processesMPI_COMM_SELFโ contains only the calling process
๐ KIND OF COMMUNICATOR FOR 'MPI_COMM_SPLIT_TYPE' ๐
MPI_COMM_TYPE_SHAREDโ 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 ๐ธ
MPI_GROUP_EMPTYโ a group containing no members.
๐ฅ RESULTS OF THE COMPARE OPERATIONS ON GROUPS AND COMMUNICATORS ๐ฅ
MPI_IDENTโ identicalMPI_CONGRUENTโ (only forMPI_COMM_COMPARE) the groups are identicalMPI_SIMILARโ same members, but in a different orderMPI_UNEQUALโ different
๐ COLLECTIVE OPERATIONS ๐
the collective combination operations (like MPI_REDUCE, MPI_ALLREDUCE, MPI_REDUCE_SCATTER, and MPI_SCAN) take a combination operation. that operation is of type MPI_Op in C and of type INTEGER in Fortran. here are the predefined ones, bestie:
MPI_MAXโ return the maximumMPI_MINโ return the minimumMPI_SUMโ return the sumMPI_PRODโ return the productMPI_LANDโ return the logical andMPI_BANDโ return the bitwise andMPI_LORโ return the logical orMPI_BORโ return the bitwise ofMPI_LXORโ return the logical exclusive orMPI_BXORโ return the bitwise exclusive orMPI_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 locationMPI_REPLACEโ replace b with aMPI_NO_OPโ perform no operation
๐ง NOTES ON COLLECTIVE OPERATIONS ๐ง
okay this part is important, listen up ๐ข the reduction functions (MPI_Op) do not return an error value. so if they detect an error, all they can do is either call MPI_Abort or silently skip the problem ๐ญ so 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.
why tho? because of performance problems in ensuring that all collective routines return the same error value. it's giving "we could but at what cost".
also, not all datatypes are valid for these functions. for example, MPI_COMPLEX is not valid for MPI_MAX and MPI_MIN. and on top of that, 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. buuut 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 though ๐
๐ PERMANENT KEY VALUES ๐
these are the same in C and Fortran, no cap ๐ค
MPI_TAG_UBโ largest tag valueMPI_HOSTโ rank of process that is host, if anyMPI_IOโ rank of process that can do I/OMPI_WTIME_IS_GLOBALโ has value 1 ifMPI_WTIMEis globally synchronized.MPI_UNIVERSE_SIZEโ number of available processes. see the standard for a description of limitations on this valueMPI_LASTUSEDCODEโ last used MPI error code (check โ code or class?)MPI_APPNUMโ application number, starting from 0. see the standard forMPI_COMM_SPAWN_MULTIPLEandmpiexecfor details
๐ NULL OBJECTS ๐
the whole squad of "nothing here" handles, all iconic in their own right:
MPI_COMM_NULLโ null communicatorMPI_OP_NULLโ null operationMPI_GROUP_NULLโ null groupMPI_DATATYPE_NULLโ null datatypeMPI_REQUEST_NULLโ null requestMPI_ERRHANDLER_NULLโ null error handlerMPI_WIN_NULLโ null window handleMPI_FILE_NULLโ null file handleMPI_INFO_NULLโ null info handleMPI_MESSAGE_NULLโ null message handleMPI_ARGV_NULLโ emptyARGVvalue for spawn commandsMPI_ARGVS_NULLโ emptyARGVarray for spawn-multiple commandMPI_T_ENUM_NULLโ null MPI_T enumMPI_T_CVAR_HANDLE_NULLโ null MPI_T control variable handleMPI_T_PVAR_HANDLE_NULLโ null MPI_T performance variable handleMPI_T_PVAR_SESSION_NULLโ null MPI_T performance variable session handle
๐ PREDEFINED CONSTANTS ๐
okay so these are the lil magic numbers MPI hands you so you don't have to guess ๐ all of them are constants, all of them matter:
MPI_MAX_PROCESSOR_NAMEโ the absolute max length of the name that comes back fromMPI_GET_PROCESSOR_NAMEโจMPI_MAX_ERROR_STRINGโ biggest possible length of the stringMPI_ERROR_STRINGhands backMPI_MAX_LIBRARY_VERSION_STRINGโ longest stringMPI_GET_LIBRARY_VERSION_STRINGcan return ???MPI_MAX_PORT_NAMEโ max length of a port name, periodt ๐MPI_MAX_OBJECT_NAMEโ max length of an object (name), allegedly ๐MPI_MAX_INFO_KEYโ how long an info key can beMPI_MAX_INFO_VALโ how long an info value can beMPI_UNDEFINEDโ the "idk, unknown, undefined" integer a bunch of routines use when there's no real value to give you ๐MPI_UNDEFINED_RANKโ a rank that is... not a rank. unknown, bestieMPI_KEYVAL_INVALIDโ that special keyval you compare against to catch keyvals that were never initialized ๐MPI_BSEND_OVERHEADโ add this to the size of anMPI_BSENDbuffer for each outstanding message. yes, each. don't forget it, the vibes will be off ๐ฅMPI_PROC_NULLโ a rank you can send to or receive from and it's literally nobody ๐ซฅ no-op cityMPI_ANY_SOURCEโ on a receive: "idc who sent it, I'll take anyone's message" ๐MPI_ANY_TAGโ on a receive: "any tag value is fine, I'm not picky"MPI_BOTTOMโ may be used to indicate the bottom of the address space ๐MPI_IN_PLACEโ that special buffer location some collective communication routines use so you don't need a separate send buffer โจMPI_BUFFER_AUTOMATICโ use automatic (unlimited) buffering in buffered send ๐ฆ unlimited buffering?? she's generousMPI_VERSIONโ the numeric MPI version, e.g.3MPI_SUBVERSIONโ the numeric MPI subversion, e.g.1(so3.1, iykyk)
๐บ๏ธ TOPOLOGY TYPES ๐บ๏ธ
what shape is your process crew, bestie:
MPI_CARTโ Cartesian grid ๐ all neat and griddedMPI_GRAPHโ general graph, freeform connectionsMPI_DIST_GRAPHโ general distributed graph
๐ธ SPECIAL VALUES FOR DISTRIBUTED GRAPH ๐ธ
MPI_UNWEIGHTEDโ says the edges have no weights, they're just vibesMPI_WEIGHTS_EMPTYโ a special address meaning "there is no array of weights information here" ๐ซถ
๐ FILE MODES ๐
the flags for how you're opening a file. remember these, they're giving choices:
MPI_MODE_RDONLYโ read only, look don't touchMPI_MODE_RDWRโ read and write, she does it all ๐MPI_MODE_WRONLYโ write onlyMPI_MODE_CREATEโ create the file if it doesn't exist yet โจMPI_MODE_EXCLโ it is an error if you try to create a file that already exists โ ๏ธMPI_MODE_DELETE_ON_CLOSEโ delete the file when it's closed. dramatic exit ๐ฅMPI_MODE_UNIQUE_OPENโ this file will not be concurrently opened anywhere elseMPI_MODE_APPENDโ all file pointers start out at the end of the file ๐MPI_MODE_SEQUENTIALโ the file will only be accessed sequentially, no jumping around
๐ FILE DISPLACEMENT ๐
MPI_DISPLACEMENT_CURRENTโ use this with files that were opened with modeMPI_MODE_SEQUENTIAL, in calls toMPI_FILE_SET_VIEW
๐งญ FILE POSITIONING ๐งญ
MPI_SEEK_SETโ set the pointer to offsetMPI_SEEK_CURโ set the pointer to the current position plus offsetMPI_SEEK_ENDโ set the pointer to the end of the file plus offset
๐ช WINDOW ATTRIBUTES ๐ช
MPI_WIN_BASEโ the window base addressMPI_WIN_SIZEโ window size, in bytesMPI_WIN_DISP_UNITโ the displacement unit associated with the windowMPI_WIN_CREATE_FLAVORโ how the window was created ๐MPI_WIN_MODELโ the memory model for the window
๐จ WINDOW FLAVORS ๐จ
MPI_WIN_FLAVOR_CREATEโ window was created withMPI_WIN_CREATEMPI_WIN_FLAVOR_ALLOCATEโ window was created withMPI_WIN_ALLOCATEMPI_WIN_FLAVOR_DYNAMICโ window was created withMPI_WIN_CREATE_DYNAMICMPI_WIN_FLAVOR_SHAREDโ window was created withMPI_WIN_ALLOCATE_SHARED
๐ง WINDOW MEMORY MODEL ๐ง
MPI_WIN_SEPARATEโ separate public and private copies of window memoryMPI_WIN_UNIFIEDโ the public and private copies are identical (and by identical we mean that updates are eventually observed without additional RMA operations) ๐
๐ WINDOW LOCK TYPES ๐
MPI_LOCK_EXCLUSIVEโ only one process at a time will execute accesses inside the lock. it's giving exclusive, it's giving main character ๐MPI_LOCK_SHAREDโ not exclusive; multiple processes may execute accesses inside the lock ๐ซถ
๐ข WINDOW ASSERTIONS ๐ข
See section 11.5 in MPI 3.1 for a detailed description of each of these assertion values. (not me telling you to go read the source, but bestie... go read it ๐)
MPI_MODE_NOCHECKโ the matching calls toMPI_WIN_POSTorMPI_WIN_STARThave already completed, or no process holds or will attempt to acquire a conflicting lockMPI_MODE_NOSTOREโ the local window has not been updated by stores since the last synchronizationMPI_MODE_NOPUTโ the local window will not be updated by put or accumulate until the next synchronizationMPI_MODE_NOPRECEDEโ the fence does not complete any locally issued RMA callsMPI_MODE_NOSUCCEEDโ the fence does not start any locally issued RMA calls
๐ฎ PREDEFINED INFO OBJECT ๐ฎ
MPI_INFO_ENVโ contains the execution environment ๐ฆ
๐ฌ MPI STATUS ๐ฌ
so the MPI_Status datatype is a structure in C. the three elements that are actually for you, the programmer, are:
MPI_SOURCEโ who sent the messageMPI_TAGโ what tag the message was sent withMPI_ERRORโ any error return (only when the error returned by the routine has error classMPI_ERR_IN_STATUS) โ ๏ธ
and then the chaotic duo:
MPI_STATUS_IGNOREโ ignore a singleMPI_Statusargument ๐MPI_STATUSES_IGNOREโ ignore an array ofMPI_Status๐๐
๐จ SPECIAL VALUE FOR ERROR CODES ARRAY ๐จ
MPI_ERRCODES_IGNOREโ ignore an array of error codes ๐
๐ ๏ธ MPI_T CONSTANTS ๐ ๏ธ
verbosity, the user edition ๐
MPI_T_VERBOSITY_USER_BASICโ basic info that's of interest to usersMPI_T_VERBOSITY_USER_DETAILโ detailed info that's of interest to usersMPI_T_VERBOSITY_USER_ALLโ all the remaining info that's of interest to users
verbosity, the tuner edition ๐๏ธ
MPI_T_VERBOSITY_TUNER_BASICโ basic info required for tuningMPI_T_VERBOSITY_TUNER_DETAILโ detailed info required for tuningMPI_T_VERBOSITY_TUNER_ALLโ all remaining info required for tuning
verbosity, the implementor edition ๐งโ๐ฌ
MPI_T_VERBOSITY_MPIDEV_BASICโ basic info for MPI implementorsMPI_T_VERBOSITY_MPIDEV_DETAILโ detailed info for MPI implementorsMPI_T_VERBOSITY_MPIDEV_ALLโ all remaining info for MPI implementors
binding scopes โ what is this variable even attached to ๐งท
MPI_T_BIND_NO_OBJECTโ applies globally to the entire MPI processMPI_T_BIND_MPI_COMMโ MPI communicatorsMPI_T_BIND_MPI_DATATYPEโ MPI datatypesMPI_T_BIND_MPI_ERRHANDLERโ MPI error handlersMPI_T_BIND_MPI_FILEโ MPI file handlesMPI_T_BIND_MPI_GROUPโ MPI groupsMPI_T_BIND_MPI_OPโ MPI reduction operatorsMPI_T_BIND_MPI_REQUESTโ MPI requestsMPI_T_BIND_MPI_WINโ MPI windows for one-sided communicationMPI_T_BIND_MPI_MESSAGEโ MPI message objectMPI_T_BIND_MPI_INFOโ MPI info objectMPI_T_BIND_MPI_SESSIONโ MPI session object
scopes โ who has to agree on a write โ๏ธ
MPI_T_SCOPE_CONSTANTโ read-only, the value is constant. untouched, unbothered โจMPI_T_SCOPE_READONLYโ read-only, cannot be written, but it can changeMPI_T_SCOPE_LOCALโ may be writeable, and writing it is a local operationMPI_T_SCOPE_GROUPโ may be writeable, must be done to a group of processes, and all processes in a group must be set to consistent valuesMPI_T_SCOPE_GROUP_EQโ may be writeable, must be done to a group of processes, and all processes in a group must be set to the same valueMPI_T_SCOPE_ALLโ may be writeable, must be done to all processes, and all connected processes must be set to consistent valuesMPI_T_SCOPE_ALL_EQโ may be writeable, must be done to all processes, and all connected processes must be set to the same value
pvar classes โ the category of your performance variable ๐
MPI_T_PVAR_CLASS_STATEโ a set of discrete states (MPI_INT)MPI_T_PVAR_CLASS_LEVELโ utilization level of a resourceMPI_T_PVAR_CLASS_SIZEโ size of a resourceMPI_T_PVAR_CLASS_PERCENTAGEโ percentage utilization of a resourceMPI_T_PVAR_CLASS_HIGHWATERMARKโ high watermark of a resourceMPI_T_PVAR_CLASS_LOWWATERMARKโ low watermark of a resourceMPI_T_PVAR_CLASS_COUNTERโ number of occurrences of an eventMPI_T_PVAR_CLASS_AGGREGATEโ aggregate value over an event (e.g. the sum of all memory allocations)MPI_T_PVAR_CLASS_TIMERโ aggregate time spent executing an event โฑ๏ธMPI_T_PVAR_CLASS_GENERICโ used for any other type of performance variable
๐งต THREAD LEVELS ๐งต
how much threading chaos are you signing up for:
MPI_THREAD_SINGLEโ only one thread executes ๐งMPI_THREAD_FUNNELEDโ only the main thread makes MPI callsMPI_THREAD_SERIALIZEDโ only one thread at a time makes MPI callsMPI_THREAD_MULTIPLEโ multiple threads may make MPI calls. full chaos mode, slay ๐ฅ
๐ช SPECIAL MPI TYPES AND FUNCTIONS ๐ช
MPI_Aintโ a C type that holds any valid addressMPI_Countโ a C type that holds any valid countMPI_Offsetโ a C type that holds any valid file offsetMPI_Handler_functionโ a C function for handling errors (seeMPI_Errhandler_create)MPI_User_functionโ a C function to combine values (see collective operations andMPI_Op_create)MPI_Copy_functionโ a function to copy attributes (seeMPI_Keyval_create)MPI_Delete_functionโ a function to delete attributes (seeMPI_Keyval_create)MPI_ERRORS_ARE_FATALโ error handler that forces exit on error ๐MPI_ERRORS_RETURNโ error handler that returns error codes (as the value of the MPI routine in C, and through the last argument in Fortran)MPI_ERRORS_ABORTโ error handler that forces exit on error (it only aborts the local process if the error handler is invoked on a session)
๐ท๏ธ MPI ATTRIBUTE DEFAULT FUNCTIONS ๐ท๏ธ
the prebuilt copy / delete / duplicate trio for each object type, so you don't have to write your own (you can though, you're iconic):
MPI_COMM_NULL_COPY_FNโ predefined attribute copy function for communicatorsMPI_COMM_NULL_DELETE_FNโ predefined attribute delete function for communicatorsMPI_COMM_DUP_FNโ predefined attribute duplicate function for communicatorsMPI_WIN_NULL_COPY_FNโ predefined attribute copy function for windowsMPI_WIN_NULL_DELETE_FNโ predefined attribute delete function for windowsMPI_WIN_DUP_FNโ predefined attribute duplicate function for windowsMPI_TYPE_NULL_COPY_FNโ predefined attribute copy function for datatypesMPI_TYPE_NULL_DELETE_FNโ predefined attribute delete function for datatypesMPI_TYPE_DUP_FNโ predefined attribute duplicate function for datatypes
๐ MPI-1 ATTRIBUTE DEFAULT FUNCTIONS ๐
bestie these three are the pre-baked, ready-to-go functions you slap into your attribute copy/delete/dup slots so you don't have to roll your own. built in, zero effort, iconic:
MPI_NULL_COPY_FNโ the predefined copy function โจMPI_NULL_DELETE_FNโ the predefined delete function ๐๏ธMPI_DUP_FNโ the predefined duplication function ๐ซถ
๐ฅ MPI ERROR CLASSES ๐ฅ
okay so this is THE master list, the whole return-code wardrobe. every error MPI can hand you back lives here. yes it's long. yes you're gonna need it. screenshot it, pin it, love it ๐
MPI_SUCCESSโ it worked!! the successful return code, the slay we're all chasing ๐MPI_ERR_BUFFERโ your buffer pointer is invalid, not it ๐ซMPI_ERR_COUNTโ the count argument is invalidMPI_ERR_TYPEโ the datatype argument is invalidMPI_ERR_TAGโ the tag argument is invalidMPI_ERR_COMMโ invalid communicator, tragicMPI_ERR_RANKโ invalid rankMPI_ERR_ROOTโ invalid rootMPI_ERR_GROUPโ you passed a null group to the function ๐ญMPI_ERR_OPโ invalid operationMPI_ERR_TOPOLOGYโ invalid topologyMPI_ERR_DIMSโ illegal dimension argumentMPI_ERR_ARGโ invalid argument, the classicMPI_ERR_UNKNOWNโ unknown error (mysterious, unbothered, no explanation)MPI_ERR_TRUNCATEโ message got truncated on receive ๐ตMPI_ERR_OTHERโ some other error; go askError_stringabout itMPI_ERR_INTERNโ internal error codeMPI_ERR_IN_STATUSโ the error value is chillin' in the status, look thereMPI_ERR_PENDINGโ pending requestMPI_ERR_REQUESTโ invalidmpi_requesthandleMPI_ERR_ACCESSโ permission denied, absolutely not getting in ๐ชMPI_ERR_AMODEโ error relating to the amode you passed toMPI_FILE_OPENMPI_ERR_BAD_FILEโ invalid file name (like, path name too long and everything)MPI_ERR_CONVERSIONโ an error happened inside a user-supplied data conversion functionMPI_ERR_DUP_DATAREPโ the conversion functions couldn't be registered because a data representation identifier that was already defined got passed toMPI_REGISTER_DATAREPMPI_ERR_FILE_EXISTSโ the file already existsMPI_ERR_FILE_IN_USEโ the file operation couldn't finish because the file is currently open by some processMPI_ERR_FILEโ invalid file handleMPI_ERR_IOโ some other I/O errorMPI_ERR_NO_SPACEโ not enough space ๐ณ๏ธMPI_ERR_NO_SUCH_FILEโ file does not existMPI_ERR_READ_ONLYโ read-only file or file system, hands off โMPI_ERR_UNSUPPORTED_DATAREPโ unsupported datarep got passed toMPI_FILE_SET_VIEWMPI_ERR_INFOโ invalid info argumentMPI_ERR_INFO_KEYโ key is longer thanMPI_MAX_INFO_KEYMPI_ERR_INFO_VALUEโ value is longer thanMPI_MAX_INFO_VALMPI_ERR_INFO_NOKEYโ invalid key passed toMPI_INFO_DELETEMPI_ERR_NAMEโ invalid service name passed toMPI_LOOKUP_NAMEMPI_ERR_NO_MEMโAlloc_memcould not allocate memory ๐MPI_ERR_NOT_SAMEโ a collective argument wasn't identical on all processes, or the collective routines got called in a different order by different processes (chaos, honestly)MPI_ERR_PORTโ invalid port name passed toMPI_COMM_CONNECTMPI_ERR_QUOTAโ quota exceededMPI_ERR_SERVICEโ invalid service name passed toMPI_UNPUBLISH_NAMEMPI_ERR_SPAWNโ error in spawning processesMPI_ERR_UNSUPPORTED_OPERATIONโ unsupported operation, like trying to seek on a file that only supports sequential accessMPI_ERR_WINโ invalid win argumentMPI_ERR_BASEโ invalid base passed toMPI_FREE_MEMMPI_ERR_LOCKTYPEโ invalid locktype argumentMPI_ERR_KEYVALโ erroneous attribute keyMPI_ERR_RMA_CONFLICTโ conflicting accesses to the window ๐คMPI_ERR_RMA_SYNCโ wrong synchronization of RMA callsMPI_ERR_SIZEโ invalid size argumentMPI_ERR_DISPโ invalid disp argumentMPI_ERR_ASSERTโ invalid assert argumentMPI_ERR_RMA_RANGEโ target memory is not part of the window (and if the window was created withMPI_WIN_CREATE_DYNAMIC, then the target memory isn't attached)MPI_ERR_RMA_ATTACHโ memory can't be attached (like, because of resource exhaustion)MPI_ERR_RMA_SHAREDโ memory can't be shared (like when some process in the group of the specified communicator can't expose shared memory)MPI_ERR_RMA_FLAVORโ passed window has the wrong flavor for the (real talk: the sentence literally ends there in the source, mid-thought, and I respect it ๐)MPI_ERR_SESSIONโ invalid session argumentMPI_ERR_PROC_ABORTEDโ you're trying to communicate with aborted processes, they are not picking up ๐ชฆMPI_ERR_VALUE_TOO_LARGEโ the value is too large to storeMPI_ERR_ERRHANDLERโ invalid error handler argument for the called functionMPI_ERR_LASTCODEโ the last error code, and it's always at the end, periodt ๐
๐ฆ ERROR CODES FOR MPI_T ๐ฆ
and now the exclusive lil' collection that belongs to MPI_T only. tool-writers, this one's for you, mwah ๐
MPI_T_ERR_MEMORYโ out of memoryMPI_T_ERR_NOT_INITIALIZEDโ interface not initializedMPI_T_ERR_CANNOT_INITโ interface isn't in a state where it can be initializedMPI_T_ERR_INVALID_INDEXโ the index is invalid or it has been deletedMPI_T_ERR_INVALID_HANDLEโ the handle is invalidMPI_T_ERR_OUT_OF_HANDLESโ no more handles availableMPI_T_ERR_OUT_OF_SESSIONSโ no more sessions availableMPI_T_ERR_INVALID_SESSIONโ the session argument is not validMPI_T_ERR_CVAR_SET_NOT_NOWโ the cvar cannot be set at this momentMPI_T_ERR_CVAR_SET_NEVERโ the cvar cannot be set until the end of execution, so don't even tryMPI_T_ERR_PVAR_NO_STARTSTOPโ the pvar can't be started or stoppedMPI_T_ERR_PVAR_NO_WRITEโ the pvar can't be written or resetMPI_T_ERR_PVAR_NO_ATOMICโ the pvar can't be read/written atomicallyMPI_T_ERR_INVALID_NAMEโ the name doesn't matchMPI_T_ERR_INVALIDโ invalid use of the interface, or bad parameter value(s) โ yes, the source spells it values(s) and I'm keeping it exactly like that, no cap ๐
and that's a wrap on the whole Constants(3) page, babes ๐ซถ this was the Constants(3) manual page, dated 4/10/2026 โ constants for dayyys, errors for centuries, and you now know every single one of them. go forth and debug like a main character ๐โจ
๐ฆ where this page comes from
- nixos 26.05: mpich 5.0.1
- ubuntu stonking: mpich-doc 5.0.1-9 ยท other
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms