Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Budiardja, Reuben
Fortran Frontier
Commits
29763443
Commit
29763443
authored
Oct 05, 2021
by
Budiardja, Reuben
Browse files
Fixed reproducer.
parent
1758d19d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Cases/Composite/OpenMP_DeclareTarget/OpenMP_DeclareTargetPrivateVar.f90
View file @
29763443
!-- This is a reproducer of an issue observed in an ECP application.
! The issue seems to stem from a declared target array variables
! being used as arguments to nested declared-target
! subroutines. The error happens at the linking stage.
!-- There could be two possible distinct issues here with CCE.
! The first one is as written in the code.
! The second one shows up when '!$OMP private' in gpuomp_routine()
! is commented out. It triggers a different linking error.
module
comm
implicit
none
real
,
dimension
(
:
),
allocatable
::
&
cmaxa
,
cmaxb
!$OMP declare target ( cmaxa, cmaxb )
integer
::
&
ncmax
end
module
comm
module
ext_module
implicit
none
contains
subroutine
ext_routine
(
d1
,
cmaxa
,
cmaxb
,
size
)
implicit
none
real
,
intent
(
inout
)
::
&
d1
integer
,
intent
(
in
)
::
&
size
real
,
dimension
(
:
)
::
&
cmaxa
(
size
),
cmaxb
(
size
)
!$OMP declare target
end
subroutine
ext_routine
end
module
ext_module
module
gpuomp
implicit
none
contains
subroutine
gpuomp_routine
(
d1
,
d2
,
d3
)
use
comm
,
only
:
cmaxa
,
cmaxb
subroutine
gpuomp_routine
(
d1
)
use
comm
,
only
:
cmaxa
,
cmaxb
,
ncmax
real
,
intent
(
inout
)
::
&
d1
,
d2
,
d3
d1
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
)
call
gpuomp_routine2
(
d1
,
cmaxa
,
cmaxb
,
ncmax
)
end
do
!$OMP end target teams distribute parallel do
end
subroutine
gpuomp_routine
subroutine
gpuomp_routine2
(
d1
,
d2
,
d3
,
cmaxa
,
cmaxb
,
nsize
)
subroutine
gpuomp_routine2
(
d1
,
cmaxa
,
cmaxb
,
size
)
use
ext_module
real
,
intent
(
inout
)
::
&
d1
,
d2
,
d3
d1
integer
,
intent
(
in
)
::
&
n
size
size
real
,
dimension
(
:
)
::
&
cmaxa
(
nsize
),
cmaxb
(
nsize
)
cmaxa
,
cmaxb
!$OMP declare target
call
ext_routine
(
d1
,
d2
,
d3
,
cmaxa
,
cmaxb
,
nsize
)
call
ext_routine
(
d1
,
cmaxa
,
cmaxb
,
size
)
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
!--
d
ummy
program
!--
D
ummy
'main' program so that we can link.
end
program
test
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment