Skip to content

Commit

Permalink
improve docs on modulefiles (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyrne authored Sep 13, 2023
1 parent 846c79d commit a57528f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docs/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Preferences are merged across the Julia load path, such that it is feasible to p
mpiexec = "/software/mpi/bin/mpiexec"
```

2. Create a file called `Project.toml` or `JuliaProject.toml` in a central location, for example `/software/mpi/julia` or in the same directory as the MPI library module, and add the following contents:
2. Create a file called `Project.toml` or `JuliaProject.toml` in a central location (for example `/software/mpi/julia`, or in the same directory as the MPI module file), and add the following contents:

```toml
[extras]
Expand All @@ -94,12 +94,21 @@ Preferences are merged across the Julia load path, such that it is feasible to p

3. Append the directory containing the file to the [`JULIA_LOAD_PATH`](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_LOAD_PATH) environment variable, with a colon (`:`) separator.

If this variable is _not_ already set, it should be prefixed with a colon to ensure correct
behavior of the Julia load path, e.g. `JULIA_LOAD_PATH=":/software/mpi/julia"`.
!!! note
If this variable is _not_ already set, it should be prefixed with a colon to ensure correct
behavior of the Julia load path (e.g. `JULIA_LOAD_PATH=":/software/mpi/julia"`)

If using environment modules, this can be achieved with
```
append-path -d {} JULIA_LOAD_PATH :/software/mpi/julia
```
or if using an older version of environment modules
```
if { ![info exists ::env(JULIA_LOAD_PATH)] } {
append-path JULIA_LOAD_PATH ""
}
append-path JULIA_LOAD_PATH /software/mpi/julia
```
in the corresponding module file (preferably the module file for the MPI installation or for Julia).

The user can still provide differing MPI configurations for each Julia project
Expand Down

0 comments on commit a57528f

Please sign in to comment.