[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

OpenBlas Pthread issue with R



On the r-sig-debian list (hosted by the R Project for users of R on Debian
and Ubuntu) someone pointed out that R hangs on simple calls into OpenBLAS
Pthread, i.e. /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3

To witness, just launch R and issue the   example(solve)   which spends two
lines setting a helper Hilbert function and input data with it and then hangs
on the actual call to solve() (see below for full example)

Is this a known issue? Do we need to set some OpenMP env vars to limit thread
use?

Dirk


> example(solve)

solve> hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") }

solve> h8 <- hilbert(8); h8
          [,1]      [,2]      [,3]       [,4]       [,5]       [,6]       [,7]
[1,] 1.0000000 0.5000000 0.3333333 0.25000000 0.20000000 0.16666667 0.14285714
[2,] 0.5000000 0.3333333 0.2500000 0.20000000 0.16666667 0.14285714 0.12500000
[3,] 0.3333333 0.2500000 0.2000000 0.16666667 0.14285714 0.12500000 0.11111111
[4,] 0.2500000 0.2000000 0.1666667 0.14285714 0.12500000 0.11111111 0.10000000
[5,] 0.2000000 0.1666667 0.1428571 0.12500000 0.11111111 0.10000000 0.09090909
[6,] 0.1666667 0.1428571 0.1250000 0.11111111 0.10000000 0.09090909 0.08333333
[7,] 0.1428571 0.1250000 0.1111111 0.10000000 0.09090909 0.08333333 0.07692308
[8,] 0.1250000 0.1111111 0.1000000 0.09090909 0.08333333 0.07692308 0.07142857
           [,8]
[1,] 0.12500000
[2,] 0.11111111
[3,] 0.10000000
[4,] 0.09090909
[5,] 0.08333333
[6,] 0.07692308
[7,] 0.07142857
[8,] 0.06666667

solve> sh8 <- solve(h8)
.... and here it hangs whereas a normal session quickly finishes ....

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd@debian.org


Reply to: