diff --git a/slides/images/MPI-predefined-ops.png b/slides/images/MPI-predefined-ops.png new file mode 100644 index 0000000000000000000000000000000000000000..56bcfe8d8592812a075dc93981549eac51d8a5f1 Binary files /dev/null and b/slides/images/MPI-predefined-ops.png differ diff --git a/slides/pages/recap.md b/slides/pages/recap.md index 44829819a674a4b241685149f78857f98db8ca33..2c80ffb8f682f3d5f479054f7ff27b35ba250269 100644 --- a/slides/pages/recap.md +++ b/slides/pages/recap.md @@ -340,7 +340,7 @@ layout: center ## MPI Collective Communication - MPI collective operations involve all ranks in a given communicator at the same time. -- All ranks must make the same MPI call for the operation to succeed. +- **All ranks must make the same MPI call for the operation to succeed.** - Some collective operations are globally synchronous. --- @@ -478,3 +478,53 @@ MPI_Reduce (void *sendbuf, void *recvbuf, int count, - **All predefined operations are associative and commutative** - **Beware of non-commutative effects on floats** +--- +title: Global Reduction +--- + +## Global Reduction + +Some predefined operations for reduction: + +<div class="container flex justify-center mt-5"> + <img src="/images/MPI-predefined-ops.png" class="block w-lg"/> +</div> + +### Notes + +- You can create your own reduction operations (not covered here) + +--- +title: Global Reduction +--- + +## Global Reduction + +Perform an arithmetic reduction and broadcast the result: + +```c +MPI_Allreduce (void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) +``` + +### Notes + +- every rank receives the result of the reduction operation +- equivalent to **MPI_Reduce + MPI_Bcast** with the same root +- also beware of non-commutative effects + +--- +title: MPI Extensions +--- + +## MPI Extensions + +E.g. **MPI 2**, **MPI 3**, **MPI 4** ... (**MPI 5 is in the making**) + +Starting with MPI 2, the MPI standard has been extended with additional functionality: + +- Dynamic process management +- File I/O +- Shared memory + +See live demo.