MPI_COMM_SET_INFO(3)
π MPI_COMM_SET_INFO(3) π
okay bestie, so this whole page is the Open MPI manual page MPI_COMM_SET_INFO(3), and it's all about setting communicator info hints. one routine, a whole pile of assumptions you can unlock. let's get into it π«Ά
β¨ SYNTAX β¨
here's how you actually call her, in all three flavours:
πΈ C Syntax
#include <mpi.h>
int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info)
πΈ Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_COMM_SET_INFO(COMM, INFO, IERROR)
INTEGER COMM, INFO, IERROR
πΈ Fortran 2008 Syntax
USE mpi_f08
MPI_Comm_set_info(comm, info, ierror)
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Info), INTENT(IN) :: info
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π INPUT PARAMETERS π
- comm β the communicator on which we're setting the info hints π
- info β the Info object holding the hints that are gonna be set on
commβ¨
π OUTPUT PARAMETERS π
- ierror β Fortran only: the error status, as an integer. she's just a number, no drama π
π DESCRIPTION π
MPI_Comm_set_info sets new values for the hints of the communicator associated with comm. and listen β MPI_Comm_set_info is a collective routine, so everybody's in this together. the info object may be different on each process, but any info entries that an implementation requires to be the same on all processes must appear with the same value in each process's info object. no sneaky mismatches bestie π
these are the info key assertions that Open MPI may accept:
mpi_assert_no_any_tag(boolean) β set it to true and the implementation may assume that the process will not use theMPI_ANY_TAGwildcard on the given communicator. bye wildcard πmpi_assert_no_any_source(boolean) β set it to true and the implementation may assume the process will not use theMPI_ANY_SOURCEwildcard on the given communicator. ok specific queen πmpi_assert_exact_length(boolean) β set it to true and the implementation may assume that the lengths of messages received by the process are equal to the lengths of the corresponding receive buffers, for point-to-point communication operations on the given communicator. exact-match energy, love that πΈmpi_assert_allow_overtaking(boolean) β set it to true and the implementation may assume that point-to-point communications on the given communicator do not rely on the non-overtaking rule specified in MPI-3.1 Section 3.5. in other words, the application is asserting that send operations are not required to be matched at the receiver in the order in which the send operations were performed by the sender, and receive operations are not required to be matched in the order in which they were performed by the receiver. she does not queue in order and that is the whole point π₯
π ERRORS π
Almost all MPI routines return an error value; C routines hand it back as the return result of the function, and Fortran routines put it in the last argument. so it's always somewhere, ok?
Before the error value is returned, the current MPI error handler associated with the communication object (like a communicator, window, or file) gets called. If no communication object is associated with the MPI call, then the call is considered attached to MPI_COMM_SELF and will call the associated MPI error handler. And when MPI_COMM_SELF is not initialized β like 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. 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 an info key to MPI_Comm_spawn/MPI_Comm_spawn_multiple. and 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. periodt.
Open MPI includes three predefined error handlers you can use:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. πMPI_ERRORS_ABORTβ an error handler that can be invoked on a communicator, window, file, or session. When called on a communicator, it acts as ifMPI_Abortwas called on that communicator. If 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. If called on a session, it aborts only the local process.MPI_ERRORS_RETURNβ returns an error code to the application. simple, polite, iconic π
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. big deal, pls keep that in mind fr fr π
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_Comm_get_infoMPI_Info_createMPI_Info_setMPI_Info_free
π Copyright π
2003-2026, The Open MPI Community
okay that's the whole page, you made it π«Ά this was the Open MPI MPI_COMM_SET_INFO(3) page, dated Sep 10, 2026, brought to you by the Open MPI crew β now go set those hints and slay π
β¨π¦
π¦ where this page comes from
- ubuntu stonking: openmpi-doc 5.0.10-6 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms