MPI_Comm_idup_with_info(3)
π MPI_Comm_idup_with_info(3) β the MPI manual, but make it cute π
okay bestie, welcome to the MPI manual page for MPI_Comm_idup_with_info(3) β¨ this is the nonblocking communicator duplication girlie. she dups your communicator but does it nonblocking, so you can go live your life while the runtime does its thing π¦
πΈ NAME πΈ
MPI_Comm_idup_with_info β nonblocking communicator duplication π
β¨ SYNOPSIS β¨
int MPI_Comm_idup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm *newcomm,
MPI_Request *request)
that's the whole signature, no cap. four arguments, one int coming back at ya π«Ά
π INPUT PARAMETERS π
commβ the communicator, a handle. your source material, your blueprint πinfoβ an info object, a handle. this is where the hints live, iykyk
π¦ OUTPUT PARAMETERS π¦
newcommβ a copy ofcomm(handle). the new girl, fully duplicated, main character energy πrequestβ communication request (handle). your little tracker for the nonblocking op, so you can check on her later π₯
π INFO HINTS π
these are the hints you can stuff into that info object. every single one is a boolean and every single one defaults to false. and listen β they're promises, bestie. you're promising the implementation stuff about your program. don't lie to her π
mpi_assert_no_any_tagβ boolean, default =false. if you set it totrue, the user promises thatMPI_ANY_TAGwill not be used with the communicator. this potentially allows MPICH to treat messages with different tags independent and seek to improve performance, e.g. by employ multiple network context β¨mpi_assert_no_any_sourceβ boolean, default =false. if you set it totrue, the user promises thatMPI_ANY_SOURCEwill not be used with the communicator. this potentially allows MPICH to treat messages send to different ranks or receive from different ranks independent and seek to improve performance, e.g. by employ multiple network context β¨mpi_assert_exact_lengthβ boolean, default =false. if you set it totrue, the user promises that the lengths of messages received by the process will always equal to the size of the corresponding receive buffers πmpi_assert_allow_overtakingβ boolean, default =false. if you set it totrue, the user asserts 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 receivers πmpi_assert_strict_persistent_collective_orderingβ boolean, default =false. if you set it totrue, then the implementation may assume that all the persistent collective operations are started in the same order across all MPI processes in the group of the communicator. it is required that if this assertion is made on one member of the communicator s group, then it must be made on all members of that communicator s group with the same value. this one is a group project β everybody in the communicator has to agree, or it's not valid π
ngl bestie, that last one is giving "collective agreement or chaos." don't be the one rank who didn't read the group chat π
π§ THREAD AND INTERRUPT SAFETY π§
this routine is thread-safe π that means this routine may be safely used by multiple threads without the need for any user-provided thread locks. periodt.
however β the routine is not interrupt safe. typically, this is due to the use of memory allocation routines such as malloc or other non-MPICH runtime routines that are themselves not interrupt-safe π¬ so don't come for her about interrupts, she warned you.
π NOTES FOR FORTRAN π
all MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK) have an additional argument ierr at the end of the argument list. ierr is an integer and has the same meaning as the return value of the routine in C. in Fortran, MPI routines are subroutines, and are invoked with the call statement π«Ά
all MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. yes, even the fancy ones. iconic behavior honestly β¨
π ERRORS π
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. before the value is returned, the current MPI error handler is called. by default, this error handler aborts the MPI job π¨ (yes, fr fr, whole job). the error handler may be changed with MPI_Comm_set_errhandler (for communicators), MPI_File_set_errhandler (for files), and MPI_Win_set_errhandler (for RMA windows). the MPI-1 routine MPI_Errhandler_set may be used but its use is deprecated π΅ (we don't do that anymore). the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. note that MPI does not guarantee that an MPI program can continue past an error; however, MPI implementations will attempt to continue whenever possible π₯²
the error codes themselves, glow-up edition:
MPI_SUCCESSβ no error; MPI routine completed successfully. slay πMPI_ERR_ARGβ invalid argument. some argument is invalid and is not identified by a specific error class (e.g.,MPI_ERR_RANK) π€MPI_ERR_COMMβ invalid communicator. a common error is to use a null communicator in a call (not even allowed inMPI_Comm_rank) π we've all been thereMPI_ERR_INFOβ invalid Info πMPI_ERR_OTHERβ other error; useMPI_Error_stringto get more information about this error code. the mysterious one, the enigma π«οΈ
bet bestie, don't forget: MPI_Comm_idup_with_info is the nonblocking dup. if you wanted to block, that's a different page, and she's not this one π
π SEE ALSO π
no SEE ALSO section in this one bestie, she stands on her own π
and that's the whole page, you're so welcome π₯° this sweet thing came out of the MPI manual, dated 4/10/2026, and it's still called MPI_Comm_idup_with_info(3) in case you need to cite her. go dup something nonblockingly, you absolute icon ππβ¨
π¦ where this page comes from
- nixos 26.05: mpich 5.0.1
- ubuntu stonking: mpich-doc 5.0.1-9 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms