[SciPy-User] Compiling SciPy almost works

Søren Gammelmark gammelmark@phys.au...
Thu Aug 5 03:21:28 CDT 2010


You mean setting the environment-variable CXX to icpc? That does not 
work (I tried it), but I would not expect it to either -- I did not 
think that the numpy distutils listen to those environment-variables?

When I compiled numpy/scipy I had to do a bit of editing in 
numpy/distutils/intelcompilers.py, where I changed the line cc_exe = 
'icc' to include more command-line arguments, i.e. cc_exe = 'icc -fPIC 
-O2 -fomit-frame-pointer -parallel'. One possibility would be to put in 
icpc here instead, but then everything will be compiled with icpc. I 
tried this, but then the numpy-compilation sprouts errors about missing 
libraries (I did not try thi SciPy-compilation).

I then tried adding a cxx_exe = 'icpc .....' line and modifying to 
cxx_compiler option i intelcompilers.py. This appears to work (and make 
excellent sense). I can then compiler NumPy without problems and SciPy 
compiles fine and sparsetools work as they should. Now, however, the 
scipy.test() crashes with "*** glibc detected *** free(): invalid next 
size (fast): 0x0000000001f6f2b0 ***" when running 
test_arpack.TestEigenNonSymmetric.

This is not a big program for me and seems to be related to the issue 
stated here http://projects.scipy.org/scipy/ticket/848, but it still 
seems a bit strange. If I remove the ARPACK tests things work for the 
most part. There is still some issues regarding the interpretation of 
NaN and Inf, but I believe that is quite normal.

It would be nice if we could get better support for the Intel-compilers 
since I believe they are used by many scientific institutions. For 
future reference: A peculiar thing I noticed when compiling SciPy was 
that the Intel Fortran compiler setup in numpy.distutils appended the 
option "-arch SSE2" on the AMD Opteron machines. This had the peculiar 
effect of an error complaining about the command-line " 'ifort .... 
-arch SSE2 ��[]^_Ë=0��@ .....'. I guess it is a bug in the Intel Fortran 
9.1 compiler (just try ifort -arch SSE2 on an AMD Opteron) and in 
addition the compiler claims that neither -arch SSE2 nor -msse2 is 
supported on that platform. So if people are trying to compile SciPy 
with this compiler they need to change this.

Thanks for all the help
Søren

On 2010-08-05 09:33, David wrote:
> On 08/05/2010 04:28 PM, Søren Gammelmark wrote:
>    
>> When trying the manual link everything works out fine. "import _csr"
>> executes without any problem. I also tried using the Intel C++ compiler
>> (icpc) and then everything works out fine. I guess the default
>> link-libraries are different for the programs.
>>      
> Hm, so they change the C++ driver - that's almost certainly the root of
> the issue. Does setting CXX to icpc works ?
>
> David
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>    



More information about the SciPy-User mailing list