MPI_FILE_READ_ORDERED_END(3)
π MPI_FILE_READ_ORDERED_END π
okay so bestie, welcome to the man page for MPI_File_read_ordered_end π
it lives in the Open MPI family, and yeah, the title says MPI_FILE_READ_ORDERED_END(3) but we said it once and that's enough gossip for now. Sit down, hydrate, let's get into it. π«Ά
β¨ SYNTAX β¨
C Syntax
#include <mpi.h>
int MPI_File_read_ordered_end(MPI_File fh, void *buf,
MPI_Status *status)
Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_FILE_READ_ORDERED_END(FH, BUF, STATUS, IERROR)
<type> BUF(*)
INTEGER FH, STATUS(MPI_STATUS_SIZE), IERROR
Fortran 2008 Syntax
USE mpi_f08
MPI_File_read_ordered_end(fh, buf, status, ierror)
TYPE(MPI_File), INTENT(IN) :: fh
TYPE(*), DIMENSION(..), ASYNCHRONOUS :: buf
TYPE(MPI_Status) :: status
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π INPUT/OUTPUT PARAMETER π
fhβ the file handle, aka the little ID badge your file carries around (handle).
πΈ OUTPUT PARAMETERS πΈ
bufβ the initial address of the buffer, where the goodies land (choice).statusβ the status object, receipts for what went down (status).ierrorβ Fortran only bestie: the error status, as an integer (integer).
π¦ DESCRIPTION π¦
So MPI_File_read_ordered_end is the ending half of a split collective routine. Split collective = one routine got chopped into _begin and _end pieces, and you need the whole set, okay? π
It must be called by every single process in the communicator group that's chillin' with the file handle fh. No skipping, no lurking, no "I'll sit this one out." All of y'all. π
MPI_File_rad_ordered_end blocks until the operation that MPI_File_read_ordered_begin kicked off actually completes. (And yes, that spelling is exactly what the page says β not me, not my fault, I just report the lore. π)
It attempts to read the file associated with fh into the user's buffer buf. β¨
The shared file pointer gets updated by the amounts of data requested by all the processes of the group. And here's the part that's giving main-character energy: for each process, the location in the file where data is read is the position the shared file pointer would be at after all the processes whose ranks within the group are less than that process's rank had read their data. Rank order supremacy, periodt. π
π NOTES π
All the nonblocking collective routines for data access are "split" into two routines, each with _begin or _end as a suffix. If that sounds like a lot of rules, it is, and these split collective routines are subject to the semantic rules described in Section 9.4.5 of the MPI-2 standard. Go read it, bestie, I believe in you. π
π₯ ERRORS π₯
Almost all MPI routines return an error value β C routines hand it back as the return result of the function, and Fortran routines tuck it into the last argument. π
Before that error value comes back to you, the current MPI error handler associated with the communication object (like a communicator, window, or file) gets called. If there's no communication object associated with the MPI call, then the call counts as attached to MPI_COMM_SELF and it'll call the associated MPI error handler. And when MPI_COMM_SELF is not initialized β meaning before MPI_Init / MPI_Init_thread, after MPI_Finalize, or when you're using the Sessions Model exclusively β the error raises the initial error handler. π³
You can swap out that initial error handler by calling MPI_Comm_set_errhandler on MPI_COMM_SELF when you're using the World model, or with the mpi_initial_errhandler CLI argument to mpiexec, or with the info key to MPI_Comm_spawn / MPI_Comm_spawn_multiple. And if no other appropriate error handler has been set? Then MPI_ERRORS_RETURN gets called for MPI I/O functions, and MPI_ERRORS_ABORT gets called for all other MPI functions. No cap. π«
Open MPI ships three predefined error handlers you can use:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. Dramatic? Yes. Effective? Also yes. πMPI_ERRORS_ABORTβ an error handler that can be invoked on a communicator, window, file, or session. When called on a communicator, it acts as ifMPI_Abortwas called on that communicator. If called on a window or file, it acts as ifMPI_Abortwas called on a communicator containing the group of processes in the corresponding window or file. And if called on a session, it aborts only the local process. π―MPI_ERRORS_RETURNβ returns an error code to the application. Chill, gentle, hands you the problem and lets you deal with it. π
MPI applications can also implement their own error handlers by calling:
MPI_Comm_create_errhandlerthenMPI_Comm_set_errhandlerMPI_File_create_errhandlerthenMPI_File_set_errhandlerMPI_Session_create_errhandlerthenMPI_Session_set_errhandler, or atMPI_Session_initMPI_Win_create_errhandlerthenMPI_Win_set_errhandler
β οΈ Note that MPI does not guarantee that an MPI program can continue past an error. Like, at all. So don't be out here assuming you get a second act. π
See the MPI man page for a full list of MPI error codes.
See the Error Handling section of the MPI-3.1 standard for more information.
π a lil sign-off π
Copyright 2003-2026, The Open MPI Community π this page was living its best life on Sep 10, 2026, and the whole thing answers to the name MPI_FILE_READ_ORDERED_END(3). mwah, go read your files in order bestie, ily πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: openmpi-doc 5.0.10-6 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms