Re: Linux gcc vs Windows Studo Net 2005

Posted by Tamas Sashalmi on
URL: http://quantlib.414.s1.nabble.com/Linux-gcc-vs-Windows-Studo-Net-2005-tp4381p4383.html

Hello Luigi,

Yes, you're right. I've compiled with debug mode on windows..

On the 64bit problem: in the first part the error is in
lowdiscrepancysequences.cpp .
In this file there is no tolerance setting, after creating one as:
line begin at 287 in lowdiscrepancysequences.cpp:
----------------------------------------------------------------
+ Real tolerance = 1.0e-7;

    for (i=0; i<points; i++) {
        point = rsg.nextSequence().value;
-      if (point[0]!=FaureDimensionOneOfThree[i]) {
+        if (std::fabs(point[0]-FaureDimensionOneOfThree[i])/point[0]
> tolerance) {

            BOOST_ERROR(io::ordinal(i+1) << " draw, dimension 1 (" << point[0]
                        << ") in 3-D Faure sequence should have been "
                        << FaureDimensionOneOfThree[i]);
        }
-   if (point[1]!=FaureDimensionTwoOfThree[i]) {
+        if (std::fabs(point[1]-FaureDimensionTwoOfThree[i])/point[1]
> tolerance) {
            BOOST_ERROR(io::ordinal(i+1) << " draw, dimension 2 (" << point[1]
                        << ") in 3-D Faure sequence should have been "
                        << FaureDimensionTwoOfThree[i]);
        }
-   if (point[2]!=FaureDimensionThreeOfThree[i]) {
+        if (std::fabs(point[2]-FaureDimensionThreeOfThree[i])/point[2]
> tolerance) {
            BOOST_ERROR(io::ordinal(i+1) << " draw, dimension 3 (" << point[2]
                        << ") in 3-D Faure sequence should have been "
                        << FaureDimensionThreeOfThree[i]);

        }
-------------------------------------------------------------------
will solve this problem.
/////////////////////////////////////////////////////////
//please update cvs if you agree with the changes, maybe the all
//if (something != expected)
//statements should be change to
//if (abs(something - expected)/something > tolerance)..
//like in the rest of the test code.
////////////////////////////////////////////////////////////

However the second part of the error is apear at sampledcurve.cpp(75)
need a little more investigation, since the expected value is 0.04
(calculetd 2.6633e-16) and 0.09
(calculeted 0.0490192). I will try to solve it later.

Thanks,

Tamas


2006/1/22, Luigi Ballabio <[hidden email]>:

>
> On Jan 22, 2006, at 4:48 AM, Tamas R Sashalmi wrote:
> > I've compiled Quantlib and run some test on Windows (64-bit, but
> > compiled as 32 all tests are OK) and Linux (64bit).
> > Can some body tell me why the windows test are so slow (more than 1h)
> > while on linux 5 m 11 s?
>
> Are you sure you didn't compile the debug version on Windows? That
> would slow down the tests mightily. Check that you're compiling in
> Release configuration.
>
> > Also, some test are failed on linux 64bit (CVS; 230 tests) (32bit
> > version is OK). Seems to me some precision problem  32bit vs 64bit.
>
> Probably. We might have set a too low tolerance. If you have some time
> (unfortunately, I don't have a 64-bit machine myself) could you check
> what tolerance would be required for the tests to pass?
>
> Thanks,
>         Luigi
>
>