IBM Support

IV34529: INCORRECT RESULTS WITH DIMENSION ATTRIBUTE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Runtime incorrect results with DIMENSION attribute for the
    below test case.
    
    ===== TESTCASE:
    >cat t.f90
    
    program toto
    integer :: nspin, nkpts
    integer, allocatable, dimension(:,:) :: ndimovr
    double precision, allocatable, dimension(:) :: ovr
    integer :: ii
    
    nspin = 1
    nkpts = 1
    allocate(ndimovr(nspin,0:nkpts))
    ndimovr(1,:) = (/ 4, 4 /)
    
    allocate(ovr(ndimovr(nspin,nkpts)))
    
    ovr = 1.d0
    ii = ndimovr(1,1)
    call geto(nspin, nkpts, ndimovr, ovr)
    write(*,*) ovr
    
    contains
    
    subroutine geto(nspin, nkpts, ndimovr, ovr)
    integer, intent(in) :: nspin, nkpts
    integer, dimension(nspin, 0:nkpts), intent(in) :: ndimovr
    double precision, dimension(ndimovr(1,nkpts)), intent(out) ::
    ovr
    ovr(:) = 99.d0
    end subroutine geto
    
    end program toto
    
    ===== ACTUAL OUTPUT:
    $xlf t.f90
    ** toto   === End of Compilation 1 ===
    1501-510  Compilation successful for file tt.f90.
    $./a.out
     1.00000000000000000 1.00000000000000000 1.00000000000000000
    1.00000000000000000
    
    
    ===== EXPECTED OUTPUT:
     99.0000000000000000 99.0000000000000000 99.0000000000000000
    99.0000000000000000
    

Local fix

  • Avoid the use of DIMENSION, such as:
    ...
    subroutine geto(nspin, nkpts, ndimovr, ovr)
    integer, intent(in) :: nspin, nkpts
    !!------>workaround
    integer, intent(in) :: ndimovr(nspin, 0:nkpts)
    !!------>workaround
    double precision, intent(out) :: ovr(ndimovr(1,nkpts))
    ovr(:) = 99.d0
    end subroutine geto
    

Problem summary

  • PROBLEM DESCRIPTION: XL Fortran gets incorrect values for the
    dimensions of dummy arguments that satisfy all of the
    following conditions:
    1. The dimensions of the dummy arguments are declared using the
    DIMENSION attribute.
    2. The dimensions of the dummy arguments are specification
    expressions.
    3. One argument's dimensions depend on the value of another
    argument whose dimensions depend
    on the value of yet another dummy argument.
    
    Under the above conditions, the ordering of the prolog code
    inserted by XL Fortran to compute the
    values of the specification expressions at run time does not
    fully take the dependencies between the
    dummy arguments.
    
    USERS AFFECTED: Users of XL Fortran 13.1.
    

Problem conclusion

  • The problem has been fixed. Apply provided service.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV34529

  • 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

    2013-01-10

  • Closed date

    2013-02-07

  • Last modified date

    2013-02-08

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

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

    LI77462

Fix information

  • Fixed component name

    XL FORTRAN FOR

  • Fixed component ID

    5724X1500

Applicable component levels

  • RD10 PSY U857531

       UP 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:
08 February 2013