MPIO_Wait(3)
β¨ MPIO_Wait β the "bestie are we done yet??" of MPI calls β¨
okay so real talk: this is MPIO_Wait, a lil function from the MPI-2 manual, section 3 (the library calls, iykyk). and it does exactly one iconic thing β it waits for the completion of a nonblocking read or write. that's it. that's the whole job. queen behavior honestly π
like, you kicked off a nonblocking read or write, it's out there vibing doing its thing in the background, and now you're like "hey. are we done. i need to know." that's this function. it's the friend who texts back "ok done β " so you can finally move on with your life.
π SYNOPSIS
#include "mpi.h"
int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
she takes two things and returns an int, periodt. π
πΈ INPUT PARAMETERS
requestβ the request object (a handle). this is the little ticket you got when you started your nonblocking read/write, and you're handing it back like "hey bestie, remember this? is it finished?"
π OUTPUT PARAMETERS
statusβ the status object (Status). after the wait is over, this gets filled in with the deets about what actually happened. your lil receipt. π§Ύ
π¦ NOTES FOR FORTRAN
okay so if you're in Fortran land, listen up, because there's one rule that applies to basically everything:
- All MPI routines in Fortran (except for
MPI_WTIMEandMPI_WTICK) have an additional argumentierrat the end of the argument list. yes, all of them. those two are the exception, everyone else gets the extra lil guy tacked on the end. ierris anintegerand it means the exact same thing as the return value of the routine in C. so like, same energy, different language.- In Fortran, MPI routines are subroutines and you invoke them with the
callstatement. so it'scallo'clock, not function o'clock.
and one more thing that trips people up:
- All MPI objects (e.g.,
MPI_Datatype,MPI_Comm,MPI_File) are of typeINTEGERin Fortran. no custom types, no structs, just good ol'INTEGER. simple. clean. slay. π
fr fr do not forget the ierr argument, it's giving "why is my code broken" every single time someone forgets it π
anyway that's the whole page!! this was written way back on 2/5/1998 (yes, before most of us were born, she's vintage and thriving π) and it comes from the MPIO_Wait(3) page in the MPI-2 manual. hope your nonblocking ops complete fast and your status is always what you wanted. bye bestie, go finish your I/O π«Άβ
π¦ where this page comes from
- debian bookworm: lam-mpidoc 7.1.4-7
- debian trixie: lam-mpidoc 7.1.4-7.2
- ubuntu jammy: lam-mpidoc 7.1.4-7
- ubuntu noble: lam-mpidoc 7.1.4-7.1build2
- ubuntu questing: lam-mpidoc 7.1.4-8
- ubuntu resolute: lam-mpidoc 7.1.4-8build1
- ubuntu stonking: lam-mpidoc 7.1.4-8build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms