Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added note to highlight that some variables can't be set in startup.jl #30015

Merged
merged 5 commits into from
Nov 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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