This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: A Bug of gfortran, g77 and g95 on default optimization
- From: "Sunjoong Lee" <sunjoong at gmail dot com>
- To: "Tobias Burnus" <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org
- Date: Tue, 19 Jun 2007 00:08:22 +0900
- Subject: Re: A Bug of gfortran, g77 and g95 on default optimization
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pyEzq1SGI9m5XJ1pQFgMLn7lH/d32nioL3m8pTjiGOp/liq1raZ1XRQTXjfBKqR/45WTV11m38fbM21sWAqtnBrjnQGm1aMX6W9PpTRcWYkwnMdPqiruEPKr2n4010qS5p2GPOEW5eDSUar+lFV47USUo9z8odDVA2iGQ3NrkXg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gfb+mrn4mrj0jfsKUVTbS4t14CpxpJQpiFsw8+HieoiKpmN+MAPDITZ3ug3eKJCvhTQnDcGWbc5BwpAkFFFPkSq821x41s1yMJf3C/Wsv1oBCB+lpXAqCxN9yYd5OICwrCZ5He91ei9Hk8YXCwKQP5Fm4utWs6ZaVKq6kJkhSB8=
- References: <963c45680706180629q390ff8d9q461bd08febd8874e@mail.gmail.com> <963c45680706180637v5e3bc18co54005f7c1d201e5a@mail.gmail.com> <467690BD.7040006@net-b.de>
Thank you, Tobias
I had missunderstood the default optimization level for gfortran
but the issue exists, I think.
I had traced side effects of optimization levels for the legacy program;
-O0 level and -O1 level were different
but from -O1 to -O3 gave same (wrong) results on gfortran, g77 and g95.
I tested it with pgi fortran and got same (right) results.
I checked gfortran 4.0.4, 4.1.2 and 4.2.0.
I did not check gfortran 4.3.
2007/6/18, Tobias Burnus <burnus@net-b.de>:
Sunjoong Lee wrote:
> I had compiled a legacy fortran77 code and foud a bug;
> $ gfortran -o TMalign TMalign.f
> $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali
> Aligned length= 89, RMSD= 6.41, TM-score= 0.24257, ID=0.042
> $ gfortran -O0 -o TMalign TMalign.f
> $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali
> Aligned length= 91, RMSD= 6.35, TM-score=0.24762 , ID=0.024
I find this difference very odd as "-O0" is the default optimization for
gfortran. Other than that I get always the same result ("91") with all
-O levels I tried with gfortran 4.3, 4.2.0, 4.1.3 and ifort.
Which version of the compiler are you using on which platform. (Use
"gfortran -v" to shows this information.)
Can you also show what "alias gfortran" (or "type gfortran") shows? Just
to make sure there is no alias which adds options.
Tobias