Skip to content

Commit

Permalink
Merge pull request #226 from severinson/patch-1
Browse files Browse the repository at this point in the history
Update index.md
  • Loading branch information
vchuravy committed Oct 20, 2020
2 parents dcae31f + 2bd0a69 commit b98875d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/index.md
Expand Up @@ -405,7 +405,7 @@ on the node that created it.

Nested `spmd` calls
-------------------
As `spmd` executes the the specified function on all participating nodes, we need to be careful with nesting `spmd` calls.
As `spmd` executes the specified function on all participating nodes, we need to be careful with nesting `spmd` calls.

An example of an unsafe(wrong) way:
```julia
Expand Down Expand Up @@ -451,6 +451,6 @@ function foo(d::DArray)
end
spmd(foo,....)
```
Without the `myid()` check, the `spmd` call to `foo` would execute `map!` from all nodes, which is not what we probably want.
Without the `myid()` check, the `spmd` call to `foo` would execute `map!` from all nodes, which is probably not what we want.

Similarly `@everywhere` from within a SPMD run should also be driven from the master node only.

0 comments on commit b98875d

Please sign in to comment.