Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Méso-NH code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RODIER Quentin
Méso-NH code
Commits
1f62059a
Commit
1f62059a
authored
3 years ago
by
ESCOBAR MUNOZ Juan
Browse files
Options
Downloads
Patches
Plain Diff
Juan 12/10/2021:mass_leak.f90 , allocate 2D work array at first call for GPU optimization
parent
f63a4897
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ZSOLVER/mass_leak.f90
+15
-10
15 additions, 10 deletions
src/ZSOLVER/mass_leak.f90
with
15 additions
and
10 deletions
src/ZSOLVER/mass_leak.f90
+
15
−
10
View file @
1f62059a
...
...
@@ -132,7 +132,7 @@ REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PRVS ! momentum tendencies
!
!JUAN16
REAL
::
ZLEAK
! total leak of mass
REAL
,
ALLOCATABLE
,
DIMENSION
(:,:)
::
ZLEAK_W_2D
,
ZLEAK_E_2D
,
ZLEAK_S_2D
,
ZLEAK_N_2D
REAL
,
SAVE
,
ALLOCATABLE
,
DIMENSION
(:,:)
::
ZLEAK_W_2D
,
ZLEAK_E_2D
,
ZLEAK_S_2D
,
ZLEAK_N_2D
!JUAN16
REAL
::
ZUSTOP
! wind correction!
...
...
@@ -151,6 +151,7 @@ INTEGER :: IINFO_ll ! return code of parallel routine
LOGICAL
::
GWEST
,
GEAST
,
GSOUTH
,
GNORTH
REAL
::
ZLEAK_W
,
ZLEAK_E
,
ZLEAK_S
,
ZLEAK_N
!
LOGICAL
,
SAVE
::
GFIRST_CALL_MASS_LEAK
=
.TRUE.
!-------------------------------------------------------------------------------
!
!* 1. COMPUTE DIMENSIONS OF ARRAYS AND OTHER INDICES:
...
...
@@ -177,9 +178,19 @@ ZLEAK_W=0.
ZLEAK_S
=
0.
ZLEAK_N
=
0.
!
IF
(
HLBCY
(
1
)
/
=
'CYCL'
)
THEN
ALLOCATE
(
ZLEAK_W_2D
(
IIB
:
IIB
,
IJB
:
IJE
))
ALLOCATE
(
ZLEAK_E_2D
(
IIE
+1
:
IIE
+1
,
IJB
:
IJE
))
IF
(
GFIRST_CALL_MASS_LEAK
)
THEN
GFIRST_CALL_MASS_LEAK
=
.FALSE.
IF
(
HLBCX
(
1
)
/
=
'CYCL'
)
THEN
ALLOCATE
(
ZLEAK_W_2D
(
IIB
:
IIB
,
IJB
:
IJE
))
ALLOCATE
(
ZLEAK_E_2D
(
IIE
+1
:
IIE
+1
,
IJB
:
IJE
))
END
IF
IF
(
HLBCY
(
1
)
/
=
'CYCL'
)
THEN
ALLOCATE
(
ZLEAK_S_2D
(
IIB
:
IIE
,
IJB
:
IJB
))
ALLOCATE
(
ZLEAK_N_2D
(
IIB
:
IIE
,
IJE
+1
:
IJE
+1
))
END
IF
END
IF
!
IF
(
HLBCX
(
1
)
/
=
'CYCL'
)
THEN
!$acc kernels async
ZLEAK_W_2D
=
0.0
IF
(
GWEST
)
THEN
...
...
@@ -209,8 +220,6 @@ IF( HLBCY(1) /= 'CYCL' ) THEN
END
IF
!
IF
(
HLBCY
(
1
)
/
=
'CYCL'
)
THEN
ALLOCATE
(
ZLEAK_S_2D
(
IIB
:
IIE
,
IJB
:
IJB
))
ALLOCATE
(
ZLEAK_N_2D
(
IIB
:
IIE
,
IJE
+1
:
IJE
+1
))
!
!$acc kernels async
ZLEAK_S_2D
=
0.0
...
...
@@ -242,10 +251,6 @@ IF( HLBCY(1) /= 'CYCL' ) THEN
END
IF
!
ZLEAK
=
ZLEAK_E
+
ZLEAK_W
+
ZLEAK_S
+
ZLEAK_N
!!$ZLEAK = ZLEAK_E
!!$ZLEAK = ZLEAK + ZLEAK_W
!!$ZLEAK = ZLEAK + ZLEAK_S
!!$ZLEAK = ZLEAK + ZLEAK_N
!
!CALL REDUCESUM_ll(ZLEAK,IINFO_ll) ! we do the reducesum_ll in SUM_DD_R2_ll so we do not do it here
!
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment