MPI_Type_create_extent(3)
π MPI_Type_create_extent(3) π
okay bestie, welcome to the LAM/MPI manual page for MPI_Type_create_extent β yes it's giving "tiny helper function that fixes your datatype's vibe", and yes we're gonna read the whole thing together, no skipping π«Ά
β¨ NAME β¨
MPI_Type_create_extent β create a resized datatype π¦
β¨ SYNOPSIS β¨
#include <mpi.h>
int
MPI_Type_create_resized(MPI_Datatype type, MPI_Aint lb,
MPI_Aint extent, MPI_Datatype *newtype)
β¨ INPUT PARAMETERS β¨
typeβ the input datatype you're handing over πlbβ the new lower bound of the datatypeextentβ the new extent of the datatype
β¨ OUTPUT PARAMETER β¨
newtypeβ the new resized type, freshly served πΈ
β¨ NOTES FOR FORTRAN β¨
So every single MPI routine in Fortran (except for MPI_WTIME and MPI_WTICK) has an extra argument called ierr tacked onto the end of the argument list. ierr is an integer and it means the exact same thing as the return value of the routine in C. And in Fortran, MPI routines are subroutines β you invoke them with the call statement, that's just the rule π
Also: all MPI objects (like MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. no exceptions, that's the whole vibe.
β¨ ERRORS β¨
If an error pops off in an MPI function, the current MPI error handler gets called to deal with it. By default, that error handler aborts the MPI job β like, full dramatic exit, no takebacks π. You can change the error handler with MPI_Errhandler_set; the predefined error handler MPI_ERRORS_RETURN can be used to make error values get returned instead (works in C and Fortran; this handler is less useful with the C++ MPI bindings, lowkey). If you're in C++ and you actually need to recover the error value, use the predefined error handler MPI::ERRORS_THROW_EXCEPTIONS. And heads up β MPI does not guarantee that an MPI program can continue past an error. periodt.
All MPI routines (except MPI_Wtime and MPI_Wtick) return an error value; in C routines it's the value of the function, and in Fortran routines it's in the last argument. The C++ bindings for MPI do not return error values β instead, error values are communicated by throwing exceptions of type MPI::Exception (but not by default). Exceptions are only thrown if the error value is not MPI::SUCCESS.
Warning, bestie: note that if the MPI::ERRORS_RETURN handler is set in C++, while MPI functions will return upon an error, there will be no way to recover what the actual error value was. it's giving trap. π
Here's the error roster:
MPI_SUCCESSβ no error; the MPI routine completed successfully, we love that for us β¨MPI_ERR_TYPEβ invalid datatype argument. It may be an uncommittedMPI_Datatype(go look atMPI_Type_commit).MPI_ERR_OTHERβ other error; useMPI_Error_stringto get more info about this error code.MPI_ERR_INTERNβ an internal error has been detected. This is fatal. Please send a bug report to the LAM mailing list (seehttp://www.lam-mpi.org/contact.php). π
β¨ SEE ALSO β¨
β¨ MORE INFORMATION β¨
If you want more, please go see the official MPI Forum web site β it's got the text of both the MPI-1 and MPI-2 standards. Those documents contain detailed info about each MPI function (most of which is not duplicated in these man pages, iykyk π).
β¨ LOCATION β¨
tresize.c
and that's the whole page, bestie!! mwah π this was LAM/MPI 7.1.4, dated 6/24/2006 β vintage but iconic, fr fr πβ¨π¦
π¦ where this page comes from
- debian bookworm: lam4-dev 7.1.4-7+b1
- debian trixie: lam4-dev 7.1.4-7.2
- ubuntu jammy: lam4-dev 7.1.4-7
- ubuntu noble: lam4-dev 7.1.4-7.1build2
- ubuntu questing: lam4-dev 7.1.4-8
- ubuntu resolute: lam4-dev 7.1.4-8build1
- ubuntu stonking: lam4-dev 7.1.4-8build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms