I am trying to build numpy against Cray's xt-libsci library on a Cray XT5. I am getting an error I am hoping for hints on how to resolve:
In [1]: import numpy
<snip>
20 isfinite, size
21 from numpy.lib import triu
---> 22 from numpy.linalg import lapack_lite
23 from numpy.matrixlib.defmatrix import matrix_power
24
ImportError: /opt/xt-libsci/10.4.0/gnu/lib/libsci.so: undefined symbol: fftw_version
These are the symbols in libsci:
% nm /opt/xt-libsci/10.4.0/gnu/lib/libsci.so | grep fftw_version
00000000010f9a30 B __crafft_internal__crafft_fftw_version_num
U fftw_version
00000000005aa8a4 T get_fftw_version
I first built numpy with no custom site.cfg file. It built correctly and all tests ran. But it was too slow.
Then I tried building numpy against libsci, which has BLAS, LAPACK, FFTW3 among other things. I had to build a libcblas.a from the netlib src as libsci does not have cblas (using gcc, gfortran 4.3.3). Here is my site.cfg, accumulated from several nice tutorials on how to build numpy on these machines, which for some reason don't work for me. The instructions were based on numpy 1.2.
[blas]
blas_libs = cblas
library_dirs = /global/homes/amir/local/lib
[lapack]
lapack_libs = sci
library_dirs = /opt/xt-libsci/10.4.0/gnu/lib
[blas_opt]
blas_libs = cblas, sci
libraries = cblas, sci
[lapack_opt]
libraries = sci
[fftw]
libraries = fftw3
Here is what is linked to lapack_lite.so:
% ldd ./numpy/linalg/lapack_lite.so
libsci.so => /opt/xt-libsci/10.4.0/gnu/lib/libsci.so (0x00002b4493325000)
libgfortran.so.3 => /opt/gcc/4.3.3/snos/lib64/libgfortran.so.3 (0x00002b44a4579000)
libm.so.6 => /lib64/libm.so.6 (0x00002b44a4770000)
libgcc_s.so.1 => /opt/gcc/4.3.3/snos/lib64/libgcc_s.so.1 (0x00002b44a48c6000)
libc.so.6 => /lib64/libc.so.6 (0x00002b44a49dd000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)