When I type
$ julia -p 2 run.jl
is there any way to access the 2 from within run.jl? I know that one can use ARGS to access arguments, for example
#run.jl
println(ARGS[2])
and running
$ julia -p 2 run.jl a b c d
would return b. But I can't seem to find a way to access the options -p <n>.
In 0.4+, you can access the parsed options via Base.JLOptions(), so your argument to -p would be here:
Base.JLOptions().nprocs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With