Skip to content

Commit

Permalink
Fixed an incorrect fraction in phase 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Greenburg committed Mar 4, 2024
1 parent 8ef64fd commit 56a59f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion project/phase7.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Load `gcc/latest` and `openmpi` to get access to a recent MPI compiler, and `mpl

## Division of Labor

Much as in the [previous phase](phase6.md), you'll split work roughly evenly among processes. I recommend an approach similar to in the [example code](https://github.com/BYUHPC/sci-comp-course-example-cxx/blob/main/src/MountainRangeMPI.hpp), with each process being in charge of about $$\frac{1}{N}$$ whole rows (where $$N$$ is the number of processes). Block partitioning is more efficient from a communications standpoint, but is considerably harder to implement.
Much as in the [previous phase](phase6.md), you'll split work roughly evenly among processes. I recommend an approach similar to in the [example code](https://github.com/BYUHPC/sci-comp-course-example-cxx/blob/main/src/MountainRangeMPI.hpp), with each process being in charge of about $$\frac{R}{N}$$ whole rows (where $$R$$ is the number of rows and $$N$$ is the number of processes). Block partitioning is more efficient from a communications standpoint, but is harder to implement.

Since updating a cell of `u` requires data from the rows above and below it, the processes will need to store [ghost rows](https://sites.cs.ucsb.edu/~gilbert/cs140resources/notes/GhostCells.pdf) and exchange them on each iteration (see `exchange_halos` in the [example code](https://github.com/BYUHPC/sci-comp-course-example-cxx/blob/main/src/MountainRangeMPI.hpp)).

Expand Down

0 comments on commit 56a59f4

Please sign in to comment.