IBM Support

LI76943: XLCENTRY ABEND WITH ATOMIC KEYWORD

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The test case makes use of the OpenMP "atomic" clause
    incorrectly but instead of giving an error message, the compiler
    abends and produces a Signal 11.
    
    
    ===== COMPILE COMMAND:
    mpixlc_r -g -O3 -qstrict -qtm -qsmp=omp:speculative -c
    atomic_bug.c
    
    
    ===== TESTCASE:
    $ cat atomic_bug.c
    #include <stdio.h>
    
    #define SIZE 400
    
    int main(void)
    {
        int v, w, z;
        int a[SIZE], b[SIZE];
    
        for (v=0; v<SIZE; v++)
        {
            a[v] = v;
            b[v] = -v;
        }
    
        #pragma omp parallel for private(v,w,z)
        for (v=0; v<SIZE; v++)
          for (w=0; w<SIZE; w++)
            for (z=0; z<SIZE; z++)
            {
              #pragma omp atomic
              {
                a[v] = a[w] + b[z];
              }
            }
    
        printf("done \n");
    
        return 0;
    }
    $
    
    
    ===== ACTUAL OUTPUT:
    $ mpixlc_r -g -O3 -qstrict -qtm -qsmp=omp:speculative -c
    atomic_bug.c
    /opt/ibmcmp/vac/bg/12.1/bin/.orig/bgxlc_r: 1501-224 (S) fatal
    error in
    /opt/ibmcmp/vac/bg/12.1/exe/xlcentry: signal 11 received
    $
    
    
    ===== EXPECTED OUTPUT:
    Compiler should not abend.
    

Local fix

  • n/a
    

Problem summary

  • USERS AFFECTED:
    People using an invalid syntax form with compound statements of
    the open mp atomic pragma are affected by this issue.
    
    PROBLEM DESCRIPTION:
    The problem is that the pragma list flag says there is a pragma
    in the list and is mismatched with the actual list that has no
    pragmas.
    This causes a null pointer dereference.
    

Problem conclusion

  • Do not use compound statements for the atomic pragma.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI76943

  • Reported component name

    XL C/C++ FOR BG

  • Reported component ID

    5799AG100

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-07-26

  • Closed date

    2012-11-23

  • Last modified date

    2012-11-23

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

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

    IV31754 LI77162

Fix information

  • Fixed component name

    XL C/C++ FOR BG

  • Fixed component ID

    5799AG100

Applicable component levels

  • RC10 PSY

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS2LWA","label":"XL C\/C++ for Blue Gene\/Q"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
14 December 2020