Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture materials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
generic software skills
lecture materials
Commits
1c3e3a13
Commit
1c3e3a13
authored
10 months ago
by
Georgiana Mania
Browse files
Options
Downloads
Patches
Plain Diff
add collectives slide
parent
ce2b537b
No related branches found
No related tags found
1 merge request
!72
Draft: Compute devices lecture
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lectures/hardware/slides.qmd
+31
-8
31 additions, 8 deletions
lectures/hardware/slides.qmd
with
31 additions
and
8 deletions
lectures/hardware/slides.qmd
+
31
−
8
View file @
1c3e3a13
...
...
@@ -37,14 +37,37 @@ If we want to scale beyond one node, what do we need in our example?
* Often used for boundary exchange
* A lot of the details are beyond the scope of this lecture.
## Collectives
* Acts collectively on all ranks.
* Can do:
* Broadcast
* Gather
* Scatter
* Reductions
* All-to-all (why is all-to-all a bad idea for boundary exchange?)
## Collectives
* Collective communication that involves a group of processes (ranks)
* Examples: broadcast, gather, scatter, reduction ...
* All-to-all is a bad idea for boundary exchange
* Read more on [mpi-forum.org](https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node64.html)
## Collectives - Aggregate results
```C++
int MPI_Reduce(void* sendbuf, void* recvbuf, int count,
MPI_Datatype datatype,
MPI_Op op, // MPI_SUM, MPI_MAX, ...
int root,
MPI_Comm comm)
```
<br>
:::fragment
{.nostretch fig-align="center" width="70%"}
:::{.info .smaller}
MPI_MAX for 4 ranks and count=2
:::
:::
## Hands-on Session! {background-color=var(--dark-bg-color) .leftalign}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment