Skip to content

Building with MKL on Ubuntu

11 messages · Anand Patil, Martyn Plummer, Brian Ripley +1 more

#
It looks like the em64t version of MKL fails the test for the accuracy
of zdotu ("checking whether double complex BLAS can be used") and is
therefore dropped in favour of R's built-in BLAS.  I have just tested
this on Fedora and get the same result.

The 32-bit MKL does work for me.

Martyn
On Wed, 2008-11-05 at 16:29 +0000, Anand Patil wrote:
-----------------------------------------------------------------------
This message and its attachments are strictly confidenti...{{dropped:8}}
#
You can't link 32-bit libraries into 64-bit code.

That test is not for accuracy but for compatible return conventions. 
What compilers are in use here?  We've seen several instances of gcc and 
icc not being compatible on x86_64 (Linux and Mac OS X: not surprising as 
gcc3 and gcc4 are also not compatible in their return conventions), and 
presumably MKL is compiled with icc.

Our experience with Intel compilers and MKL is uniformly negative -- less 
accuracy and usually slower runs.
On Wed, 5 Nov 2008, Anand Patil wrote:

            

  
    
#
Anand Patil wrote:
There's also the option of "breaking the thermometer". You might examine
that check and decide whether the loss of accuracy is enough for you to
worry about and if not, take out the test from configure.

Apparently, this check was put in place in R-2.2.0

    o Any external BLAS found is now tested to see if the complex
        routine zdotu works correctly: this provides a compatibility
        test of compiler return conventions.

which suggests that the expected failure is catastrophic, and looking at
the code, there's a fuzz of 1e-10 which would seem to be about 1e5 times
larger than required.
#
Quoting Peter Dalgaard <P.Dalgaard at biostat.ku.dk>:
My apologies. I skimmed the code of the test program, but as Brian says
it is not a question of accuracy. The test program does in fact segfault,
although you won't see this in your config.log.

Anyway, Anand, I would just carry on with libRblas.

Martyn



-----------------------------------------------------------------------
This message and its attachments are strictly confidenti...{{dropped:8}}
#
And how does that help you?  At some future point on a real problem you 
will get incorrect answers/segfault.

That test was put there as a result of such incorrect results found the 
hard way.
On Wed, 5 Nov 2008, Anand Patil wrote:

            
#
On Thu, 6 Nov 2008, Anand Patil wrote:

            
Only complex BLASAFAIK, *but* e.g. lapack uses it internally, AFAIK even 
for real inputs.