icetCreateMPICommunicator(3)

πŸ’– icetCreateMPICommunicator(3) β€” IceT Reference πŸŽ€

okay bestie, gather round, because today we're talking about icetCreateMPICommunicator from the IceT Reference manual (section 3, the library-calls girlies πŸ’…). This is the one that takes your MPI communicator and ✨glow-up-transforms✨ it into an IceT communicator. No cap.


🌸 NAME 🌸

icetCreateMPICommunicator β€” Converts an MPI communicator to an IceT communicator. literally that's the whole job description and she does it flawlessly 🫢


✨ Synopsis ✨

#include <IceTMPI.h>

IceTCommunicator icetCreateMPICommunicator(
                                 MPI_Comm  mpi_comm  );

πŸ¦‹ Description πŸ¦‹

so, IceT requires a communicator to do its thing correctly β€” no communicator, no functioning, periodt. An application is totally free to build its own communicator from scratch if it wants to be that girl, but honestly? most people are just gonna use MPI, because MPI is a well established parallel communication tool and it's been carrying the parallel-computing community on its back since forever πŸ‘‘

so that's why IceT ships with an implementation of IceTCommunicator that uses the MPI communication layer underneath. it's giving "we already built the thing you needed." iconic.

icetCreateMPICommunicator is what you call to create an IceTCommunicator that uses the mpi_comm MPI communication object. and here's the cute part: the resulting IceTCommunicator shares the same process group and the same process rank as the original MPI_Comm communicator. matching energy fr fr πŸͺ©

now, mpi_comm gets duplicated, and that has two consequences. buckle up:

  • First: all processes in mpi_comm's group may need to call icetCreateMPICommunicator in order for any of them to proceed β€” this depends on your MPI implementation, so don't come for me, that's just how it is.
  • Second: mpi_comm and the resulting IceTCommunicator are decoupled from each other. communications in one cannot affect the other. also, one communicator may be destroyed without affecting the other. they're independent queens, living their separate lives πŸ’…

πŸŽ€ Return Value πŸŽ€

you get back an IceTCommunicator with the same process group and rank as mpi_comm. and when you're done with her? you can destroy it with a call to icetDestroyMPICommunicator. closure is healthy bestie 🌈


πŸ“ Errors πŸ“

None. zero. nothing. she simply does not miss. πŸ’€βœ¨


🧚 Warnings 🧚

None. no red flags here, we love a low-drama function 🫢


πŸ’€ Bugs πŸ’€

All MPI errors are ignored. yeah. she's not listening. πŸ™ˆ that's the bug, that's the tea, no further comment.


Copyright (C)2003 Sandia Corporation

Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This source code is released under the New BSD License. slay, legally speaking ⭐


πŸ’œ See Also πŸ’œ

iykyk πŸ‘€ go read those next, bestie, they're part of the same friend group.


IceT Reference 🌸 August 9, 2010 🌸 and that's the whole page, mwah, go forth and communicate πŸ’–βœ¨πŸŽ€πŸ¦‹