Commit 1758d19d authored by Budiardja, Reuben's avatar Budiardja, Reuben
Browse files

Initial reproducer for miniERIs linking issue.

parent f2622a90
module comm
implicit none
real, dimension ( : ), allocatable :: &
cmaxa, cmaxb
!$OMP declare target ( cmaxa, cmaxb )
end module comm
module gpuomp
implicit none
contains
subroutine gpuomp_routine ( d1, d2, d3 )
use comm, only: cmaxa, cmaxb
real, intent ( inout ) :: &
d1, d2, d3
integer :: &
iV
!$OMP target teams distribute parallel do &
!$OMP private ( cmaxa, cmaxb )
do iV = 1, 3200
call gpuomp_routine2 ( d1, d2, d3, cmaxa, cmaxb, 3200 )
end do
!$OMP end target teams distribute parallel do
end subroutine gpuomp_routine
subroutine gpuomp_routine2 ( d1, d2, d3, cmaxa, cmaxb, nsize )
real, intent ( inout ) :: &
d1, d2, d3
integer, intent ( in ) :: &
nsize
real, dimension ( : ) :: &
cmaxa ( nsize ), cmaxb ( nsize )
!$OMP declare target
call ext_routine ( d1, d2, d3, cmaxa, cmaxb, nsize )
end subroutine gpuomp_routine2
end module gpuomp
module ext_module
implicit none
contains
subroutine ext_routine ( d1, d2, d3, cmaxa, cmaxb, nsize )
real, intent ( inout ) :: &
d1, d2, d3
integer, intent ( in ) :: &
nsize
real, dimension ( : ) :: &
cmaxa ( nsize ), cmaxb ( nsize )
!$OMP declare target
end subroutine ext_routine
end module ext_module
program test
!-- dummy program
end program test
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment