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 of comm (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 to true, the user promises that MPI_ANY_TAG will 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 to true, the user promises that MPI_ANY_SOURCE will 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 to true, 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 to true, 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 to true, 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 in MPI_Comm_rank) 😭 we've all been there
  • MPI_ERR_INFO β€” invalid Info πŸ’”
  • MPI_ERR_OTHER β€” other error; use MPI_Error_string to 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