IBM Support

IZ96359: INCORRECT CALCULATION FOR COMPLEX NUMBER

Fixes are available

May 2011 PTF for XL C for AIX, V11.1
May 2011 PTF for XL C/C++ for AIX, V11.1
August 2011 PTF for XL C/C++ for AIX, V11.1
November 2011 PTF for XL C/C++ for AIX, V11.1
January 2012 PTF for XL C for AIX, V11.1
January 2012 PTF for XL C/C++ for AIX, V11.1
April 2012 PTF for XL C for AIX, V11.1
April 2012 PTF for XL C/C++ for AIX, V11.1
July 2012 PTF for XL C/C++ for AIX, V11.1
October 2012 PTF for XL C for AIX, V11.1
October 2012 PTF for XL C/C++ for AIX, V11.1
February 2013 PTF for XL C for AIX, V11.1
February 2013 PTF for XL C/C++ for AIX, V11.1
XL C/C++ for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 22 (September 2015 PTF) for 11.1
XL C for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C for AIX Fix Pack 24 (September 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 24 (September 2016 PTF) for 11.1
August 2011 PTF for XL C for AIX, V11.1
November 2011 PTF for XL C for AIX, V11.1
July 2012 PTF for XL C for AIX, V11.1
XL C for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C for AIX Fix Pack 22 (September 2015 PTF) for 11.1

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When dividing a complex number by one, an incorrect real number
    is observed and a core is generated.
    
    This occurs when compiling the below test case with any of the
    following options:
    
    " -qsmp=omp"
    " -qsmp=omp -qinline=level=5"
    
    ==== Test Case:
    test.cpp:
    #include <iostream>
    #include <complex>
    
    using namespace std;
    
    int main()
    {
       complex<double> ddd;
       ddd = 1.0;
    
    #pragma omp parallel for
       for ( int i=0; i<4; ++i )
       {
          complex<double> csum;
    
          csum = 2.0 / ddd;
    
    #pragma omp critical
          clog << csum << " <- expected:  (2,0)" << endl;
       }
    }
    ==========
    
    ==== Actual Output:
    # xlC_r -qsmp=omp test.cpp && ./a.out
    (-1.78686e-308,-0) <- expected:  (2,0)
    (-1.78686e-308,-0) <- expected:  (2,0)
    Segmentation fault (core dumped)
    #
    

Local fix

  • Use '-qsmp=omp -qinline=level=4'.
    

Problem summary

  • PROBLEM DESCRIPTION:
    Incorrect calculation of complex number with -O3 -qhot.
    
    USERS AFFECTED:
    Users of at levels -O3 -qhot and higher.
    

Problem conclusion

  • In an outlined procedure the real and complex members of a
    complex number were not privatized into that procedure but the
    owner was. So the stores into them did not go into the location
    of the owner causing runtime failures when the owner was
    referenced. The fix ensures that the owner and its members will
    become local to the outlined procedure.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ96359

  • Reported component name

    XL C FOR AIX

  • Reported component ID

    5724X1200

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-03-08

  • Closed date

    2011-03-08

  • Last modified date

    2011-03-08

  • APAR is sysrouted FROM one or more of the following:

    LI75817

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5724X1200

Applicable component levels

[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH2K","label":"XL C for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1"}]

Document Information

Modified date:
06 October 2021