![](https://secure.gravatar.com/avatar/7b85b9520dc007ec2b9bb2077fcb2a43.jpg?s=120&d=mm&r=g)
My own preference would be to use g77 or some other Fortran 77 compiler, not gfortran, to compile BLAS and LAPACK. My reasons are (1) LAPACK and BLAS are written in Fortran 77; (2) the gcc-4 is generally considered to be somewhat less trustworthy than much more mature gcc-3; and gfortran is entirely new with gcc-4, while g77 is ancient and well-tested; and (3) gfortran is particularly new. Perhaps I express the obvious when I say that g77 and gfortran are frontends for gcc; g77 compiles Fortran 77; gfortran compiles a GNU implementation, somewhat partial and peculiar, so I understand, of Fortran 95. It is supposed to be compatible with Fortran 77, but so far as I know, nobody has really used it very much. My impression is that post-77 versions of Fortran are regarded with some degree of suspicion for pure, fast numerics, so why complicate the compilation of LAPACK and BLAS with these issues? I might be more willing to try gfortran if it had some sort of flag to optimize pure Fortran 77 code. Concerning slow compilation on the native Suse compiler: am I wrong, or is Suse compiled for the i386? If you are running on an i686, you would achieve faster compilation if you built gcc optimized for your machine's architecture. I have built gcc-3.4.5 from source both on Linux and AIX, and I didn't find it terribly painful in either case. However, if you don't do much compilation, it probably wouldn't be worth the trouble. Mark F. Morss Principal Analyst, Market Risk American Electric Power "Nils Wagner" <nwagner@mecha.un i-stuttgart.de> To Sent by: SciPy Users List scipy-user-bounce <scipy-user@scipy.net> s@scipy.net cc Subject 02/28/2006 06:32 Re: [SciPy-user] ATLAS and gcc AM v4.0.2 Please respond to SciPy Users List <scipy-user@scipy .net> On Tue, 28 Feb 2006 19:20:55 +0900 Christian Kristukat <ckkart@hoc.net> wrote:
Nils Wagner wrote:
SuSE 10.0 comes with gcc-fortran
Name : gcc-fortran Relocations:
You're right. But the executable is called 'gfortran'. I mixed that up.
I have already build blas and lapack libraries using g77 according to the installation hints.
Can I use them or must I recompile blas and lapack with gfortran ?
I'm not an expert on this subject, just sharing my experiences. If you're using ATLAS you don't need BLAS as far as I understood. I followed the instructions in the link I posted before. Compared to the compilation time of ATLAS, LAPACK builds almost instantaneously, so it doesn't hurt to rebuild LAPACK, I just don't know wether g77 built LAPACK works together with gfortran ATLAS. At least I know, that if you're using gfrotran all the time, everything works fine on SuSE 10.0.
Good luck, Christian
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
I followed your advice and rebuilt blas and lapack using gfortran. Compilation of ATLAS seems to work. Also I have build a complete lapack http://math-atlas.sourceforge.net/errata.html#completelp I am on SuSE 10.0 x86_64 GNU/Linux However python setup.py build failed Running from numpy source directory. Warning: not existing path in numpy/distutils: site.cfg No module named __svn_version__ F2PY Version 2_2179 blas_opt_info: blas_mkl_info: /usr/local/svn/numpy/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['mkl', 'vml', 'guide'] found_libs=[] warnings.warn("Library error: libs=%s found_libs=%s" % \ NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLAS /usr/local/svn/numpy/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['ptf77blas', 'ptcblas', 'atlas'] found_libs=[] warnings.warn("Library error: libs=%s found_libs=%s" % \ /usr/local/svn/numpy/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['ptf77blas', 'ptcblas', 'atlas'] found_libs=['/usr/local/lib/atlas/libatlas.a'] warnings.warn("Library error: libs=%s found_libs=%s" % \ NOT AVAILABLE atlas_blas_info: /usr/local/svn/numpy/numpy/distutils/system_info.py:531: UserWarning: Library error: libs=['f77blas', 'cblas', 'atlas'] found_libs=[] warnings.warn("Library error: libs=%s found_libs=%s" % \ FOUND: libraries = ['f77blas', 'cblas', 'atlas'] library_dirs = ['/usr/local/lib/atlas'] language = c running build_src building extension "atlas_version" sources creating build creating build/src adding 'build/src/atlas_version_0x5b360788cdd9eddc.c' to sources. running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext building 'atlas_version' extension compiling C sources gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fPIC' creating build/temp.linux-x86_64-2.4 creating build/temp.linux-x86_64-2.4/build creating build/temp.linux-x86_64-2.4/build/src compile options: '-Inumpy/core/include -I/usr/include/python2.4 -c' gcc: build/src/atlas_version_0x5b360788cdd9eddc.c gcc -pthread -shared build/temp.linux-x86_64-2.4/build/src/atlas_version_0x5b360788cdd9eddc.o -L/usr/local/lib/atlas -lf77blas -lcblas -latlas -o build/temp.linux-x86_64-2.4/atlas_version.so /usr/lib64/gcc/x86_64-suse-linux/4.0.2 /../../../../x86_64-suse-linux/bin/ld: /usr/local/lib/atlas/libatlas.a(ATL_buildinfo.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/atlas/libatlas.a: could not read symbols: Bad value collect2: ld returned 1 exit status /usr/lib64/gcc/x86_64-suse-linux/4.0.2 /../../../../x86_64-suse-linux/bin/ld: /usr/local/lib/atlas/libatlas.a(ATL_buildinfo.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/atlas/libatlas.a: could not read symbols: Bad value collect2: ld returned 1 exit status ##### msg: error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.4/build/src/atlas_version_0x5b360788cdd9eddc.o -L/usr/local/lib/atlas -lf77blas -lcblas -latlas -o build/temp.linux-x86_64-2.4/atlas_version.so" failed with exit status 1 error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.4/build/src/atlas_version_0x5b360788cdd9eddc.o -L/usr/local/lib/atlas -lf77blas -lcblas -latlas -o build/temp.linux-x86_64-2.4/atlas_version.so" failed with exit status 1 FOUND: libraries = ['f77blas', 'cblas', 'atlas'] library_dirs = ['/usr/local/lib/atlas'] language = c define_macros = [('NO_ATLAS_INFO', 2)] Warning: distutils distribution has been initialized, it may be too late to add an extension _dotblas Traceback (most recent call last): File "setup.py", line 76, in ?x86_64 GNU/Linux setup_package() File "setup.py", line 63, in setup_package config.add_subpackage('numpy') File "/usr/local/svn/numpy/numpy/distutils/misc_util.py", line 592, in add_subpackage config_list = self.get_subpackage(subpackage_name,subpackage_path) File "/usr/local/svn/numpy/numpy/distutils/misc_util.py", line 582, in get_subpackage subpackage_path) File "/usr/local/svn/numpy/numpy/distutils/misc_util.py", line 539, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "/usr/local/svn/numpy/numpy/setup.py", line 10, in configuration config.add_subpackage('core') File "/usr/local/svn/numpy/numpy/distutils/misc_util.py", line 592, in add_subpackage config_list = self.get_subpackage(subpackage_name,subpackage_path) File "/usr/local/svn/numpy/numpy/distutils/misc_util.py", line 582, in get_subpackage subpackage_path) File "/usr/local/svn/numpy/numpy/distutils/misc_util.py", line 539, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "numpy/core/setup.py", line 217, in configuration config.add_data_dir('tests') File "/usr/local/svn/numpy/numpy/distutils/misc_util.py", line 636, in add_data_dir self.add_data_files((ds,filenames)) File "/usr/local/svn/numpy/numpy/distutils/misc_util.py", line 702, in add_data_files dist.data_files.extend(data_dict.items()) AttributeError: 'NoneType' object has no attribute 'extend' Any suggestion ? Nils _______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user