[Top][All Lists]

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

Re: F77 vs. F90 in Octave

From: Rik
Subject: Re: F77 vs. F90 in Octave
Date: Mon, 24 Nov 2014 09:52:39 -0800

On 11/24/2014 09:36 AM, Daniel J Sebald wrote:
> On 11/24/2014 11:02 AM, Rik wrote:
>> A quick check for F90 features shows that>  95% is written in F77.  The
>> exceptions are some files in blas-xtra and lapack-xtra written by Jaroslav
>> that seem to be in a mostly F77 syntax, but with a few F95 features.
> Is the F95 code using a different compiler then?  Or maybe same compiler
> but a compatibility flag?  How is it compiling if FC=$F77?

As far as I can see, we've simply been getting lucky.  The Fortran compiler
on most Linux systems is gfortran which can compile both F77 and F90 code.

> I guess I'd prefer to stick to the autotools method as much as possible.
>  In README.MacOS it describes
> The commands below are sufficient to build a 32-bit Octave.
>   export FC="/usr/bin/gfortran"
> ...
> However, if the make file does FC=$F77, isn't that overriding the ability
> to specify the compiler via the environment variable FC?  I see that as
> important because what if someone is compiling the code for a CPU target
> other than the system the compilation is done on?  I suppose someone
> could also add
>   export F77="xyz"
> Still, I'd stay as close as possible to autoconf, and if it is necessary
> to deviate, write a comment along with the deviation.

The autotools just set up the defaults and write them to the Makefile. 
'make' itself looks at the Makefile, environment variables, and any
overrides given on the command line to decide what value to use for a
variable.  Environment variables override the defaults in the Makefile and
this is standard practice.


reply via email to

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