Fixes are available
January 2010 PTF for XL Fortran Enterprise Edition for AIX, V11.1
May 2010 PTF for XL Fortran Enterprise Edition for AIX, V11.1
November 2010 PTF for XL Fortran Enterprise Edition for AIX, V11.1
March 2011 PTF for XL Fortran Enterprise Edition for AIX, V11.1
July 2011 PTF for XL Fortran Enterprise Edition for AIX, V11.1
December 2011 PTF for XL Fortran Enterprise Edition for AIX, V11.1
January 2009 PTF for XL Fortran Enterprise Edition for AIX, V11.1
April 2009 PTF for XL Fortran Enterprise Edition for AIX, V11.1
APAR status
Closed as program error.
Error description
When the following test case is compiled with the following compile line, an incorrect output is obtained at execution time. Compile Line: mpxlf_r -I/usr/local/include -O4 -qnosave -qfixed mpitest.f ===== TESTCASE: <<<<<<<<<<<<< Start of mpitest.f >>>>>>>>>>>>>>>>>>>>>>>> PROGRAM testmain ! This program shows an MPI bug on jump, ! if compiled with "mpxlf_r -O4 -qnosave" and ! executed on one processor. IMPLICIT NONE INCLUDE 'mpif.h' INTEGER :: ierr(3),stt(MPI_STATUS_SIZE) CALL MPI_INIT(ierr) CALL testmpi(1) CALL MPI_FINALIZE(ierr) END PROGRAM !=============================================================== SUBROUTINE testmpi(n) IMPLICIT NONE ! The bug does not appear, if the dimension of y ! is specified within this subroutine (i.e. "y(1)"). INTEGER, INTENT (IN) :: n INTEGER :: j, x, y(n) ! INCLUDE 'mpif.h' INTEGER :: ierr(3),irank,isize DO j= 1,n y(j)= 1 ENDDO ! At first, x is set to 3. Then it is changed to 4. x = 3 DO j= 1,n x = max( x, 4 ) END DO CALL MPI_COMM_RANK (MPI_COMM_WORLD,irank,ierr) CALL MPI_COMM_SIZE (MPI_COMM_WORLD,isize,ierr) ! Here, x is 4. WRITE(*,fmt='(2(A,i2),A)') & 'irank =',irank,': x =',x,' before MPI_BCAST' ! The bug appears, if the following IF-block is not ! executed. ! It does not apper, if MPI_BCAST is uncommented IF ( isize > 1 ) THEN WRITE(*,fmt='(A,i2,A)') 'irank =',irank,': isize > 1' CALL MPI_BCAST(x,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) ENDIF ! Now, x has changed from 4 back to 3. WRITE(*,fmt='(2(A,i2),A)') & 'irank =',irank,': x =',x,' after MPI_BCAST' END SUBROUTINE testmpi <<<<<<<<<<<<<<<< end of mpitest.f >>>>>>>>>>>>>>>>>>>>>> ===== ACTUAL OUTPUT: $ ./a.out irank = 0: x = 4 before MPI_BCAST irank = 0: x = 3 after MPI_BCAST ===== EXPECTED OUTPUT: $ ./a.out irank = 0: x = 4 before MPI_BCAST irank = 0: x = 4 after MPI_BCAST
Local fix
A workaround to this problem is statically allocate y in the subroutine.
Problem summary
This specific problem was found in MPI code, but it has the potential to effect any code containing loops compiled with loop opts enabled. The compiler was performing an address-taken optimzation and placing statements between the latch directive and the latch branch of the loop. This has been corrected.
Problem conclusion
When searching for the location to place the statement, the compiler checks whether it is in the latch block of a region. If it is, it walks up past the latch directive to ensure the statement is inserted in the loop body.
Temporary fix
Comments
APAR Information
APAR number
IZ38370
Reported component name
XL FORTRAN AIX
Reported component ID
5724S7200
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2008-11-21
Closed date
2008-12-10
Last modified date
2009-01-27
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 AIX
Fixed component ID
5724S7200
Applicable component levels
Document Information
Modified date:
24 February 2022