Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000689 [ALGLIB] General minor always 2017-03-14 12:49 2017-10-24 13:19
Reporter smani View Status public  
Assigned To SergeyB
Priority normal Resolution open Platform
Status assigned   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 3.10.0
  Target Version Product Build
Summary 0000689: GCC7: Test failure on i686
Description The ReportCorrectnessTest of the linlsqr test fails on i686 when building with GCC7 (7.0.1 20170309) on Fedora rawhide. The failure occurs in the below section of test_c.cpp (some debug prints were added). The output of this snippet is:

ReportCorrectnessTest::Fail
1 0
TNorm=8107.5250330521303113;RNorm=8107.5250330521294018;S.R2=8107.525033052130;

-----------
/*
 * check, that RNorm is't more than S.R2
 * and difference between S.R2 and TNorm
 * is't more than 'eps'(here S.R2=||rk||,
 * calculated by the algorithm for LSQR, and
 * TNorm=||A*S.x-b||, calculated by test function).
 */
if( ae_fp_greater(s.r2,rnorm)||ae_fp_greater(ae_fabs(s.r2-tnorm, _state),eps) )
{
    if( !silent )
    {
        printf("ReportCorrectnessTest::Fail\n");
        printf("%d %d\n", ae_fp_greater(s.r2,rnorm), ae_fp_greater(ae_fabs(s.r2-tnorm, _state),eps));
        printf("TNorm=%0.16f;RNorm=%0.16f;S.R2=%0.12f;\n",
            (double)(tnorm),
            (double)(rnorm),
            (double)(s.r2));
    }
    result = ae_true;
    ae_frame_leave(_state);
    return result;
}
-----------

By the way, the comment is also a bit confusing. If "is't" actually means "isn't", then the comment states that the test should verify:
rNorm < s.r2 <=> s.r2 > rNorm
|s.r2 - tNorm| < eps

but as far as I see the code fails if:
a) ae_fp_greater(s.r2,rnorm) <=> s.r2 > rNorm
b) ae_fp_greater(ae_fabs(s.r2-tnorm, _state),eps) <=> |s.r2 - tnorm| > eps

So a) matches the comment, but b) does not (and if "is't" means "is", then the opposite is true).


The build is using the following flags:
-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -fasynchronous-unwind-tables -fPIC

Build log is here:
https://koji.fedoraproject.org/koji/getfile?taskID=18371905&name=build.log

Other arches build correctly:
https://koji.fedoraproject.org/koji/taskinfo?taskID=18371900
Steps To Reproduce
Additional Information
Programming language C++
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-03-14 12:49 smani New Issue
2017-03-14 12:49 smani Programming language => C++
2017-10-24 13:19 SergeyB Status new => assigned
2017-10-24 13:19 SergeyB Assigned To => SergeyB


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker