I noticed that both ACML and ACML-gpu give significant performance benefits under R and I want to use them. However, when testing R, the reg-BLAS regression test fails (see code below). More precisely, although a "NA" (NaN) result is expected, a 0 is returned. I do not know whether this is undefined or wrong behavior, but I am worried that R results may not always be accurate.

Is anyone aware of this and is there a fix?

----- COPY FROM reg-BLAS.R

## found from fallback test in slam 0.1-15

## most likely indicates an inaedquate BLAS.

x <- matrix(c(1, 0, NA, 1), 2, 2)

y <- matrix(c(1, 0, 0, 2, 1, 0), 3, 2)

(z <- tcrossprod(x, y))

stopifnot(identical(z, x %*% t(y)))

stopifnot(is.nan(log(0) %*% 0))

## depended on the BLAS in use: some (including the reference BLAS)

## had z[1,3] == 0 and log(0) %*% 0 as as.matrix(0).

---- R with standard BLAS library

[,1] [,2] [,3]

[1,] NA NA NA

[2,] 2 1 0

is.nan(log(0) %*% 0) returns NA

---- R with ACML-mp or ACML-gpu library

[,1] [,2] [,3]

[1,] NA NA 0

[2,] 2 1 0

is.nan(log(0) %*% 0) returns 0

Which version of the library are you using, and which OS? I'm guessing Linux on the OS, and gfortran?

The ifort version of the library are built with -Qprec for windows, and -mp1 for linux. These were chosen to propagate NaN's for programs like matlab and R.

You will have to refer to the examples to get the link commands right, but you might try the ifort library versions to see if they solve the problem.