Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* g77 issues
@ 2001-04-19  7:36 Ionut Georgescu
  2001-04-19 12:51 ` MCGWIER ROBERT
  2001-04-19 15:09 ` David Woodhouse
  0 siblings, 2 replies; 8+ messages in thread
From: Ionut Georgescu @ 2001-04-19  7:36 UTC (permalink / raw)
  To: debian-ports; +Cc: axp-list, gcc-bugs


The purpose is to compute the following expression:

      enfer= 1.3058750148074976d0
      entmp = 0.093822912209640966d0
      enpct = -2.2021424321973448d0
      
      tfermi = 1.0d0/(dexp((enpct-enfer)/entmp)+1.0d0)


The problem is the following. With a small test programm, the result is
always correct, on any platform with any compiler. If I take the tfermi
line and copy it into a bigger programm, then the results are false. This
happens on x86 with g77. On alpha it seems to be OK, both with fort and
g77. The results are again different if, on x86, Portland's pgf77 is used.

Are there any known issues with dexp ? It's very hard to reproduce this
since it happens only in big programms, even if those variables are
hardcoded !!

I have tested this both on the local cluster and on testdrive at
compaq(RedHat). The results were exactly the same (alpha<->alpha,
x86<->x86)


Regards,
Ionut

PS command line: g77 -g -pg -o programm *.f
PPS gcc -v:
    Reading specs from /usr/lib/gcc-lib/alpha-linux/2.95.3/specs
    gcc version 2.95.3 20010315 (Debian release)
PPS I made another test. In the big programm I have defined a function
fermi2:

**************************************
      real*8 function fermi2(enpc)

      implicit real*8 (a-h,o-z)
      common /list4/enfer,entmp

      tmp = 1.0d0/(dexp((enpc-enfer)/entmp)+1.0d0)
      print*,'tmp_fermi2(',enpc,')=',tmp
      fermi2=tmp
      
      return
      end
*******************************

and computed the following expression:
   
          aux22= 1.0d0-fermi2(enpct)

The output was:

on x86:	
 tmp_fermi2( -2.20214243)=  1.
 aux22=  1.11022302E-16  !! should have been 0. !!

on alpha:
 tmp_fermi2( -2.20214243)=  1.
 aux22=  0.

***************
* Ionut Georgescu      
* http://www.physik.tu-cottbus.de/~george/
* ICQ: 38973105
* "In Windows you can do everything Microsoft wants you to do; in Unix you
*                can do anything the computer is able to do."






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: g77 issues
  2001-04-19  7:36 g77 issues Ionut Georgescu
@ 2001-04-19 12:51 ` MCGWIER ROBERT
  2001-04-19 15:03   ` Ionut Georgescu
  2001-04-19 15:09 ` David Woodhouse
  1 sibling, 1 reply; 8+ messages in thread
From: MCGWIER ROBERT @ 2001-04-19 12:51 UTC (permalink / raw)
  To: axp-list

How are enfer, entmp, and enpct declared?
Are they in fact real*16?

Bob

----- Original Message -----
From: "Ionut Georgescu" <george@physik.tu-cottbus.de>
To: <debian-ports@lists.debian.org>
Cc: <axp-list@redhat.com>; <gcc-bugs@gcc.gnu.org>
Sent: Thursday, April 19, 2001 3:36 AM
Subject: g77 issues


>
>
> The purpose is to compute the following expression:
>
>       enfer= 1.3058750148074976d0
>       entmp = 0.093822912209640966d0
>       enpct = -2.2021424321973448d0
>
>       tfermi = 1.0d0/(dexp((enpct-enfer)/entmp)+1.0d0)
>
>
> The problem is the following. With a small test programm, the result is
> always correct, on any platform with any compiler. If I take the tfermi
> line and copy it into a bigger programm, then the results are false. This
> happens on x86 with g77. On alpha it seems to be OK, both with fort and
> g77. The results are again different if, on x86, Portland's pgf77 is used.
>
> Are there any known issues with dexp ? It's very hard to reproduce this
> since it happens only in big programms, even if those variables are
> hardcoded !!
>
> I have tested this both on the local cluster and on testdrive at
> compaq(RedHat). The results were exactly the same (alpha<->alpha,
> x86<->x86)
>
>
> Regards,
> Ionut
>
> PS command line: g77 -g -pg -o programm *.f
> PPS gcc -v:
>     Reading specs from /usr/lib/gcc-lib/alpha-linux/2.95.3/specs
>     gcc version 2.95.3 20010315 (Debian release)
> PPS I made another test. In the big programm I have defined a function
> fermi2:
>
> **************************************
>       real*8 function fermi2(enpc)
>
>       implicit real*8 (a-h,o-z)
>       common /list4/enfer,entmp
>
>       tmp = 1.0d0/(dexp((enpc-enfer)/entmp)+1.0d0)
>       print*,'tmp_fermi2(',enpc,')=',tmp
>       fermi2=tmp
>
>       return
>       end
> *******************************
>
> and computed the following expression:
>
>           aux22= 1.0d0-fermi2(enpct)
>
> The output was:
>
> on x86:
>  tmp_fermi2( -2.20214243)=  1.
>  aux22=  1.11022302E-16  !! should have been 0. !!
>
> on alpha:
>  tmp_fermi2( -2.20214243)=  1.
>  aux22=  0.
>
> ***************
> * Ionut Georgescu
> * http://www.physik.tu-cottbus.de/~george/
> * ICQ: 38973105
> * "In Windows you can do everything Microsoft wants you to do; in Unix you
> *                can do anything the computer is able to do."
>
>
>
>
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
>




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: g77 issues
  2001-04-19 12:51 ` MCGWIER ROBERT
@ 2001-04-19 15:03   ` Ionut Georgescu
  0 siblings, 0 replies; 8+ messages in thread
From: Ionut Georgescu @ 2001-04-19 15:03 UTC (permalink / raw)
  To: axp-list

Ionut Georgescu sends greetings to MCGWIER ROBERT

>How are enfer, entmp, and enpct declared?
>Are they in fact real*16?

everything is real*8 .

>
>Bob
>
>----- Original Message -----
>From: "Ionut Georgescu" <george@physik.tu-cottbus.de>
>To: <debian-ports@lists.debian.org>
>Cc: <axp-list@redhat.com>; <gcc-bugs@gcc.gnu.org>
>Sent: Thursday, April 19, 2001 3:36 AM
>Subject: g77 issues
>
>
>>
>>
>> The purpose is to compute the following expression:
>>
>>       enfer= 1.3058750148074976d0
>>       entmp = 0.093822912209640966d0
>>       enpct = -2.2021424321973448d0
>>
>>       tfermi = 1.0d0/(dexp((enpct-enfer)/entmp)+1.0d0)
>>
>>
>> The problem is the following. With a small test programm, the result is
>> always correct, on any platform with any compiler. If I take the tfermi
>> line and copy it into a bigger programm, then the results are false. This
>> happens on x86 with g77. On alpha it seems to be OK, both with fort and
>> g77. The results are again different if, on x86, Portland's pgf77 is used.
>>
>> Are there any known issues with dexp ? It's very hard to reproduce this
>> since it happens only in big programms, even if those variables are
>> hardcoded !!
>>
>> I have tested this both on the local cluster and on testdrive at
>> compaq(RedHat). The results were exactly the same (alpha<->alpha,
>> x86<->x86)
>>
>>
>> Regards,
>> Ionut
>>
>> PS command line: g77 -g -pg -o programm *.f
>> PPS gcc -v:
>>     Reading specs from /usr/lib/gcc-lib/alpha-linux/2.95.3/specs
>>     gcc version 2.95.3 20010315 (Debian release)
>> PPS I made another test. In the big programm I have defined a function
>> fermi2:
>>
>> **************************************
>>       real*8 function fermi2(enpc)
>>
>>       implicit real*8 (a-h,o-z)
>>       common /list4/enfer,entmp
>>
>>       tmp = 1.0d0/(dexp((enpc-enfer)/entmp)+1.0d0)
>>       print*,'tmp_fermi2(',enpc,')=',tmp
>>       fermi2=tmp
>>
>>       return
>>       end
>> *******************************
>>
>> and computed the following expression:
>>
>>           aux22= 1.0d0-fermi2(enpct)
>>
>> The output was:
>>
>> on x86:
>>  tmp_fermi2( -2.20214243)=  1.
>>  aux22=  1.11022302E-16  !! should have been 0. !!
>>
>> on alpha:
>>  tmp_fermi2( -2.20214243)=  1.
>>  aux22=  0.
>>
>> ***************
>> * Ionut Georgescu
>> * http://www.physik.tu-cottbus.de/~george/
>> * ICQ: 38973105
>> * "In Windows you can do everything Microsoft wants you to do; in Unix you
>> *                can do anything the computer is able to do."
>>
>>
>>
>>
>>
>> _______________________________________________
>> Axp-list mailing list
>> Axp-list@redhat.com
>> https://listman.redhat.com/mailman/listinfo/axp-list
>>
>
>
>
>_______________________________________________
>Axp-list mailing list
>Axp-list@redhat.com
>https://listman.redhat.com/mailman/listinfo/axp-list
>

***************
* Ionut Georgescu      
* http://www.physik.tu-cottbus.de/~george/
* ICQ: 38973105
* "In Windows you can do everything Microsoft wants you to do; in Unix you
*                can do anything the computer is able to do."





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: g77 issues
       [not found] <20010419120348.A26784@lambda.u-strasbg.fr>
@ 2001-04-19 15:08 ` Ionut Georgescu
  0 siblings, 0 replies; 8+ messages in thread
From: Ionut Georgescu @ 2001-04-19 15:08 UTC (permalink / raw)
  To: Sven LUTHER; +Cc: Nick Bailey, axp-list, debian-alpha

Ionut Georgescu sends greetings to Sven LUTHER

>On Thu, Apr 19, 2001 at 10:50:34AM +0100, Nick Bailey wrote:
>

I do know that, but, does one really need 64bit to 'resolve' e-16 ? And,
why does the print* in the fermi function print out 1.0 at the first place
? I expect that the function returns 1., as it is printed out, not
.999999999999998 ;-)


>Also, note that alpha is a 64bit plateform, and that as thus it could be that
>it handles some things better than ia32 or ppc. Not sure if this influences
>floating point values, i guess not.
>
>Friendly,
>
>Sven Luther
>
>
>-- 
>To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org
>with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>

***************
* Ionut Georgescu      
* http://www.physik.tu-cottbus.de/~george/
* ICQ: 38973105
* "In Windows you can do everything Microsoft wants you to do; in Unix you
*                can do anything the computer is able to do."





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: g77 issues
  2001-04-19  7:36 g77 issues Ionut Georgescu
  2001-04-19 12:51 ` MCGWIER ROBERT
@ 2001-04-19 15:09 ` David Woodhouse
  2001-04-19 16:38   ` Ionut Georgescu
  1 sibling, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2001-04-19 15:09 UTC (permalink / raw)
  To: axp-list

You're just winding me up because I said people don't report bugs in GCC 
when it doesn't compile FORTRAN properly, aren't you? :)

--
dwmw2





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: g77 issues
  2001-04-19 15:09 ` David Woodhouse
@ 2001-04-19 16:38   ` Ionut Georgescu
  2001-04-19 16:51     ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: Ionut Georgescu @ 2001-04-19 16:38 UTC (permalink / raw)
  To: axp-list

Ionut Georgescu sends greetings to David Woodhouse

if i remember GCC means the GNU Compiler Collection, doesn't it ? :))

>
>You're just winding me up because I said people don't report bugs in GCC 
>when it doesn't compile FORTRAN properly, aren't you? :)
>
>--
>dwmw2
>
>
>
>
>_______________________________________________
>Axp-list mailing list
>Axp-list@redhat.com
>https://listman.redhat.com/mailman/listinfo/axp-list
>

***************
* Ionut Georgescu      
* http://www.physik.tu-cottbus.de/~george/
* ICQ: 38973105
* "In Windows you can do everything Microsoft wants you to do; in Unix you
*                can do anything the computer is able to do."





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: g77 issues
  2001-04-19 16:38   ` Ionut Georgescu
@ 2001-04-19 16:51     ` David Woodhouse
  2001-04-19 22:16       ` Christopher C. Chimelis
  0 siblings, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2001-04-19 16:51 UTC (permalink / raw)
  To: axp-list

george@physik.tu-cottbus.de said:
>  if i remember GCC means the GNU Compiler Collection, doesn't it ? :)) 

It does now. I just _knew_ when I wrote it that someone was going to prove 
me wrong :) I should have picked a more obscure language; like Modula-3.

Speaking of which - has anyone looked at bootstrapping M3 on Alpha/Linux 
recently?

--
dwmw2





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: g77 issues
  2001-04-19 16:51     ` David Woodhouse
@ 2001-04-19 22:16       ` Christopher C. Chimelis
  0 siblings, 0 replies; 8+ messages in thread
From: Christopher C. Chimelis @ 2001-04-19 22:16 UTC (permalink / raw)
  To: axp-list

On Thu, 19 Apr 2001, David Woodhouse wrote:

> It does now. I just _knew_ when I wrote it that someone was going to prove 
> me wrong :) I should have picked a more obscure language; like Modula-3.
> 
> Speaking of which - has anyone looked at bootstrapping M3 on Alpha/Linux 
> recently?

Not in the past 8 months or so.  I need to get GNAT compiled first (since
I volunteered to try), then I'll look at M3...

C




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-04-19 22:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-19  7:36 g77 issues Ionut Georgescu
2001-04-19 12:51 ` MCGWIER ROBERT
2001-04-19 15:03   ` Ionut Georgescu
2001-04-19 15:09 ` David Woodhouse
2001-04-19 16:38   ` Ionut Georgescu
2001-04-19 16:51     ` David Woodhouse
2001-04-19 22:16       ` Christopher C. Chimelis
     [not found] <20010419120348.A26784@lambda.u-strasbg.fr>
2001-04-19 15:08 ` Ionut Georgescu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox