[Numpy-discussion] Forcing the use of -lgfortran

Andreas Klöckner lists at informa.tiker.net
Sun Apr 6 01:36:05 EDT 2008


I can answer my own question now:

1) Option --fcompiler=gnu95
2) Add the following to site.cfg

[atlas]
library_dirs = /users/kloeckner/mach/x86_64/pool/lib,/usr/lib
atlas_libs = lapack, f77blas, cblas, atlas

Andreas

On Sonntag 06 April 2008, Andreas Klöckner wrote:
> Hi all,
>
> I'm having trouble getting numpy to compile something usable on a cluster
> I'm using, in particular I see
>
> 8< -----------------------------------------------------
> ImportError:
> /users/kloeckner/mach/x86_64/pool/lib/python2.5/site-packages/numpy/linalg/
>lapack_lite.so: undefined symbol: _gfortran_st_write
> 8< -----------------------------------------------------
>
> Key point: I need -lgfortran on the link command line, or else I get
> unresolved symbols stemming from my LAPACK library.
>
> But even if I add this:
>
> 8< -----------------------------------------------------
> [blas_opt]
> libraries = f77blas, cblas, atlas,gfortran
> library_dirs = /users/kloeckner/mach/x86_64/pool/lib
> include_dirs = /users/kloeckner/mach/x86_64/pool/include
> #
> [lapack_opt]
> libraries = lapack, f77blas, cblas, atlas,gfortran
> library_dirs = /users/kloeckner/mach/x86_64/pool/lib
> 8< -----------------------------------------------------
>
> to site.cfg, numpy seemingly ignores this request and uses ATLAS's ptblas
> instead (which I positively do *not* want it to use). How can I fix this?
>
> This is what I get for __config__.py:
>
> 8< -----------------------------------------------------
> blas_opt_info={'libraries': ['ptf77blas', 'ptcblas', 'atlas'],
> 'library_dirs': ['/users/kloeckner/mach/x86_64/pool/lib'], 'language': 'c',
>  'define_macros': [('ATLAS_INFO', '"\\"3.8.1\\""')], 'include_dirs':
> ['/users/kloeckner/mach/x86_64/pool/include']}
> atlas_blas_threads_info={'libraries':
> ['ptf77blas', 'ptcblas', 'atlas'], 'library_dirs':
> ['/users/kloeckner/mach/x86_64/pool/lib'], 'langu
> age': 'c', 'include_dirs': ['/users/kloeckner/mach/x86_64/pool/include']}
> lapack_opt_info={'libraries':
> ['lapack', 'ptf77blas', 'ptcblas', 'atlas'], 'library_dirs':
> ['/users/kloeckner/mach/x86_64/pool/lib'], 'lan
> guage': 'f77', 'define_macros':
> [('ATLAS_INFO', '"\\"3.8.1\\""')], 'include_dirs':
> ['/users/kloeckner/mach/x86_64/pool/include']}
> 8< -----------------------------------------------------
>
> Thanks,
> Andreas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080406/e0d69bc9/attachment.sig>


More information about the NumPy-Discussion mailing list