From murdoch.duncan at gmail.com  Mon Dec  2 20:12:11 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Mon, 02 Dec 2013 14:12:11 -0500
Subject: [Rd] Arithmetic Error while compiling R with the Intel compilers
In-Reply-To: <529CD3D1.9020105@ichec.ie>
References: <529CD3D1.9020105@ichec.ie>
Message-ID: <529CDB8B.3050106@gmail.com>

On 02/12/2013 1:39 PM, Swapnil Gaikwad wrote:
> Hi Team,
>                 I downloaded the R 3.0.2 and,  built and installed it
> using Intel compilers (icc and ifort) from Intel parallel studio 2013,
> sp1. After performing make tried to check it using 'make check'. Most of
> the tests passed successfully but while checking a 'stats' package I saw
> many lines were printed which did not match the desired output.
>
> e.g.
>         There were two types of mismatch
> Case 1)
> 6300c6300
> < Grand Mean: 291.5937
> ---
>   > Grand Mean: 291.5938
>
> Case 2)
> 12699c12699
> < UrbanPop *0.278* -0.873 -0.378  0.134
> ---
>   > UrbanPop *-0.278* -0.873 -0.378  0.134
>
>
>                 Case 1 was having slight difference in the values and
> assumed due to the floating point error, but Case 2 is having values
> with difference signs. Is such behaviour is normal or there is any issue
> with the Intel libraries.

You need to look at the context of what is being tested.  In this 
particular case, you are testing principal component loadings:  they can 
all be multiplied by -1 and give exactly the same results, so this one 
is okay.  (The choice of sign is probably being made in the linear 
algebra routines.)


> I used some of the libraries from Intel MKL
> like fftw, mkl_lapack etc. I am pasting below the command that I used to
> configure this R package.
>
>
> ./configure --prefix=$INSTALL_DIR --with-blas="-lmkl_intel_lp64
> -lmkl_intel_thread -lmkl_lapack -lmkl_core -lpthread -lfftw3xf_intel
> -lfftw3xc_intel" --with-lapack
>
>               I also tried installing using Intel compilers without using
> Intel MKL libraries. It was done using below command.
>
> ./configure --prefix=$INSTALL_DIR
>
>         Exactly same errors were there.
>         There were no mismatch observed while compiling with gcc.Kindly
> provide your suggestions whether it is good idea to use Intel compilers.
> Thanks for your kind attention and time.


Can't help you with your final question, I have no experience with them.

Duncan Murdoch



[Rd] Arithmetic Error while compiling R with the Intel compilers
Duncan Murdoch