APAR status
Closed as program error.
Error description
An Internal Compiler Error (ICE) is encountered when attempting to compile a possibly invalid implementation of an attempt to map over a function pointer to the GPU using a map operation. It is desirable to replace the ICE with a meaningful message to help the user identify the coding violation. ===== COMPILE COMMAND: $ xlf2003 -O0 -g -qoffload -qsmp=omp -c -qdebug=except ice.f90 ===== TESTCASE: $ cat ice.f90 program Main implicit none abstract interface function func (z) !$OMP declare target integer :: func integer, intent (in) :: z end function func end interface integer,parameter::scaler=2 !$OMP declare target(scaler) call Driver contains !############################################################### ######## subroutine Driver implicit none procedure(func),pointer:: fun_pointer integer::counter integer::vector(100) integer:: var1 !$OMP declare target(fun_pointer) var1=1 !$OMP target enter data map(to: fun_pointer) !$OMP target fun_pointer=>Fun_of_x !$OMP end target write(*,*)'After pointer assignment' !$OMP target teams distribute parallel do do counter=1,100 vector(counter)=Eval_Fun(fun_pointer,counter,var1) ! vector(counter)=Eval_Fun(counter,var1) enddo !$OMP end target teams distribute parallel do do counter=1,100 write(*,*)'vector(counter)=',vector(counter) enddo !$OMP target exit data map(delete:fun_pointer) end subroutine Driver !############################################################### ######## ! subroutine Set_Pointer(fun_pointer) ! ! implicit none ! !$OMP declare target ! procedure(func),pointer,intent(inout):: fun_pointer ! ! fun_pointer=>Fun_of_x ! ! end subroutine Set_Pointer !############################################################### ######## function Fun_of_x(x) implicit none !$OMP declare target integer, intent(in)::x integer::Fun_of_x Fun_of_x=scaler*x end function Fun_of_x !############################################################### ######## function Eval_Fun(fun_pointer,x,var1) implicit none procedure(func),pointer,intent(in)::fun_pointer integer,intent(in)::x,var1 integer::Eval_Fun !$OMP target data map(tofrom: x,var1) Eval_Fun=fun_pointer(x)-var1 !$OMP end target data end function Eval_Fun !############################################################### ######### ! ! function Eval_Fun(x,var1) ! ! ! ! implicit none ! ! !$OMP declare target ! ! integer,intent(in)::x,var1 ! ! integer::Eval_Fun ! ! ! ! !$OMP target data map(tofrom: x,var1,Eval_Fun) ! ! ! ! Eval_Fun=Fun_of_x(x)-var1 ! ! ! ! !$OMP end target data ! ! ! ! end function Eval_Fun !############################################################### ######## $ ===== ACTUAL OUTPUT: Compiler produces an internal compiler error ===== EXPECTED OUTPUT: Should compile cleanly
Local fix
N/A
Problem summary
USERS AFFECTED: Users using OpenMP data map GPU function pointers might be affected by this issue. PROBLEM DESCRIPTION: The semantics of mapping function pointer is not defined in the OpenMP Spec. However, this APAR is fix the internal compiler error.
Problem conclusion
The internal compiler error has been resolved.
Temporary fix
Comments
APAR Information
APAR number
LI81228
Reported component name
XL FORTRAN LINU
Reported component ID
5725C7510
Reported release
G11
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2019-12-18
Closed date
2020-03-11
Last modified date
2020-03-11
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
IJ24693
Fix information
Fixed component name
XL FORTRAN LINU
Fixed component ID
5725C7510
Applicable component levels
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSAT4T","label":"XL Fortran for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
01 May 2020