Skip to content

Commit 6f05aa1

Browse files
stevengjsimonbyrne
andauthored
document how to pass MPI.Comm objects to C (#626)
Co-authored-by: Simon Byrne <simonbyrne@gmail.com>
1 parent 75e05ed commit 6f05aa1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/src/reference/comm.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ each process a unique *rank* (see [`MPI.Comm_rank`](@ref)) taking an integer val
1212
MPI.Comm
1313
```
1414

15+
If you need to pass a Julia `MPI.Comm` object to an external C/C++ library ([via `ccall`](https://docs.julialang.org/en/v1/manual/calling-c-and-fortran-code/)) that expects an `MPI_Comm` argument, you should declare the corresponding `ccall` argument type `MPI.API.MPI_Comm` and the correct conversion will be performed.
16+
1517
## Constants
1618

1719
```@docs

0 commit comments

Comments
 (0)