[SciPy-user] minimizers don't work - d1mach problem

Robert Kern robert.kern at gmail.com
Thu Mar 2 22:33:13 CST 2006


Christian Kristukat wrote:

> I put the same some write statements in Lib/integrate/mach/d1mach.f, and that's
> what I get:
> 
> tnc: Version 1.2, (c) 2002-2003, Jean-Sebastien Roy (js at jeannot.org)
> tnc: RCS ID: @(#) $Jeannot: tnc.c,v 1.201 2004/04/02 22:36:25 js Exp $
>  integrate DMACH(1) ==    10000000000000.0
>  integrate SMALL(1) ==   -448790528
>  integrate SMALL(2) ==   1117925532
> STOP 778
> 
> Odd, that the error message disappeared and the subroutine stops at a different
> line number.

Ah, the glorious heisenbug.

> Before, the messag was:
> 
> tnc: Version 1.2, (c) 2002-2003, Jean-Sebastien Roy (js at jeannot.org)
> tnc: RCS ID: @(#) $Jeannot: tnc.c,v 1.201 2004/04/02 22:36:25 js Exp $
> 
>  Adjust D1MACH by uncommenting data statements
>  appropriate for your machine.
> STOP 779
> 
> Any ideas?

Well, look at the STOP 778 statement.

      IF (DMACH(4) .GE. 1.0D0) STOP 778

Add a write statement to find out what DMACH(4) is. According to the
documentation, it corresponds to the largest relative spacing of
double-precision floating point numbers. For that matter, output all 5 entries
in DMACH.

It would not surprise me if gfortran is screwing things up. In my experience, it
is not very stable.

-- 
Robert Kern
robert.kern at gmail.com

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter



More information about the SciPy-user mailing list