[Numpy-discussion] How to tell numpy to use gfortran as a compiler ?
Sun Feb 25 08:43:03 CST 2007
> Robert Kern wrote:
> But now, I think I misunderstand some things : I thought that g77 was
> the 3.* version of the fortran compiler, and gfortran the 4.* one. But
> it looks like they are also different in the fortran dialect they are
> supporting (I know nothing about fortran). So should I use gfortran at
> all to compile the fortran wrapper for BLAS/LAPACK by ATLAS ? Or should
> I use g77 ? How can I be sure then that I won't have problems using gcc
> 3* serie for Fortran and gcc 4* serie for everything else (C, C++ and
> most if not all libraries compiled on my system) ?
g77 is a Fortran 77 compiler. The development of g77 is halted.
gfortran is a Fortran 77, 90, and 95 compiler. It is the current Fortran
compiler in the GNU Compiler Collection (GCC).
You can compile the reference implementation of BLAS and LAPACK with both
g77 and gfortran, as these libraries are written in Fortran 77. ATLAS is
written in C and some Fortran 77.
gfortran are able to do some optimizations that g77 cannot, e.g.
autovectorization using SSE and MMX extensions and profile-guided
optimizations. Also be aware that if you use gfortran and GCC 4, the C
compiler is better as well.
There is a third Fortran compiler based on the GCC backend called "g95".
It is not a part of GCC and uses copyrighted source code illegally
(numerous GPL violations). The head developer is rumored to have serious
bad karma. Apart from that, g95 is an ok Fortran 95 compiler. Always
ensure that ambiguous switches like "gnu95" means gfortran and not g95. I
don't know what NumPy does.
More information about the Numpy-discussion