On Mon, 18 Feb 2019 16:12:41 +0100
zimoun <[email protected]> wrote:

> Dear,
> 
> I am not sure to understand if it is expected or not.
> 
> Let install R, guix package -i r, and then run the small script:
> 
> > N <- 9000;A <- array(0.1, dim=c(N,N));B <- array(0.1, dim=c(N,N))
> > dim(B %*% A)  
> 
> Monitoring with htop, only 8 of my 16 cores are used. Why ?
> And if I have more, then again only 8 cores will be used.

OpenBLAS will use as many threads as the OpenMP runtime will give it,
which is by default one per CPU.  I think this default does not take
into account hyperthreads, which htop shows as a separate "cpu".

You can set the "OMP_NUM_THREADS" environment variable and OpenBLAS
should pick it up.  I don't know whether R does anything for setting
OpenMP runtime settings.

Hope that helps,
`~Eric

Attachment: pgpPq7xZkCaKz.pgp
Description: OpenPGP digital signature

Reply via email to