Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Budiardja, Reuben
Fortran Frontier
Commits
346dce2a
Commit
346dce2a
authored
Oct 06, 2021
by
Budiardja, Reuben
Browse files
Renamed test case for dynamic metadirective with device vs host.
parent
0fa4d273
Changes
1
Hide whitespace changes
Inline
Side-by-side
Cases/Composite/OpenMP_Metadirective/OpenMP_
m
etadirective
_user_condition_target
.f90
→
Cases/Composite/OpenMP_Metadirective/OpenMP_
M
etadirective
Dynamic_TargetTeamsDistributeParallelDo-ParallelDo
.f90
View file @
346dce2a
...
...
@@ -13,6 +13,8 @@ program OpenMP_metadirective_user_condition_target_test
A
,
B
,
C
,
&
C_Ref
print
*
,
'NumDevices :'
,
omp_get_num_devices
(
)
print
*
,
'OnDevice ( ) :'
,
OnDevice
(
)
print
*
,
''
...
...
@@ -25,7 +27,7 @@ program OpenMP_metadirective_user_condition_target_test
print
*
,
'UseDevice :'
,
UseDevice
print
*
,
'OnDevice ( UseDevice ) :'
,
OnDevice
(
UseDevice
)
print
*
,
''
allocate
(
A
(
1024
*
10
)
)
allocate
(
B
(
1024
*
10
)
)
...
...
@@ -36,7 +38,6 @@ program OpenMP_metadirective_user_condition_target_test
call
random_number
(
B
)
C_Ref
=
A
+
B
print
*
,
'Calling ComputeAndTimeVectorAddition on Host'
C
=
0.0_real64
...
...
@@ -112,17 +113,13 @@ contains
Start
=
omp_get_wtime
(
)
!$OMP
begin
metadirective &
!$OMP metadirective &
!$OMP when ( user = { condition ( UseDevice .EQV. .true. ) } &
!$OMP : target teams distribute )
!$OMP parallel do
!$OMP : target teams distribute parallel do ) &
!$OMP default ( parallel do )
do
iV
=
1
,
size
(
A
)
C
(
iV
)
=
A
(
iV
)
+
B
(
iV
)
end
do
!$OMP end parallel do
!$OMP end metadirective
Timing
=
omp_get_wtime
(
)
-
Start
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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