[Numpy-discussion] Preferring gfortran over g77 on OS X and other distributions?

Ralf Gommers ralf.gommers at googlemail.com
Wed Jun 27 16:46:49 EDT 2012


On Mon, Jun 18, 2012 at 9:47 AM, Aron Ahmadia <aron at ahmadia.net> wrote:

> f2py, by default, seems to prefer g77 (no longer maintained, deprecated,
> speedy, doesn't support Fortran 90 or Fortran 95) over gfortran
> (maintained, slower, Fortran 90 and Fortran 95 support).
>
> This causes problems when we try to compile Fortran 90 extensions using
> f2py on platforms where both g77 and gfortran are installed without
> manually switching the compiler's flags.  It is a very minor edit to the
> fcompiler/__init__.py file to prefer gfortran over g77 on OS X, and I can
> think of almost no reason not to do so, since the Vectorize framework (OS X
> tuned LAPACK/BLAS) appears to be ABI compatible with gfortran.  I am not
> sure what the situation is on the distributions that numpy is trying to
> support, but my feeling is that g77 should not be preferred when gfortran
> is available.
>

On Windows g77 is still the default. But indeed, on OS X gfortran is the
recommended Fortran compiler. A PR for this would be useful.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120627/917cc668/attachment.html>


More information about the NumPy-Discussion mailing list