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

Christian Kristukat ckkart at hoc.net
Thu Mar 2 21:02:51 CST 2006


Robert Kern wrote:
> 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 ***
> 


There's no additional output, so the if condition seems to be False. There's
another d1mach.f in Lib/integrate/mach. Which one is the relevant here?

Btw, the minimizers partly run, maybe in case when the gradients are far from
IEEE numeric limits?

Christian



More information about the SciPy-user mailing list