Collectives, as the name suggests, is a communication method wherein all the processors in a communicator are involved. Collectives help us achieve these tasks. Two collective methods that are primarily used for this are as follows:
- MPI_BCAST: This distributes data from one (root) process to another processor in a communicator
- MPI_REDUCE: This combines data from all the processors within a communicator and returns it to the root process
Now that we understand collectives, we have come to the end of this chapter and ultimately the end of this book. Now, it's time to see what we have learned!