Fixes are available
XL Fortran for AIX Fix Pack 11 (May 2015 PTF) for 14.1
XL Fortran for AIX Fix Pack 12 (August 2015 Update) for 14.1
XL Fortran for AIX Fix Pack 15 (April 2016 Update) for 14.1
XL Fortran for AIX Fix Pack 16 (July 2016 Update) for 14.1
XL Fortran for AIX Fix Pack 17 (November 2016 Update) for 14.1
XL Fortran for AIX Fix Pack 18 (February 2017 Update) for 14.1
XL Fortran for AIX Fix Pack 19 (August 2017 Update) for 14.1
XL Fortran for AIX Fix Pack 5 (September 2013 PTF) for 14.1
XL Fortran for AIX Fix Pack 6 (December 2013 PTF) for 14.1
XL Fortran for AIX Fix Pack 7 (March 2014 PTF) for 14.1
XL Fortran for AIX Fix Pack 8 (July 2014 PTF) for 14.1
XL Fortran for AIX Fix Pack 9 (October 2014 PTF) for 14.1
XL Fortran for AIX Fix Pack 10 (February 2015 PTF) for 14.1
XL Fortran for AIX Fix Pack 14 (December 2015 Update) for 14.1
APAR status
Closed as program error.
Error description
The following Fortran program gives out incorrect result for the imaginary part if compiled with xlf. xlf90 -o f_mass testmass.f90 -lmass ** test === End of Compilation 1 === 1501-510 Compilation successful for file testmass.f90. -bash-4.1$ ./f_mass baseline 0.707372016677029064E-01 0.997494986604054446 cmplx1 -0.499791196558983131 0.354839677501255478E-03 cmplx2 -0.499791196558983131 0.354839677501255478E-03 sn, cs 0.997494986604054446 0.707372016677029064E-01 cat testmass.f90 program test use, intrinsic :: iso_c_binding implicit none include 'mass.include' real(c_double) :: ThreeHalf = 1.5d0 real(c_double), target :: sn, cs complex(c_double_complex) :: cmplx1, cmplx2 cmplx1 = cmplx(-111,-222) cmplx2 = cmplx1 sn = -111 cs = -222 write(*,*) " baseline ", cos(ThreeHalf), " ", sin(ThreeHalf) cmplx1 = cosisin(ThreeHalf) write(*,*) " cmplx1 ", real(cmplx1), " ", aimag(cmplx1) cmplx2 = cosisin(1.5d0) write(*,*) " cmplx2 ", real(cmplx2), " ", aimag(cmplx2) call sincos(ThreeHalf, sn, cs); write(*,*) " sn, cs ", sn, " ", cs end program test
Local fix
Use -qcomplexgcc
Problem summary
PROBLEM DESCRIPTION: MASS cosisin function does not work correctly when called from Fortran due to linkage mismatch. USERS AFFECTED: Fortran calls to MASS cosisin on Linux or BG/Q-LoP in 32-bit mode.
Problem conclusion
Linux and BG/Q-LoP MASS cosisin is compiled with xlc and default option -qcomplexgcc. This causes it to return the complex result in GPRs(General Purpose Registers) rather than FPRs (Floating Point Registers) for 32-bit mode. xlf by default uses -qnocomplexgcc, which expects complex results in FPRs. In order to make the xlf linkage compatible with MASS, without breaking MASS compatibility with xlc, we changed the xlf Front End to turn cosisin into a BIF, and removed the cosisin prototype from mass.include.
Temporary fix
Comments
APAR Information
APAR number
IV49617
Reported component name
XL FORTRAN FOR
Reported component ID
5725C7400
Reported release
E10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2013-09-18
Closed date
2013-09-18
Last modified date
2013-09-20
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 FOR
Fixed component ID
5725C7400
Applicable component levels
RE10 PSN UP06/09/13
C
Document Information
Modified date:
21 August 2024