Threads.nthreads in Julia Call

Viewed 132

I'm using the JuliaCall library to use Julia code in R. I'm trying to increase the number of threads but I can't seem to succeed. I'm using Windows 10 and RStudio version 1.4.1103

Thank you so much!

1 Answers

Simply run

Sys.setenv(JULIA_NUM_THREADS = "8")

before calling library(JuliaCall).

Here is a full console output on my machine:

> Sys.setenv(JULIA_NUM_THREADS = "8")
> library(JuliaCall)
> julia_command("Threads.nthreads()")
Julia version 1.6.0 at location C:\JULIA-~1.0\bin will be used.
Loading setup script for JuliaCall...
Finish loading setup script for JuliaCall.
8
Related