MPI_PARRIVED(3)

πŸ“¦
version 5.0.10 Β· 4 versions
, in ubuntu stonking

🌸 MPI_PARRIVED 🌸

okay bestie, we're looking at MPI_Parrived from the Open MPI manual, section 3 πŸ’… it's the lil function that checks whether one specific receive-side partition is done yet β€” like peeking into the group chat to see if everyone replied, without committing to reading the whole thread 🫢


✨ NAME ✨

MPI_Parrived β€” tests for completion of a specified receive-side partition πŸ”

no cap, that's literally it. one partition, one vibe check. πŸ’–


πŸ“œ SYNTAX πŸ“œ

🩷 C Syntax

#include <mpi.h>

int MPI_Parrived(MPI_Request request, int partition, int *flag)

🧑 Fortran Syntax

USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_PARRIVED(REQUEST, PARTITION, FLAG IERROR)
     INTEGER REQUEST, PARTITION, FLAG(*), IERROR

πŸ’œ Fortran 2008 Syntax

USE mpi_f08
MPI_Parrived(request, partition, flag, ierror)
     TYPE(MPI_Request), INTENT(in) :: request
        INTEGER, INTENT(IN) :: partition
        INTEGER, INTENT(out) :: flag
     INTEGER, OPTIONAL, INTENT(OUT) :: ierror
yes the modern Fortran 2008 form is giving typed and tidy, we love to see it 😌

πŸ“₯ INPUT PARAMETERS πŸ“₯

  • request β€” the communication request, aka the handle. it's the little ticket that says "hey, this operation exists" 🎫 (handle)
  • partition β€” the number of the partition you wanna test for completion. like picking which shelf in the library, bestie πŸ—‚οΈ (integer)

πŸ“€ OUTPUT PARAMETERS πŸ“€

  • flag β€” true if the partition is completed βœ… slay. if it's not done yet, it'll just say so, no drama.
  • ierror β€” Fortran only: error status 🚨 (integer)

πŸ’€ ERRORS πŸ’€

okay so, listen. almost every MPI routine hands you back an error value. in C it's the return value of the function, and in Fortran it comes back in that last argument. either way, you're getting receipts 🧾

But before that error value even gets returned, the current MPI error handler that's attached to the communication object (think: communicator, window, file β€” you know the girlies) gets called first. πŸ“ž

And if no communication object is associated with the MPI call? then the call is considered attached to MPI_COMM_SELF, and it'll call that associated MPI error handler instead. when MPI_COMM_SELF isn't initialized yet β€” 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. 😭

That initial error handler can be swapped by:

  • calling MPI_Comm_set_errhandler on MPI_COMM_SELF when you're using the World model, or
  • the mpi_initial_errhandler CLI argument to mpiexec, or
  • 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. that's just how it is, fr fr.

Open MPI ships with three predefined error handlers you can use πŸ‘‘

  • MPI_ERRORS_ARE_FATAL β€” causes the program to abort all connected MPI processes. it's giving nuclear option πŸ’€
  • MPI_ERRORS_ABORT β€” an error handler that can be invoked on a communicator, window, file, or session. when it's called on a communicator, it acts as if MPI_Abort was called on that communicator. if it's called on a window or file, it acts as if MPI_Abort was called on a communicator containing the group of processes in the corresponding window or file. if it's called on a session, it aborts only the local process. πŸ“
  • MPI_ERRORS_RETURN β€” returns an error code to the application. polite, respectful, we stan 🫢

MPI applications can also implement their own error handlers by calling:

  • MPI_Comm_create_errhandler then MPI_Comm_set_errhandler
  • MPI_File_create_errhandler then MPI_File_set_errhandler
  • MPI_Session_create_errhandler then MPI_Session_set_errhandler or at MPI_Session_init
  • MPI_Win_create_errhandler then MPI_Win_set_errhandler
⚠️ big important note: MPI does not guarantee that an MPI program can continue past an error. like, no promises, bestie. proceed accordingly. 😭

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. πŸŽ€

See also:

  • MPI_Pready_list
  • MPI_Pready_range
  • MPI_Parrived

2003-2026, The Open MPI Community


and that's the whole page, bestie!! πŸ’– this was the Open MPI MPI_PARRIVED(3) man page, dated Sep 10, 2026 β€” go forth and check your partitions, icon βœ¨πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from