[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: F77 vs. F90 in Octave

From: Daniel J Sebald
Subject: Re: F77 vs. F90 in Octave
Date: Mon, 24 Nov 2014 15:02:16 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 11/24/2014 02:52 PM, Mike Miller wrote:
On Mon, Nov 24, 2014 at 12:28:21 -0800, Rik wrote:
On 11/24/2014 11:33 AM, Daniel J Sebald wrote:
That is, if we want gfortran to have precedence, then we would define
(using the example at the above link)

           AC_PROG_F77([gfortran fl32 f77 fort77 xlf g77 f90 xlf90])

So, perhaps that is a better solution than using the stream editor to
replace g77.

I think this is a fine idea.  Eliminate all the weird hacks with sed in
favor of just listing our preference.

The main problem with listing our preferred compiler like this is that
it discards the curated list of supported compilers that Autoconf
gives us today. So from a portability point of view, we would be
throwing away the autodetection of xlf95, ifort, pgf95, etc, (just
picking some random examples) that we inherit from Autoconf.

There is no way (that I know of) to set our preferred compiler without
specifying the entire list of compilers to try, to put it another way.
Other than the bootstrap_epilogue function that we currently use.

That's correct. But I just found out how to view what AC's preferred list is. gfortran is now at the front of the list. The fact that g77 isn't even in their list, I think means that we don't even have to worry about any problem that the stream-editor epilogue script was attempting to solve. That is, the comment

  ## FIXME -- we should really work to fix autoconf so that it prefers
  ## gfortran over g77 even when searching for a Fortran 77 compiler.

has been implemented apparently.

And I'm not sure we want to rely on luck regarding a compiler that handles
both F77 and F90.  I see several choices: 1) Change Jaroslav's code to be
F77-compliant, 2) Change the extension on Jaroslav's files to .f90, but we
would potentially then need to use the AC_PROG_FC macro and get that
working to handle the F90 stuff with a different compiler, 3) Switch
completely over to AC_PROG_FC, but this assumes that any compiler chosen
will be able to compile both F77 and F90 code, 4) force use of gfortran.

I have no idea how valid it is, but Autoconf's working assumption
seems to be that a F95 compiler will also support F90 and F77, and an
F90 compiler will also support F77.

FORTRAN compatibility I don't know about. I know that C has remained backward compatible, even going to C++.

5) Stick with what we have today, compile all Fortran files with
$(F77) as if they were valid F77, and deal with problems in Jaroslav's
code if any bugs are ever encountered and reported.

I think fixing bugs as we encounter is fine, whatever the configuration. There can't be that many.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]