Skip to content
Snippets Groups Projects
Commit c1b5d756 authored by Chao Zhan's avatar Chao Zhan
Browse files

update

parent dbbf645f
No related branches found
No related tags found
No related merge requests found
slides/images/MPI-predefined-ops.png

86 KiB

...@@ -340,7 +340,7 @@ layout: center ...@@ -340,7 +340,7 @@ layout: center
## MPI Collective Communication ## MPI Collective Communication
- MPI collective operations involve all ranks in a given communicator at the same time. - 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. - Some collective operations are globally synchronous.
--- ---
...@@ -478,3 +478,53 @@ MPI_Reduce (void *sendbuf, void *recvbuf, int count, ...@@ -478,3 +478,53 @@ MPI_Reduce (void *sendbuf, void *recvbuf, int count,
- **All predefined operations are associative and commutative** - **All predefined operations are associative and commutative**
- **Beware of non-commutative effects on floats** - **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.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment