MPIO_Test(3)

πŸ’– MPIO_Test β€” from the MPI-2 manual, bestie edition πŸ’–

okay so. this is MPIO_Test(3) and it is literally the girl who checks if your nonblocking read or write is done yet. she doesn't wait around (that's her sister's job), she just peeks. and honestly? iconic behaviour.


✨ NAME ✨

MPIO_Test β€” test the completion of a nonblocking read or write. that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

#include "mpi.h"
int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status)

like, that's the signature, copy it exactly bestie, do not freestyle. πŸ’…


πŸŽ€ INPUT PARAMETERS πŸŽ€

  • request β€” the request object (handle). this is your little ticket to the operation that's out there doing its thing. 🎟️

πŸ’œ OUTPUT PARAMETERS πŸ’œ

  • flag β€” true if the operation completed (logical). so like, did it finish? flag will tell you, fr fr. βœ…
  • status β€” status object (Status). all the deets about what went down. πŸ“‹

🧚 NOTES FOR FORTRAN 🧚

okay so if you're living that Fortran life, here's the tea. πŸ“

  • every single MPI routine in Fortran β€” with exactly two exceptions, and those exceptions are MPI_WTIME and MPI_WTICK β€” has an extra argument called ierr tacked onto the end of the argument list. not optional, she's always there. πŸ™ˆ
  • ierr is an integer, and it means the exact same thing as the return value of the routine in C. same energy, different language. πŸ’«
  • in Fortran, MPI routines are subroutines, and you invoke them with the call statement. call her by her name. πŸ“ž
  • all MPI objects (like MPI_Datatype, MPI_Comm, MPI_File) are of type INTEGER in Fortran. yes, all of them. no cap. πŸ‘‘

🌈 reminder: this page is all about testing completion, not waiting for it. don't get it twisted. πŸ’€

and that's the page, bestie!! this little slice of MPI-2 goodness is dated 2/5/1998 β€” yes, she's a vintage queen and she's still serving πŸ‘‘ β€” and it lives in the MPIO_Test(3) section of your manual. go forth and test those requests. mwah. πŸ’–βœ¨πŸŽ€