Skip to content

Commit

Permalink
docs: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Oct 11, 2023
1 parent 433c504 commit 423e563
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- [Can I subclass basic types such as TimeFunction](#can-i-subclass-basic-types-such-as-timefunction)
- [How can I change the compilation flags (for example, I want to change the optimization level from -O3 to -O0)](#how-can-i-change-the-compilation-flags-for-example-i-want-to-change-the-optimization-level-from--o3-to--o0)
- [Is the jitted code IEEE-compliant](#is-the-jitted-code-ieee-compliant)
- [Can I control the MPI domain decomposition](#can-i-control-the-mpi-domain-decomposition)
- [Can I control the MPI domain decomposition?](#can-i-control-the-mpi-domain-decomposition)
- [How should I use MPI on multi-socket machines](#how-should-I-use-MPI-on-multi-socket-machines)
- [How do I make sure my code is "MPI safe"](#how-do-i-make-sure-my-code-is-MPI-safe)
- [Why does my Operator kernel die suddenly](#why-does-my-operator-kernel-die-suddenly)
Expand Down Expand Up @@ -565,7 +565,7 @@ By default, Devito compiles the generated code using flags that maximize the run

[top](#Frequently-Asked-Questions)

## Can I control the MPI domain decomposition
## Can I control the MPI domain decomposition?

Until Devito v3.5 included, domain decomposition occurs along the fastest axis. As of later versions, domain decomposition occurs along the slowest axis, for performance reasons. And yes, it is possible to control the domain decomposition in user code, but this is not neatly documented. Take a look at `class CustomTopology` in [distributed.py](https://github.com/devitocodes/devito/blob/master/devito/mpi/distributed.py) and `test_custom_topology` in [this file](https://github.com/devitocodes/devito/blob/master/tests/test_mpi.py). In essence, `Grid` accepts the optional argument `topology`, which allows the user to pass a custom topology as an n-tuple, where `n` is the number of distributed dimensions. For example, for a two-dimensional grid, the topology `(4, 1)` will decompose the slowest axis into four partitions, one partition per MPI rank, while the fastest axis will be replicated over all MPI ranks.

Expand Down

0 comments on commit 423e563

Please sign in to comment.