Multithreading on RapberryPi4 (arm32 v7 version)

Hi,

Please does the “Threads.@threads for” functionality split the loop into threads on RPi (v. 4)? I changed the number of threads to 4 via the env JULIA_NUM_THREADS=4, confirmed by Threads.nthreads(). Yet top command shows only one core is running in such loop. On amd64 machines the threading works great.

My code:

function generateSine(x)
    Threads.@threads for i=1:4
        sin.(x);
    end
end

cnt = Int64(1e7);
x = rand(cnt);
GC.enable(false);
@time generateSine(x)
GC.enable(true);

Thanks a lot for any info/hints.

Regards,

Pavel.

1 Like

there’s only one process but:

391.0% 1.8 0:43.55 julia

it’s using 4 cores.

Indeed, I must have been blind.

Thanks a lot!

Pavel.