Skip to content

Commit c7c875b

Browse files
authored
Make mpiexecjl more visible (#544)
1 parent af96546 commit c7c875b

File tree

1 file changed

+39
-33
lines changed

1 file changed

+39
-33
lines changed

docs/src/configuration.md

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,45 @@ MPI.jl will attempt to detect when you are running on a HPC cluster, and warn th
1313
about this. To disable this warning, set the environment variable
1414
`JULIA_MPI_CLUSTER_WARN=n`.
1515

16+
## Julia wrapper for `mpiexec`
17+
18+
Since you can configure `MPI.jl` to use one of several MPI implementations, you
19+
may have different Julia projects using different implementation. Thus, it may
20+
be cumbersome to find out which `mpiexec` executable is associated to a specific
21+
project. To make this easy, on Unix-based systems `MPI.jl` comes with a thin
22+
project-aware wrapper around `mpiexec`, called `mpiexecjl`.
23+
24+
### Installation
25+
26+
You can install `mpiexecjl` with [`MPI.install_mpiexecjl()`](@ref). The default
27+
destination directory is `joinpath(DEPOT_PATH[1], "bin")`, which usually
28+
translates to `~/.julia/bin`, but check the value on your system. You can also
29+
tell `MPI.install_mpiexecjl` to install to a different directory.
30+
31+
```sh
32+
$ julia
33+
julia> using MPI
34+
julia> MPI.Install_mpiexecjl()
35+
```
36+
37+
To quickly call this wrapper we recommend you to add the destination directory
38+
to your [`PATH`](https://en.wikipedia.org/wiki/PATH_(variable)) environment
39+
variable.
40+
41+
### Usage
42+
43+
`mpiexecjl` has the same syntax as the `mpiexec` binary that will be called, but
44+
it takes in addition a `--project` option to call the specific binary associated
45+
to the `MPI.jl` version in the given project. If no `--project` flag is used,
46+
the `MPI.jl` in the global Julia environment will be used instead.
47+
48+
After installing `mpiexecjl` and adding its directory to `PATH`, you can run it
49+
with:
50+
51+
```sh
52+
$ mpiexecjl --project=/path/to/project -n 20 julia script.jl
53+
```
54+
1655
## Using a system-provided MPI
1756

1857
### Requirements
@@ -74,36 +113,3 @@ The test suite can also be modified by the following variables:
74113
- `JULIA_MPIEXEC_TEST_ARGS`: Additional arguments to be passed to the MPI launcher for the tests only.
75114
- `JULIA_MPI_TEST_ARRAYTYPE`: Set to `CuArray` to test the CUDA-aware interface with
76115
[`CUDA.CuArray](https://github.com/JuliaGPU/CUDA.jl) buffers.
77-
78-
## Julia wrapper for `mpiexec`
79-
80-
Since you can configure `MPI.jl` to use one of several MPI implementations, you
81-
may have different Julia projects using different implementation. Thus, it may
82-
be cumbersome to find out which `mpiexec` executable is associated to a specific
83-
project. To make this easy, on Unix-based systems `MPI.jl` comes with a thin
84-
project-aware wrapper around `mpiexec`, called `mpiexecjl`.
85-
86-
### Installation
87-
88-
You can install `mpiexecjl` with [`MPI.install_mpiexecjl()`](@ref). The default
89-
destination directory is `joinpath(DEPOT_PATH[1], "bin")`, which usually
90-
translates to `~/.julia/bin`, but check the value on your system. You can also
91-
tell `MPI.install_mpiexecjl` to install to a different directory.
92-
93-
To quickly call this wrapper we recommend you to add the destination directory
94-
to your [`PATH`](https://en.wikipedia.org/wiki/PATH_(variable)) environment
95-
variable.
96-
97-
### Usage
98-
99-
`mpiexecjl` has the same syntax as the `mpiexec` binary that will be called, but
100-
it takes in addition a `--project` option to call the specific binary associated
101-
to the `MPI.jl` version in the given project. If no `--project` flag is used,
102-
the `MPI.jl` in the global Julia environment will be used instead.
103-
104-
After installing `mpiexecjl` and adding its directory to `PATH`, you can run it
105-
with:
106-
107-
```
108-
$ mpiexecjl --project=/path/to/project -n 20 julia script.jl
109-
```

0 commit comments

Comments
 (0)