<br><br><div class="gmail_quote">On Fri, Dec 9, 2011 at 8:02 PM, Russell E. Owen <span dir="ltr"><<a href="mailto:rowen@uw.edu">rowen@uw.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm trying to build numpy 1.6.1 on Scientific Linux 5 but the unit tests<br>
claim the wrong version of fortran was used. I thought I knew how to<br>
avoid that, but it's not working.<br>
<br>
I don't have atlas (this needs to run on a lot of<br>
similar-but-not-identical machines). I believe blas and lapack were<br>
built against gfortran:<br>
-bash-3.2$ ldd /usr/lib64/libblas.so<br>
   linux-vdso.so.1 =>  (0x00007fff4bffd000)<br>
   libm.so.6 => /lib64/libm.so.6 (0x00002ab26a0c8000)<br>
   libgfortran.so.1 => /usr/lib64/libgfortran.so.1 (0x00002ab26a34c000)<br>
   libc.so.6 => /lib64/libc.so.6 (0x00002ab26a5e3000)<br>
   /lib64/ld-linux-x86-64.so.2 (0x0000003b2ba00000)<br>
-bash-3.2$ ldd /usr/lib64/liblapack.so<br>
   linux-vdso.so.1 =>  (0x00007fffe97fd000)<br>
   libblas.so.3 => /usr/lib64/libblas.so.3 (0x00002b6438d75000)<br>
   libm.so.6 => /lib64/libm.so.6 (0x00002b6438fca000)<br>
   libgfortran.so.1 => /usr/lib64/libgfortran.so.1 (0x00002b643924d000)<br>
   libc.so.6 => /lib64/libc.so.6 (0x00002b64394e4000)<br>
   /lib64/ld-linux-x86-64.so.2 (0x0000003b2ba00000)<br>
<br>
The sysadmins have provided a gcc 4.4.0 compiler that I access using<br>
symlinks on my $PATH:<br>
-bash-3.2$ which gcc g++ gfortran<br>
~/local/bin/gcc<br>
~/local/bin/g++<br>
~/local/bin/gfortran<br>
-bash-3.2$ ls -l ~/local/bin<br>
lrwxrwxrwx 1 rowen astro 14 Oct 28  2010 g++ -> /usr/bin/g++44<br>
lrwxrwxrwx 1 rowen astro 14 Oct 28  2010 gcc -> /usr/bin/gcc44<br>
lrwxrwxrwx 1 rowen astro 19 Dec  5 16:40 gfortran -> /usr/bin/gfortran44<br>
-bash-3.2$ gfortran --version<br>
GNU Fortran (GCC) 4.4.0 20090514 (Red Hat 4.4.0-6)<br>
Copyright (C) 2009 Free Software Foundation, Inc.<br>
<br>
For this log I used a home-bulit python 2.6.5 that is widely used.<br>
However, I've tried it with other builds of python that are on our<br>
system, as well, with no better success (including a Python 2.7.2).<br>
-bash-3.2$ which python<br>
/astro/apps/pkg/python64/bin/python<br>
-bash-3.2$ python<br>
Python 2.6.5 (r265:79063, Aug  4 2010, 11:27:53)<br>
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
<br>
<br>
<br>
numpy seems to see gfortran when it builds:<br>
<br>
-bash-3.2$ python setup.py build --fcompiler=gnu95<br>
<br>
Running from numpy source directory.non-existing path in<br>
'numpy/distutils': 'site.cfg'<br>
F2PY Version 2<br>
blas_opt_info:<br>
blas_mkl_info:<br>
... NOT AVAILABLE<br>
<br>
atlas_blas_threads_info:<br>
... NOT AVAILABLE<br>
<br>
atlas_blas_info:<br>
... NOT AVAILABLE<br>
<br>
blas_info:<br>
... FOUND:<br>
   libraries = ['blas']<br>
   library_dirs = ['/usr/lib64']<br>
   language = f77<br>
<br>
 FOUND:<br>
   libraries = ['blas']<br>
   library_dirs = ['/usr/lib64']<br>
   define_macros = [('NO_ATLAS_INFO', 1)]<br>
   language = f77<br>
<br>
lapack_opt_info:<br>
lapack_mkl_info:<br>
mkl_info:<br>
... NOT AVAILABLE<br>
<br>
 NOT AVAILABLE<br>
<br>
atlas_threads_info:<br>
... NOT AVAILABLE<br>
<br>
atlas_info:<br>
... NOT AVAILABLE<br>
<br>
/astro/users/rowen/build/numpy-1.6.1/numpy/distutils/system_info.py:1330:<br>
 UserWarning:<br>
   Atlas (<a href="http://math-atlas.sourceforge.net/" target="_blank">http://math-atlas.sourceforge.net/</a>) libraries not found.<br>
   Directories to search for the libraries can be specified in the<br>
   numpy/distutils/site.cfg file (section [atlas]) or by setting<br>
   the ATLAS environment variable.<br>
 warnings.warn(AtlasNotFoundError.__doc__)<br>
lapack_info:<br>
 libraries lapack not found in<br>
/astro/apps/lsst_w12_sl5/Linux64/external/python/2.7.2+2/lib<br>
... FOUND:<br>
   libraries = ['lapack']<br>
   library_dirs = ['/usr/lib64']<br>
   language = f77<br>
<br>
 FOUND:<br>
   libraries = ['lapack', 'blas']<br>
   library_dirs = ['/usr/lib64']<br>
   define_macros = [('NO_ATLAS_INFO', 1)]<br>
   language = f77<br>
<br>
running build<br>
running config_cc<br>
unifing config_cc, config, build_clib, build_ext, build commands<br>
--compiler options<br>
running config_fc<br>
unifing config_fc, config, build_clib, build_ext, build commands<br>
--fcompiler options<br>
running build_src<br>
build_src<br>
building py_modules sources<br>
creating build<br>
creating build/src.linux-x86_64-2.7<br>
creating build/src.linux-x86_64-2.7/numpy<br>
creating build/src.linux-x86_64-2.7/numpy/distutils<br>
building library "npymath" sources<br>
customize Gnu95FCompiler<br>
Found executable /astro/users/rowen/local/bin/gfortran<br>
<br>
<br>
# I install it in an out-of-the-way location just so I can test it<br>
-bash-3.2$ python setup.py install  --home=~/local<br>
...<br>
-bash-3.2$ cd<br>
-bash-3.2$ python<br>
>>> import numpy<br>
>>> numpy.__path__<br>
['/astro/users/rowen/local/lib/python/numpy']<br>
>>> numpy.test()<br>
Running unit tests for numpy<br>
NumPy version 1.6.1<br>
NumPy is installed in /astro/users/rowen/local/lib/python/numpy<br>
Python version 2.6.5 (r265:79063, Aug  4 2010, 11:27:53) [GCC 4.1.2<br>
20080704 (Red Hat 4.1.2-46)]<br>
nose version 0.11.4<br>
....<br>
======================================================================<br>
FAIL: test_lapack (test_build.TestF77Mismatch)<br>
----------------------------------------------------------------------<br>
Traceback (most recent call last):<br>
  File<br>
"/astro/users/rowen/local/lib/python/numpy/testing/decorators.py", line<br>
146, in skipper_func<br>
    return f(*args, **kwargs)<br>
  File<br>
"/astro/users/rowen/local/lib/python/numpy/linalg/tests/test_build.py",<br>
line 50, in test_lapack<br>
    information.""")<br>
AssertionError: Both g77 and gfortran runtimes linked in lapack_lite !<br>
This is likely to<br>
cause random crashes and wrong results. See numpy INSTALL.txt for more<br>
information.<br>
<br>
----------------------------------------------------------------------<br>
Ran 3533 tests in 13.400s<br>
<br>
<br>
Any suggestions on how to fix this?<br>
<span class="HOEnZb"></span></blockquote><div><br>I assume you have g77 installed and on your PATH. If so, try moving it off your path. <br><br>Ralf<br> <br></div></div><br>