Skip to content

Commit

Permalink
Added note to highlight that some environment variables can't be set …
Browse files Browse the repository at this point in the history
…in `startup.jl` (JuliaLang#30015)
  • Loading branch information
IanButterworth authored and fredrikekre committed Nov 16, 2018
1 parent 26f1ba5 commit 604046c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/src/manual/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ The environment variables that Julia uses generally start with `JULIA`. If
output will list defined environment variables relevant for Julia, including
those for which `JULIA` appears in the name.

!!! note

Some variables, such as `JULIA_NUM_THREADS` and `JULIA_PROJECT` need to be set before Julia
starts, therefore adding these to `~/.julia/config/startup.jl` is too late in the startup process.
These must either be set manually before launching Julia through bash with
`export JULIA_NUM_THREADS=4` etc. or added to `-/.bashrc` and/or `~/.bash_profile` to achieve persistence.

## File locations

### `JULIA_BINDIR`
Expand Down Expand Up @@ -74,6 +81,10 @@ Julia tries to find a project directory that contains `Project.toml` or
`JuliaProject.toml` file from the current directory and its parents. See also
the chapter on [Code Loading](@ref).

!!! note

`JULIA_PROJECT` must be defined before starting julia; defining it in `startup.jl` is too late in the startup process.

### `JULIA_LOAD_PATH`

A separated list of absolute paths that are to be appended to the variable
Expand Down Expand Up @@ -152,6 +163,10 @@ physical CPU cores, then the number of threads is set to the number of cores. If
cores cannot be determined through system calls, then the number of threads is
set to `1`.

!!! note

`JULIA_NUM_THREADS` must be defined before starting julia; defining it in `startup.jl` is too late in the startup process.

### `JULIA_THREAD_SLEEP_THRESHOLD`

If set to a string that starts with the case-insensitive substring `"infinite"`,
Expand Down

0 comments on commit 604046c

Please sign in to comment.