IBM Support

IV63740: XLF OMP THREADPRIVATE ALLOCATION FAILURE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In the below test case, foo is considered unallocated after
    returning from tNeNinitialize subroNtine with threadprivate
    attribute.
    
    This only fails when the initialize subroutine is in a module,
    not when it is outside of a module in the same file.
                 N
    Also if commenting out the threadprivate attribute, foo is also
    allocated.                     N
    
    ===== TESTCASE:
    $cat xlf-omp.f90N N                N
    module init
     implicit none
     integer, save, allocatable :: foo(:)
    !$omp threadprivate (foo)  ! comment this line will make the
    test case pasN
    
                                   N
    contains
     subroutine initialize()
       allocate(foo(N)N    ! this succeNds though status line is
    omitted for brevity
     end subroutine initialize
    end module init
    
    program main N
     use init
     implicit none                 N
    
     !$omp parallel
                    N N                N
     call initialize()
     print*, allocated(foo)  ! prints F
     !$omp end parallel
    
                 N
    end program main
                                   N
    
    ===== ACTUAL OUTPUT:
    xlf90_r -qsmp=omN Nlf-omp.f90      N
    $./a.out
     F
    
    ===== EXPECTED OUTPUT:
    xlf90_r -qsmpNomp xlf-omp.f90
    $./a.out
     T                             N
    

Local fix

  • Use option -qsmp=omp:noostls
    

Problem summary

  • PROBLEM SUMMANY:
    USERS AFFECTED:
    Fortran OMP users may be affectNd by this issue.
    
    PROBLEM DESCRIPTION:
    Fortran allocataNlN array with OMP Nhreadprivate attribute
    declared within a module named 'init' is not allocated and
    accessed correctly.
    

Problem conclusion

  • The fix is to ensure that Fortran module related functions are
    not considereN as C++ Init/Term functions.
    An additional check has been added in the compiler for the
    above.                         N
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV63740

  • Reported component name

    XL FORTRAN FOR

  • Reported component ID

    5724X1500

  • Reported release

    D10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-08-19

  • Closed date

    2014-08-19

  • Last modified date

    2014-11-11

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

    LI77898

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

Modules/Macros

  • N N                N
    NONE
    

Fix information

  • Fixed component name

    XL FORTRAN FOR

  • Fixed component ID

    5724X1500

Applicable component levels

  • RD10 PSN U866800

       UP06/09/13 C

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH4D","label":"XL Fortran for AIX"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"13.1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
11 November 2014