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
9941ea84
Commit
9941ea84
authored
4 years ago
by
WAUTELET Philippe
Browse files
Options
Downloads
Patches
Plain Diff
Philippe 05/03/2021: budgets: measure cpu_time for budgets
parent
daf162e4
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/MNH/budget.f90
+30
-2
30 additions, 2 deletions
src/MNH/budget.f90
with
30 additions
and
2 deletions
src/MNH/budget.f90
+
30
−
2
View file @
9941ea84
...
...
@@ -6,16 +6,19 @@
! Modifications
! P. Wautelet 28/01/2020: new subroutines: Budget_store_init, Budget_store_end and Budget_source_id_find in new module mode_budget
! P. Wautelet 17/08/2020: treat LES budgets correctly
! P. Wautelet 05/03/2021: measure cpu_time for budgets
!-----------------------------------------------------------------
!#################
module
mode_budget
!#################
use
modd_budget
,
only
:
cbutype
,
nbutime
,
tbudgetdata
use
modd_budget
,
only
:
cbutype
,
nbutime
,
tbudgetdata
,
xtime_bu
,
xtime_bu_process
use
modd_les_budget
,
only
:
xtime_les_bu
,
xtime_les_bu_process
use
modi_cart_compress
,
only
:
Cart_compress
use
modi_mask_compress
,
only
:
Mask_compress
use
modi_second_mnh
,
only
:
Second_mnh
use
mode_msg
...
...
@@ -27,6 +30,7 @@ public :: Budget_store_init
public
::
Budget_store_end
public
::
Budget_store_add
real
::
ztime1
,
ztime2
contains
...
...
@@ -42,6 +46,8 @@ subroutine Budget_store_init( tpbudget, hsource, pvars )
call
Print_msg
(
NVERB_DEBUG
,
'BUD'
,
'Budget_store_init'
,
trim
(
tpbudget
%
cname
)//
':'
//
trim
(
hsource
)
)
if
(
lles_call
)
then
call
Second_mnh
(
ztime1
)
if
(
allocated
(
tpbudget
%
xtmplesstore
)
)
then
call
Print_msg
(
NVERB_ERROR
,
'BUD'
,
'Budget_store_init'
,
'xtmplesstore already allocated'
)
else
...
...
@@ -50,11 +56,17 @@ subroutine Budget_store_init( tpbudget, hsource, pvars )
tpbudget
%
xtmplesstore
(:,
:,
:)
=
pvars
(:,
:,
:)
tpbudget
%
clessource
=
hsource
call
Second_mnh
(
ztime2
)
xtime_les_bu
=
xtime_les_bu
+
ztime2
-
ztime1
xtime_les_bu_process
=
xtime_les_bu_process
+
ztime2
-
ztime1
end
if
! Nothing else to do if budgets are not enabled
if
(
.not.
tpbudget
%
lenabled
)
return
call
Second_mnh
(
ztime1
)
call
Budget_source_id_find
(
tpbudget
,
hsource
,
iid
)
if
(
tpbudget
%
ntmpstoresource
/
=
0
)
then
...
...
@@ -91,7 +103,11 @@ subroutine Budget_store_init( tpbudget, hsource, pvars )
end
if
end
if
end
subroutine
Budget_store_init
call
Second_mnh
(
ztime2
)
xtime_bu
=
xtime_bu
+
ztime2
-
ztime1
xtime_bu_process
=
xtime_bu_process
+
ztime2
-
ztime1
end
subroutine
Budget_store_init
subroutine
Budget_store_end
(
tpbudget
,
hsource
,
pvars
)
...
...
@@ -133,6 +149,8 @@ subroutine Budget_store_end( tpbudget, hsource, pvars )
! Nothing to do if budgets are not enabled
if
(
.not.
tpbudget
%
lenabled
)
return
call
Second_mnh
(
ztime1
)
call
Budget_source_id_find
(
tpbudget
,
hsource
,
iid
)
if
(
tpbudget
%
tsources
(
iid
)
%
lenabled
)
then
...
...
@@ -196,6 +214,10 @@ subroutine Budget_store_end( tpbudget, hsource, pvars )
tpbudget
%
ntmpstoresource
=
0
end
if
call
Second_mnh
(
ztime2
)
xtime_bu
=
xtime_bu
+
ztime2
-
ztime1
xtime_bu_process
=
xtime_bu_process
+
ztime2
-
ztime1
end
subroutine
Budget_store_end
...
...
@@ -221,6 +243,8 @@ subroutine Budget_store_add( tpbudget, hsource, pvars )
! Nothing to do if budgets are not enabled
if
(
.not.
tpbudget
%
lenabled
)
return
call
Second_mnh
(
ztime1
)
call
Budget_source_id_find
(
tpbudget
,
hsource
,
iid
)
if
(
tpbudget
%
tsources
(
iid
)
%
lenabled
)
then
...
...
@@ -240,6 +264,10 @@ subroutine Budget_store_add( tpbudget, hsource, pvars )
end
if
end
if
call
Second_mnh
(
ztime2
)
xtime_bu
=
xtime_bu
+
ztime2
-
ztime1
xtime_bu_process
=
xtime_bu_process
+
ztime2
-
ztime1
end
subroutine
Budget_store_add
...
...
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