[SciPy-Dev] PR for bounded linear least squares

Sturla Molden sturla.molden at gmail.com
Tue Mar 18 05:25:48 EDT 2014


Skipper Seabold <jsseabold at gmail.com> wrote:

> I guess I have a question. Does anyone have an option on the best way
> forward for the Fortran 90 code? We have to stick to Fortran 77 code,
> unfortunately, so my options are to either fix the code incrementally
> for F77 or ... ? 

It is basically undoable. Do you know Fortran 77 that well? 

I learned Fortran 90 about 20 years ago. I couldn't write valid Fortran 77
even if I wanted to — even though I am fluent in Fortran 90. And that is
probably the case for most scientists that use Fortran today. 

If you tried, you would even have to change loops into gotos. Good luck on
that...

Coding Fortran 77 in 2014 is not worth the effort.


> What do people think about using f2c to generate and
> include C code? I've never done this before, and I assume it comes
> with its own can of worms.

This will not help you out.

f2c is a Fortran 77 compiler. 

f2c and g77 was written by the same person (as one-man projects), and they
basically do the same except for what they emit (C or machine code,
respectively). The original f77 compiler was a shell script that invoked
f2c and system cc. g77 came along because pointer aliasing prevented C
compilers from doing certain optimizations (e.g. register allocation). With
a modern C compiler it is probably better to use f2c than the g77 compiler,
but it will still be inferior to modern Fortran compilers (gfortran, ifort,
absoft).

Sturla




More information about the SciPy-Dev mailing list