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

Robert Kern robert.kern at gmail.com
Thu Mar 2 20:21:31 CST 2006


Christian Kristukat wrote:
> Hi,
> sorry for posting this again, but I'd really like to have the minimizers work
> again. Every call to any of the miminizers scipy.fmin* fails with:
> 
>  Adjust D1MACH by uncommenting data statements
>  appropriate for your machine.
> STOP 779
> 
> I already looked at Lib/special/d1mach.f but I don't see what I should change
> there. Anyway, d1mach.f hasn't been changed for ages so I doubt that the problem
> is there.
> 
> Here's my configuration:
> 
> P4
> 
> Python 2.4.1 (#1, Sep 13 2005, 00:39:20)
> [GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2
> 
> numpy/scipy from svn
> ATLAS built with gfortran

Odd. For your configuration, D1MACH ought to be taking the IEEE LITTLE ENDIAN
branch earlier on, and the STOP 779 statements should never be reached. Try
adding these lines to diagnose the issue:

Index: Lib/special/mach/d1mach.f
===================================================================
--- Lib/special/mach/d1mach.f   (revision 1630)
+++ Lib/special/mach/d1mach.f   (working copy)
@@ -60,6 +60,9 @@
 C     ON FIRST CALL, IF NO DATA UNCOMMENTED, TEST MACHINE TYPES.
       IF (SC .NE. 987) THEN
          DMACH(1) = 1.D13
+         write(*,*) 'DMACH(1) == ', DMACH(1)
+         write(*,*) 'SMALL(1) == ', SMALL(1)
+         write(*,*) 'SMALL(2) == ', SMALL(2)
          IF (      SMALL(1) .EQ. 1117925532
      *       .AND. SMALL(2) .EQ. -448790528) THEN
 *           *** IEEE BIG ENDIAN ***

-- 
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