MPIL_Signal(3)
π MPIL_Signal(3) β the LAM/MPI tea π
okay bestie, this one lives in the LAM/MPI manual, section 3. It's giving "niche but iconic" β¨
πΈ NAME πΈ
MPIL_Signal β the LAM/MPI-specific function that sends a LAM signal to a rank inside an MPI communicator π
π SYNOPSIS π
#include <mpi.h>
int MPIL_Signal(MPI_Comm comm, int rank, int signo)
π¦ INPUT PARAMETERS π¦
commβ the MPI communicator, aka the handle πrankβ which rank we're sending it to π―signoβ the signal number, periodt π’
β¨ NOTES β¨
so here's the vibe: MPIL_Signal() delivers an asynchronous signal from one process to another, no cap π«Ά
the target process gets picked with a communicator plus a process rank inside that communicator. the last argument, signo, says which signal is getting delivered. and listen β these signals are completely apart from the signals your underlying operating system gives you. totally different species, bestie π
the LAM signals, which are defined in <lam_ksignal.h>, are listed below π
LAM_SIGTRACE1 β unload trace data π§LAM_SIGC2 β user defined πLAM_SIGARECV3 β async receive pending πLAM_SIGUDIE4 β terminate πLAM_SIGARREST5 β suspend execution βLAM_SIGRELEASE6 β continue execution βΆοΈLAM_SIGA7 β user defined βLAM_SIGB8 β user defined πΈLAM_SIGFUSE9 β node about to die πLAM_SIGSHRINK10 β another node has died πͺ¦
real talk: this is a LAM/MPI-specific function. most users should not have use for this function π
if you do use this function, it should be used in conjunction with the LAM_MPI C preprocessor macro, like:
#if LAM_MPI
MPIL_Signal(MPI_COMM_WORLD, 0, LAM_SIGUDIE);
#endif
π NOTES FOR FORTRAN π
every MPI routine in Fortran (except for MPI_WTIME and MPI_WTICK ) has an extra argument ierr tacked onto the end of the argument list. ierr is an integer and it means the same thing as the return value of the routine in C π«Ά
in Fortran, MPI routines are subroutines, and they get invoked with the call statement. that's just how Fortran does π
and all MPI objects (e.g., MPI_Datatype , MPI_Comm ) are of type INTEGER in Fortran π
π ERRORS π
if an error happens in an MPI function, the current MPI error handler gets called to handle it. by default, this error handler aborts the MPI job β like, it's over, no take-backs π
the error handler can be changed with MPI_Errhandler_set ; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned (in C and Fortran; heads up, this error handler is less useful with the C++ MPI bindings. the predefined error handler MPI::ERRORS_THROW_EXCEPTIONS should be used in C++ if the error value needs to be recovered). and note that MPI does not guarantee that an MPI program can continue past an error π«
all MPI routines (except MPI_Wtime and MPI_Wtick ) return an error value; C routines as the value of the function and Fortran routines in the last argument. the C++ bindings for MPI do not return error values; instead, error values are communicated by throwing exceptions of type MPI::Exception (but not by default). exceptions are only thrown if the error value is not MPI::SUCCESS β¨
note that if the MPI::ERRORS_RETURN handler is set in C++, while MPI functions will return upon an error, there will be no way to recover what the actual error value was π¬
MPI_SUCCESSβ no error; MPI routine completed successfully π₯³MPI_ERR_COMMβ invalid communicator. a common error is to use a null communicator in a call (not even allowed inMPI_Comm_rank) πMPI_ERR_RANKβ invalid source or destination rank. ranks must be between zero and the size of the communicator minus one; ranks in a receive (MPI_Recv,MPI_Irecv,MPI_Sendrecv, etc.) may also beMPI_ANY_SOURCEπ―MPI_ERR_OTHERβ other error; useMPI_Error_stringto get more information about this error code π
π SEE ALSO π
lam_ksignal
π LOCATION π
mpil_signal.c
and that's the whole page, bestie π«Ά it came from LAM/MPI 7.1.4, dated 6/24/2006 β vintage but still slaying πβ¨π
π¦ 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