-
Notifications
You must be signed in to change notification settings - Fork 35
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
Setting number of threads not working on Windows #193
Comments
Same here. @enweg are you admin/root on Windows? |
@e-kotov Unfortunately not on the Windows machine. Does it work with admin/root rights? |
@enweg at the moment I only have access to a Windows machine where I do not have admin rights, so I cannot test. |
Can reproduce. Though, setting the JULIA_NUM_THREADS globally as an admin works and setting JULIA_NUM_THREADS locally using the command line is a workaround too: Open command line and set the number of threads, then open RStudio using the console: set JULIA_NUM_THREADS=8
RStudio Result: > library(JuliaCall)
Warning message:
package ‘JuliaCall’ was built under R version 4.3.2
> julia_command("Threads.nthreads()")
Julia version 1.10.0 at location C:\Users\xyz\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\bin will be used.
Loading setup script for JuliaCall...
Finish loading setup script for JuliaCall.
8 It would still be useful to be able to use |
These are two work arounds on Windows that worked for me: Use
|
As mentioned before: The workaround as admin does work. Thank you for providing detailled instructons @edwardlavender Though it would be still nice to set the number of threads without admin rights and on a per-analysis basis. I am currently working on a multi user system environment where it would be sometimes beneficial to do some parallel number crunching on a bunch of CPU cores, but most of the time it would just be enough to use 1-4 cores. |
I am trying to set the number of threads to be used by JuliaCall via the code below:
On my Mac machine (that's why there is a JULIA_HOME line, this works all well, but on my Windows machine JuliaCall always only uses a single thread. Is there some other way to set the number of threads on Windows that I am not aware of?
The text was updated successfully, but these errors were encountered: