When I run a longer Julia code, I notice that the 24 cores of the computer are operating. Is this because Julia is running my code with parallel computing? Thanks.
Please give details about the code you run. By default, most code runs single core. I cannot give a more precise answer from such a vague question.
It is an extensive, complex code, and with some extensive loops. But without any parallel programming.
I didn’t take printsc before, but all the cores were idle.
Which packages are you using? Please describe the complex code a bit more.
do you use BLAS operations like matrix multiplication? by default that uses OpenBLAS which is multithreaded by default. You can do
using LinearAlgebra
BLAS.set_num_threads(4)
to change the number of threads used by BLAS operations.
using LinearAlgebra, SpecialFunctions, PyPlot
It is difficult to describe the code. In general I calculate eigenvectors and eigenvalues of 100x100 matrices, I do calculations like interpolation, numerical integration, and I repeat these calculations for a certain range of parameters.
Interesting, but I don’t use BLAS, not directly.
Ah, well you are probably using it without realizing; things like eigenvalues and eigenvectors generally use BLAS too.
That nails it I‘d say. Merry Christmas and don‘t work too much!
Cool, I thought Julia parameterized my code lol. Thanks maxfreu, ericphanson. Merry Christmas to everyone!