-
Notifications
You must be signed in to change notification settings - Fork 0
tkf/julia-t
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
usage: julia-t [-h] [-t N] [--julia JULIA] [args...]
Run `julia` with `JULIA_NUM_THREADS=<number of physical cores>`.
Use `julia-t` in place of `julia` to run `julia` with appropriate
`$JULIA_NUM_THREADS`. Arguments are passed to `julia` as-is except for
`--julia` option that controls the actual `julia` binary to be used.
## Installation
`julia-t` is just a simple Python script. It can be installed by, for
example:
wget https://raw.githubusercontent.com/tkf/julia-t/master/julia-t
chmod u+x julia-t
## Using `julia-t` with `Distributed`
This script is useful for launching multi-threaded Julia workers with
`Distributed.addprocs`:
addprocs(1, exename="julia-t")
Use `--julia` option if there are multiple `julia` binaries:
addprocs(1, exename="julia-t", exeflags=`--julia=$(Base.julia_cmd().exec[1])`)
optional arguments:
-h, --help show this help message and exit
--julia JULIA Julia binary to be used. Default value is the file name
of this script without the suffix `-t`. If this script
is called `julia1.3-t`, the executable named `julia1.3`
is used. Use symlinks for using `julia-t` with different
`julia` versions; e.g., `ln -s julia-t julia1.3-t`.
(default: julia)
--nthreads N, -t N The value of `$JULIA_NUM_THREADS` to be used by `julia`.
Environment variable `$JULIA_NUM_THREADS` is used as-is
if it is set. Otherwise default to the number of
physical cores. (default: 4)
About
Run `julia` with `JULIA_NUM_THREADS=<number of physical cores>`.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published