MPI_PREADY(3)

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

πŸ’– NAME πŸ’–

MPI_Pready β€” Indicates that a given send-side partition is ready to be transferred.

So like, bestie, when you're doing partitioned sends and one chunk of your message is finally packed and ready to go, this is the little routine you call to announce it. Slay. That's the whole vibe.


✨ SYNTAX ✨

🌸 C Syntax

#include <mpi.h>

int MPI_Pready(int partition, MPI_Request request)

πŸŽ€ Fortran Syntax

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

πŸ¦‹ Fortran 2008 Syntax

USE mpi_f08
MPI_Pready(partition, request, ierror)
     INTEGER, INTENT(IN) :: partition
     TYPE(MPI_Request), INTENT(IN) :: request
     INTEGER, OPTIONAL, INTENT(OUT) :: ierror

🎁 INPUT PARAMETERS 🎁

  • partition β€” the number of the partition you're marking as ready for transfer (an integer, no cap 🧒).
  • request β€” the communication request (a handle).

πŸ‘‘ OUTPUT PARAMETERS πŸ‘‘

  • ierror β€” Fortran only: the error status (an integer).

πŸ’€ ERRORS πŸ’€

Okay so, lowkey, almost every MPI routine hands you back an error value. In C it comes back as the return value of the function, and in Fortran it lands in the last argument. iykyk.

Before that error value actually gets returned, the current MPI error handler that's associated with the communication object (think: communicator, window, file) gets called. And if there's no communication object tied to the MPI call at all? Then the call is considered attached to MPI_COMM_SELF and it'll call the error handler associated with that. When MPI_COMM_SELF isn't initialized β€” meaning before MPI_Init <#mpi-init>/MPI_Init_thread <#mpi-init-thread>, after MPI_Finalize <#mpi-finalize>, or when you're using the Sessions Model exclusively β€” the error raises the initial error handler instead. The initial error handler can be swapped out by calling MPI_Comm_set_errhandler <#mpi-comm-set-errhandler> on MPI_COMM_SELF when you're using the World model, or via the mpi_initial_errhandler CLI argument to mpiexec, or the info key for MPI_Comm_spawn <#mpi-comm-spawn>/MPI_Comm_spawn_multiple <#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 while MPI_ERRORS_ABORT gets called for every other MPI function.

Open MPI ships three predefined error handlers you can use:

  • MPI_ERRORS_ARE_FATAL β€” makes the program abort all connected MPI processes. dramatic but effective πŸ’€
  • MPI_ERRORS_ABORT β€” an error handler that can be invoked on a communicator, window, file, or session. When you call it on a communicator, it acts as if MPI_Abort <#mpi-abort> was called on that communicator. If you call it on a window or a file, it acts as if MPI_Abort <#mpi-abort> was called on a communicator containing the group of processes in the corresponding window or file. And if you call it on a session, it aborts only the local process.
  • MPI_ERRORS_RETURN β€” returns an error code to the application.

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

  • MPI_Comm_create_errhandler <#mpi-comm-create-errhandler> and then MPI_Comm_set_errhandler <#mpi-comm-set-errhandler>
  • MPI_File_create_errhandler <#mpi-file-create-errhandler> and then MPI_File_set_errhandler <#mpi-file-set-errhandler>
  • MPI_Session_create_errhandler <#mpi-session-create-errhandler> and then MPI_Session_set_errhandler <#mpi-session-set-errhandler>, or at MPI_Session_init <#mpi-session-init>
  • MPI_Win_create_errhandler <#mpi-win-create-errhandler> and then MPI_Win_set_errhandler <#mpi-win-set-errhandler>
⚠️ Heads up bestie: MPI does not guarantee that an MPI program can keep going past an error. Like, at all. No promises, periodt.

See the MPI man page <#open-mpi> for a full list of MPI error codes <#open-mpi-errors>.

See the Error Handling section of the MPI-3.1 standard for more information.

See also:

  • MPI_Pready_list <#mpi-pready-list>
  • MPI_Pready_range <#mpi-pready-range>
  • MPI_Parrived <#mpi-parrived>

2003-2026, The Open MPI Community


okay that's the whole page, you ate that πŸ’… this little legend is brought to you by the Open MPI girlies β€” 2003-2026, The Open MPI Community, dated Sep 10, 2026, and filed away under MPI_PREADY(3). go forth and mark your partitions ready, queen πŸ‘‘πŸ¦‹βœ¨

πŸ“¦ where this page comes from