octave-maintainers
[Top][All Lists]
Advanced

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

Re: Fortran optimization flags


From: Rik
Subject: Re: Fortran optimization flags
Date: Wed, 03 Jun 2015 10:44:25 -0700

On 05/08/2015 09:00 AM, address@hidden wrote:
Subject:
Minor question about optimization flags in ./configure
From:
José Luis García Pallero <address@hidden>
Date:
05/08/2015 07:45 AM
To:
Octave Maintainers <address@hidden>
List-Post:
<mailto:address@hidden>
Content-Transfer-Encoding:
quoted-printable
Precedence:
list
MIME-Version:
1.0
Message-ID:
<address@hidden>
Content-Type:
text/plain; charset=ISO-8859-1
Message:
1

Hello:

I've seen (octave 4.0.0 rc4) that after the ./configure step, the
C/C++ compiling order contains the -O2 optimization flags but the
Fortran one contains only the -O. Is there any reason in order to not
use the -O2 flag in Fortran by default?

I think originally there may have been.  For some platforms there wasn't actually a Fortran compiler, rather there was only a Fortran-to-C translator and then the C code was compiled.  In that case it was easier for the C compiler to perform optimization if the input code was relatively straightforward and had not already been optimized.

But, I would say that this situation has now passed.  Most distributions, including our MXE distribution for Windows, use gfortran and it accepts -O2.  I know that I, personally, have been using -O2 in FFLAGS for several years and never had a problem.

I think if jwe is okay with it then we should change the default optimization flags on the development branch.

Also the gcc and g++ calls contain the -g flag in order to generate
debug symbols, but it is not used in the Fortran call. About the
performance for a normal user (not a developer), has -g any impact?

Someone else will need to speak to this.  I think that during install the binaries may be stripped anyways so that the '-g' isn't really useful.  I know that personally I have a debugging source tree where I compile with '-g' and an ordinary tree where I don't use the '-g' flag.  I always install versions from the tree without '-g'.

--Rik


reply via email to

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