MPI_Type_get_contents(3)
β¨ NAME β¨
MPI_Type_get_contents β get type contents. Straight from the MPI manual, bestie, and yes it's giving "let me peek inside this datatype" π
.
π¦ SYNOPSIS π¦
int MPI_Type_get_contents(MPI_Datatype datatype, int max_integers,
int max_addresses, int max_large_counts,
int max_datatypes, int array_of_integers[],
MPI_Aint array_of_addresses[],
MPI_Count array_of_large_counts[],
MPI_Datatype array_of_datatypes[])
and the _c version, because of course there's a _c version:
int MPI_Type_get_contents_c(MPI_Datatype datatype, MPI_Count max_integers,
MPI_Count max_addresses, MPI_Count max_large_counts,
MPI_Count max_datatypes, int array_of_integers[],
MPI_Aint array_of_addresses[],
MPI_Count array_of_large_counts[],
MPI_Datatype array_of_datatypes[])
πΈ INPUT PARAMETERS πΈ
datatypeβ the datatype to access (it's a handle, bestie).max_integersβ number of elements inarray_of_integers(non-negative integer, no negativity allowed periodt).max_addressesβ number of elements inarray_of_addresses(non-negative integer).max_large_countsβ number of elements inarray_of_large_counts(non-negative integer).max_datatypesβ number of elements inarray_of_datatypes(non-negative integer).
π OUTPUT PARAMETERS π
array_of_integersβ contains integer arguments used in constructingdatatype(integer).array_of_addressesβ contains address arguments used in constructingdatatype(integer).array_of_large_countsβ contains large count arguments used in constructingdatatype(integer).array_of_datatypesβ contains datatype arguments used in constructingdatatype(handle).
π§ NOTES FOR FORTRAN π§
Okay Fortran besties, listen up. All MPI routines in Fortran β except for MPI_WTIME and MPI_WTICK β have an additional argument ierr at the end of the argument list. ierr is an integer and has the same meaning as the return value of the routine in C. In Fortran, MPI routines are subroutines, and they're invoked with the call statement.
Also: all MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. Not a vibe you can change, it's just how it is π
.
π₯ ERRORS π₯
All MPI routines β except MPI_Wtime and MPI_Wtick β return an error value; C routines as the value of the function and Fortran routines in the last argument. Before the value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job π. The error handler may be changed with MPI_Comm_set_errhandler (for communicators), MPI_File_set_errhandler (for files), and MPI_Win_set_errhandler (for RMA windows). The MPI-1 routine MPI_Errhandler_set may be used but its use is deprecated (so maybe don't). The predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error; however, MPI implementations will attempt to continue whenever possible.
MPI_SUCCESSβ No error; MPI routine completed successfully. We love a clean run β¨.MPI_ERR_ARGβ Invalid argument. Some argument is invalid and is not identified by a specific error class (e.g.,MPI_ERR_RANK).MPI_ERR_TYPEβ Invalid datatype argument. Additionally, this error can occur if an uncommittedMPI_Datatype(seeMPI_Type_commit) is used in a communication call.MPI_ERR_OTHERβ Other error; useMPI_Error_stringto get more information about this error code.
That's the whole page, bestie. Served fresh on 4/10/2026, from the MPI manual β MPI_Type_get_contents(3) πβ¨π¦. Go get those type contents, you 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