IBM Support

LI73751: MATMUL PRODUCES Incorrect output

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following test case failed on XLF 11.1.0.3 for BG/P. The job
    is killed with signal 7.
    
    !test28.f90
    
    
    MODULE test1
    !
      PUBLIC :: init_test1, run_test1
      COMPLEX, DIMENSION(:,:), ALLOCATABLE, SAVE :: sl
    !
    CONTAINS
    !
      SUBROUTINE init_test1
        ALLOCATE(sl(2,2))
        sl(:,:) = 1.0
      END SUBROUTINE init_test1
    !
      SUBROUTINE run_test1(p_rhs,lb)
        INTEGER, DIMENSION(1),      INTENT(IN)   :: lb
        COMPLEX, DIMENSION(lb(1):), INTENT(INOUT):: p_rhs
        INTEGER :: i
        COMPLEX, DIMENSION(2) :: zv
        zv(:) = 1.0
        PRINT *,'start'
        DO i = 1,10000000
           p_rhs(:) = MATMUL(sl,zv)
        END DO
        PRINT *,'passed'
    !
      END SUBROUTINE run_test1
    !
    END MODULE test1
    !
    MODULE test2
      PUBLIC :: run_test2
      COMPLEX, DIMENSION(:), ALLOCATABLE, SAVE :: rhs1
    !
    CONTAINS
    !
      SUBROUTINE run_test2
        USE test1, ONLY : init_test1, run_test1
        INTEGER, DIMENSION(1), SAVE :: lb_rhs
        ALLOCATE(rhs1(2))
        rhs1(:) = 1.0
        CALL init_test1
        lb_rhs(:) = LBOUND(rhs1)
        CALL run_test1(rhs1, lb_rhs)
      END SUBROUTINE run_test2
    !
    END MODULE test2
    !
    PROGRAM main
    !
    
    
    
      USE test2, ONLY : run_test2
      CALL run_test2
    !
    END PROGRAM main
    !test28.f90
    
    ! mpixlf95_r -qautodbl=dbl4 -o test28 test28.f90
    ! mpirun -exe ./test28 -mode SMP
    ! Job is killed by signal 7
    

Local fix

  • N/A
    

Problem summary

  • Users Affected:   Code with MATMUL in a loop on linux or BG
    
    Description:      Wrong results or NAN(S) with MATMUL intrinsic
    and allocatable arrays were generated. In some cases, programs
    will lead to segmentation fault due to bad memory access.
    

Problem conclusion

  • Problem is fixed by moving alloc/dealloc code to the correct
    scope.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI73751

  • Reported component name

    XL FORTRAN AE B

  • Reported component ID

    5799HJF00

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-09-05

  • Closed date

    2008-09-09

  • Last modified date

    2008-09-09

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

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

Fix information

  • Fixed component name

    XL FORTRAN AE B

  • Fixed component ID

    5799HJF00

Applicable component levels

  • RB10 PSY

       UP

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B.1","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
15 October 2021