commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject Re: [VOTE] Release Math 2.0
Date Sat, 01 Aug 2009 15:26:19 GMT
Jörg Schaible a écrit :
> Hi Luc,
> 
> Luc Maisonobe wrote:
> 
>> Luc Maisonobe a écrit :
>>> Jörg Schaible a écrit :
>>>> Hi Phil,
>>>>
>>>> tried the source package with my compiler zoo. Sun JDKs and icedtea6
>>>> take roughly 1 min to compile, test and build the jar. IBM JDK 1.6 takes
>>>> about 3 mins ... are math operations so bad with this JVM? However, with
>>>> JRockit 1.5 the test hangs forever in
>>>> org.apache.commons.math.ode.nonstiff.GraggBulirschStoerIntegratorTest
>>>> and I have to kill it after several minutes (verified twice). Can
>>>> someone else confirm?
>>> Could you tell which test fails in the Gragg Bulirsch Stoer set (there
>>> are 10 tests for it) ?
>>>
>>> could you try to add this statement to the failing test, sometimes
>>> before the call to integrate ?
>>>
>>>   integ.setMaxEvaluations(100000);
>>>
>>> This could prevent a possible infinite loop but will lead the test to
>>> fail with an exception when the maximal number of evaluations is reached.
>> Maybe it is the same problem that was encountered while releasing 1.2
>> <http://markmail.org/message/bbodv6uhv4a5e4ky> ? Could you try the fix I
>> proposed in the referenced message ?
> 
> we're definitely on the right track. After changing the loop in TestProblem3
> the tests run through. However, now I have two failing tests:

The two tests are in fact the same test repeated. The first occurrence
is in the deprecated package estimation which will be removed at some
point in the future and the second test is in the new
optimization.general package.

Could you change in the MinPackTest.java from either package the
checkTheoreticalMinCost method to add a print statement as in the
example below and send the result you get when running MinPackTest ?


public boolean checkTheoreticalMinCost(double rms) {
  double threshold = costAccuracy * (1.0 + theoreticalMinCost);
  if (Math.abs(Math.sqrt(m) * rms - theoreticalMinCost) > threshold) {
    System.out.println("rms = " + rms +
                       ", m = " + m +
                       ", sqrt(m)*rms = " +
                       Math.abs(Math.sqrt(m) * rms) +
                       ", threshold = " + threshold +
                       ", delta = " +
                       Math.abs(Math.sqrt(m) * rms -
                                theoreticalMinCost));
     }
     return Math.abs(Math.sqrt(m) * rms - theoreticalMinCost) <=
            threshold;
    }

I guess I simply put too tight thresholds in the tests and that
numerical instability or different optimizations in JVMs may change the
result and break the test. The previous print statement would allow me
to compare the numerical values with what I get here and decide if the
results are acceptable and the test threshold must be enlarged or if
there is a real problem here.

Thanks,
Luc

> 
> ================ %< ===============
> Failed tests:
>   testMinpackBrownDennis(org.apache.commons.math.estimation.MinpackTest)
>  
> testMinpackBrownDennis(org.apache.commons.math.optimization.general.MinpackTest)
> ================ %< ===============
> -------------------------------------------------------------------------------
> Test set: org.apache.commons.math.estimation.MinpackTest
> -------------------------------------------------------------------------------
> Tests run: 18, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.468 sec
> <<< FAILURE!
> testMinpackBrownDennis(org.apache.commons.math.estimation.MinpackTest)  Time
> elapsed: 0.411 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: null
>         at junit.framework.Assert.fail(Assert.java:47)
>         at junit.framework.Assert.assertTrue(Assert.java:20)
>         at junit.framework.Assert.assertTrue(Assert.java:27)
>         at
> org.apache.commons.math.estimation.MinpackTest.minpackTest(MinpackTest.java:503)
>         at
> org.apache.commons.math.estimation.MinpackTest.testMinpackBrownDennis(MinpackTest.java:348)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:168)
>         at junit.framework.TestCase.runBare(TestCase.java:134)
>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>         at junit.framework.TestResult.run(TestResult.java:113)
>         at junit.framework.TestCase.run(TestCase.java:124)
>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>         at junit.framework.TestSuite.run(TestSuite.java:227)
>         at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
>         at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>         at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>         at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ================ %< ===============
> -------------------------------------------------------------------------------
> Test set: org.apache.commons.math.optimization.general.MinpackTest
> -------------------------------------------------------------------------------
> Tests run: 18, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.218 sec
> <<< FAILURE!
> testMinpackBrownDennis(org.apache.commons.math.optimization.general.MinpackTest) 
> Time elapsed: 0.036 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: null
>         at junit.framework.Assert.fail(Assert.java:47)
>         at junit.framework.Assert.assertTrue(Assert.java:20)
>         at junit.framework.Assert.assertTrue(Assert.java:27)
>         at
> org.apache.commons.math.optimization.general.MinpackTest.minpackTest(MinpackTest.java:504)
>         at
> org.apache.commons.math.optimization.general.MinpackTest.testMinpackBrownDennis(MinpackTest.java:349)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:168)
>         at junit.framework.TestCase.runBare(TestCase.java:134)
>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>         at junit.framework.TestResult.run(TestResult.java:113)
>         at junit.framework.TestCase.run(TestCase.java:124)
>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>         at junit.framework.TestSuite.run(TestSuite.java:227)
>         at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
>         at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>         at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>         at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ================ %< ===============
> 
> The JDK I use is one of the last JRockit versions available as separate
> download from former BEA:
> 
> ================ %< ===============
> $ java -version
> java version "1.5.0_14"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
> BEA JRockit(R) (build
> R27.5.0-110_CR366951-97327-1.5.0_14-20080408-1711-linux-ia32, compiled
> mode)
> ================ %< ===============
> 
> Since IBM JDK 1.5 does not run with Maven, I tried that one with Ant and it
> worked fine.
> 
> Regards,
> Jörg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message