MPI_STATUS_SET_CANCELLED(3)
π MPI_STATUS_SET_CANCELLED(3) β the Open MPI glow-up
okay bestie, welcome to the MPI_STATUS_SET_CANCELLED page β¨ this is an Open MPI manpage and honestly? it's a little niche but we're gonna get through it together π«Ά
πΈ NAME πΈ
MPI_Status_set_cancelled β sets a status so it says "yeah, that request got canceled" π
β¨ SYNTAX β¨
π C Syntax
#include <mpi.h>
int MPI_Status_set_cancelled(MPI_Status *status, int flag)
π Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_STATUS_SET_CANCELLED(STATUS, FLAG, IERROR)
INTEGER STATUS(MPI_STATUS_SIZE), IERROR
LOGICAL FLAG
π Fortran 2008 Syntax
USE mpi_f08
MPI_Status_set_cancelled(status, flag, ierror)
TYPE(MPI_Status), INTENT(INOUT) :: status
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π¦ INPUT/OUTPUT PARAMETER π¦
statusβ the status where we're attaching this cancel flag, bestie (it's the status one, yeah). π₯
π INPUT PARAMETER π
flagβ if it's true, that means the request was canceled, periodt (it's a logical). π
π OUTPUT PARAMETER π
ierrorβ Fortran only: the error status, as an integer. π§
π DESCRIPTION π
so here's the tea: if flag is set to true, then a later call to MPI_Test_cancelled(status, flag*) will also hand you back flag = true. otherwise it's gonna return false. that's it, that's the whole vibe. β
π NOTES π
lowkey important, don't skip this one π
users are advised not to reuse the status fields for values other than the ones they were actually intended for. like, not me watching you repurpose a status field π doing that may lead to unexpected results when you're using the status object. for example, calling MPI_Get_elements may cause an error if the value is out of range β or it may be straight up impossible to detect that kind of error π
the extra_state argument that comes with a generalized request is the move if you need to return info that doesn't logically belong in status. and also?? modifying the values in a status that MPI set internally, like from MPI_Recv, may lead to unpredictable results and is strongly discouraged. like please don't, i'm begging π«Ά
π ERRORS π
almost all MPI routines return an error value, bestie β C routines give it back as the return result of the function, and Fortran routines put it in the last argument. iykyk.
before that error value comes back, the current MPI error handler associated with the communication object (think: communicator, window, 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. when MPI_COMM_SELF isn't initialized (i.e., 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. and you can change 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 the info key to MPI_Comm_spawn/MPI_Comm_spawn_multiple. if no other appropriate error handler has been set, then the MPI_ERRORS_RETURN error handler is called for MPI I/O functions and the MPI_ERRORS_ABORT error handler is called for all other MPI functions.
Open MPI includes three predefined error handlers you can use, and they are:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. yeah. all of them. π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 ifMPI_Abortwas called on that communicator. if it's 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 it's called on a session, it aborts only the local process. β¨MPI_ERRORS_RETURNβ returns an error code to the application. the chill one. π«Ά
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_errhandleror atMPI_Session_initMPI_Win_create_errhandlerthenMPI_Win_set_errhandler
note that MPI does not guarantee that an MPI program can continue past an error. so likeβ¦ don't count on it, bestie π
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. β
π COPYRIGHT π
2003-2026, The Open MPI Community β iconic of them, honestly π
and that's the whole page!! okay so this was MPI_STATUS_SET_CANCELLED(3) from the Open MPI girlies, dated Sep 11, 2026, copyright 2003-2026, The Open MPI Community β go forth and set those cancelled flags correctly, bestie πβ¨ππ¦
π¦ where this page comes from
- arch rolling: openmpi 5.0.11-1 Β· BSD-3-Clause AND LicenseRef-MPICH
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms