https://github.com/tkf/julia-t
Run `julia` with `JULIA_NUM_THREADS=<number of physical cores>`.
https://github.com/tkf/julia-t
distributed-computing julia parallel-computing
Last synced: 21 days ago
JSON representation
Run `julia` with `JULIA_NUM_THREADS=<number of physical cores>`.
- Host: GitHub
- URL: https://github.com/tkf/julia-t
- Owner: tkf
- Created: 2020-01-09T03:34:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-09T05:23:23.000Z (over 6 years ago)
- Last Synced: 2025-03-27T14:53:35.820Z (about 1 year ago)
- Topics: distributed-computing, julia, parallel-computing
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
usage: julia-t [-h] [-t N] [--julia JULIA] [args...]
Run `julia` with `JULIA_NUM_THREADS=`.
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)