Issue
I recently started working on a server (Centos7) for a computing task using Julia. But I met with a problem concerning the threads that Julia was using. The server, which equipped with 80 virtual CPUs, was unable to use the majority of its CPUs during the computing process.
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 80
On-line CPU(s) list: 0-79
Thread(s) per core: 2
Core(s) per socket: 20
Socket(s): 2
...
I tried to change this situation by change the ~/.bashrc, ~/.bash_profile file to set the threads to be 60 under my personal directory, but the number of threads seemed to be frozen on 4.
Also, I tried to use the set command, but it still didn't work.
$ set JULIA_NUM_THREADS = 60
$ echo $JULIA_NUM_THREADS
4
Is there anything else I can do to fix this? Any insights are greatly appreciated!
Solution
I solved this by simply using the command
export JULIA_NUM_THREADS=60
Although it is not what is said in the document, it worked somehow on my server. I'll just try to ignore the mechanism behind that.
Sorry if it bothered you.
Answered By - ant and tree Answer Checked By - David Marino (WPSolving Volunteer)