Re: cygwin gcc: Different numerical results in thread vs in main()

2008-08-04 Thread Angelo Graziosi
Brian Dessent wrote: Angelo Graziosi wrote: ... and in Fortran? As long as you're using a recent gcc you can just use -mpc64. How recent? With GFortran 4.3.1 and $ cat test_case.0.f90 program test_case implicit none integer :: k integer, parameter :: DP = kind(1.D0),& N = 2

Re: cygwin gcc: Different numerical results in thread vs in main()

2008-08-04 Thread Brian Dessent
Angelo Graziosi wrote: > ... and in Fortran? As long as you're using a recent gcc you can just use -mpc64. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ:

RE: cygwin gcc: Different numerical results in thread vs in main()

2008-08-04 Thread Angelo Graziosi
Dave Korn wrote: Take a look at the (legendary) GCC PR323: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 ... and in particular comment #60: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323#c60 ... which has a bit of code you can adapt (google for the definition of _FPU_SETCW, it's an inline a

RE: cygwin gcc: Different numerical results in thread vs in main()

2008-08-04 Thread Mike Marchywka
> From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED]; cygwin@cygwin.com > Date: Mon, 4 Aug 2008 09:40:36 -0700 > Subject: RE: cygwin gcc: Different numerical results in thread vs in main() > > 1) The result from the within thread calculation matches my Mac output (note > th

RE: cygwin gcc: Different numerical results in thread vs in main()

2008-08-04 Thread Richard Stanton
nt: Monday, August 04, 2008 8:06 AM To: Richard Stanton; cygwin@cygwin.com Subject: RE: cygwin gcc: Different numerical results in thread vs in main() > Try compiling with -ffloat-store then report back. google for > "float-store excess precision gcc" to understand why th

RE: cygwin gcc: Different numerical results in thread vs in main()

2008-08-04 Thread Dave Korn
Richard Stanton wrote on 04 August 2008 15:29: > Thanks for the helpful information, David. Oddly, -ffloat-store doesn't > seem to make any difference: No, unfortunately it can't be assumed to; it'll only come into play if the results get spilled to memory, rather than living in (x87) register

RE: cygwin gcc: Different numerical results in thread vs in main()

2008-08-04 Thread Mike Marchywka
: cygwin@cygwin.com > Date: Mon, 4 Aug 2008 07:29:14 -0700 > Subject: Re: cygwin gcc: Different numerical results in thread vs in main() > > Thanks for the helpful information, David. Oddly, -ffloat-store doesn't seem > to make any difference: > > [c:\projects\threads]g

Re: cygwin gcc: Different numerical results in thread vs in main()

2008-08-04 Thread Richard Stanton
anton Subject: RE: cygwin gcc: Different numerical results in thread vs in main() Try compiling with -ffloat-store then report back. google for "float-store excess precision gcc" to understand why this may help. I don't recommend -ffloat-store as a fix, but it can help diagnose

Re: cygwin gcc: Different numerical results in thread vs in main()

2008-08-03 Thread Brian Dessent
Richard Stanton wrote: > Main:t/1+t =0.0005609048868329022342546 > Thread 0: t/1+t =0.0005609048868329021258344 > Thread 1: t/1+t =0.0005609048868329021258344 > Thread 2: t/1+t =0.0005609048868329021258344 > Thread 3: t/1+t =0.0005609048868329021258344 The difference i