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
a4f5065b
Commit
a4f5065b
authored
3 years ago
by
WAUTELET Philippe
Browse files
Options
Downloads
Patches
Plain Diff
Philippe 06/07/2021: add counters for the number of prints + subroutine Msg_stats
parent
2765e151
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/LIB/SURCOUCHE/src/mode_msg.f90
+40
-1
40 additions, 1 deletion
src/LIB/SURCOUCHE/src/mode_msg.f90
with
40 additions
and
1 deletion
src/LIB/SURCOUCHE/src/mode_msg.f90
+
40
−
1
View file @
a4f5065b
!MNH_LIC Copyright 2017-202
0
CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC Copyright 2017-202
1
CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
!MNH_LIC for details. version 1.
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
! P. Wautelet 02/07/2019: flush messages also for files opened with newunit (logical unit can be negative)
! P. Wautelet 02/07/2019: flush messages also for files opened with newunit (logical unit can be negative)
! P. Wautelet 17/01/2020: add 'BUD' category for Print_msg
! P. Wautelet 17/01/2020: add 'BUD' category for Print_msg
! P. Wautelet 08/04/2020: add multiline Print_msg
! P. Wautelet 08/04/2020: add multiline Print_msg
! P. Wautelet 01/07/2021: add counters for the number of prints + subroutine Msg_stats
!-----------------------------------------------------------------
!-----------------------------------------------------------------
module
mode_msg
module
mode_msg
...
@@ -23,6 +24,12 @@ integer, parameter :: NMSGLLINEMAX = 10 ! Maximum number of lines for a message
...
@@ -23,6 +24,12 @@ integer, parameter :: NMSGLLINEMAX = 10 ! Maximum number of lines for a message
character
(
len
=
NMSGLGTMAX
),
dimension
(
NMSGLLINEMAX
)
::
cmnhmsg
=
''
character
(
len
=
NMSGLGTMAX
),
dimension
(
NMSGLLINEMAX
)
::
cmnhmsg
=
''
integer
,
save
::
nfatal
=
0
integer
,
save
::
nerror
=
0
integer
,
save
::
nwarning
=
0
integer
,
save
::
ninfo
=
0
integer
,
save
::
ndebug
=
0
interface
Print_msg
interface
Print_msg
module
procedure
Print_msg_1line
,
Print_msg_multi_cmnhmsg
,
Print_msg_multi
module
procedure
Print_msg_1line
,
Print_msg_multi_cmnhmsg
,
Print_msg_multi
end
interface
Print_msg
end
interface
Print_msg
...
@@ -141,14 +148,19 @@ ilines = size( hmsg )
...
@@ -141,14 +148,19 @@ ilines = size( hmsg )
SELECT
CASE
(
KVERB
)
SELECT
CASE
(
KVERB
)
CASE
(
NVERB_FATAL
)
CASE
(
NVERB_FATAL
)
YPRE
=
'FATAL: '
YPRE
=
'FATAL: '
nfatal
=
nfatal
+
1
CASE
(
NVERB_ERROR
)
CASE
(
NVERB_ERROR
)
YPRE
=
'ERROR: '
YPRE
=
'ERROR: '
nerror
=
nerror
+
1
CASE
(
NVERB_WARNING
)
CASE
(
NVERB_WARNING
)
YPRE
=
'WARNING: '
YPRE
=
'WARNING: '
nwarning
=
nwarning
+
1
CASE
(
NVERB_INFO
)
CASE
(
NVERB_INFO
)
YPRE
=
'INFO: '
YPRE
=
'INFO: '
ninfo
=
ninfo
+
1
CASE
(
NVERB_DEBUG
)
CASE
(
NVERB_DEBUG
)
YPRE
=
'DEBUG: '
YPRE
=
'DEBUG: '
ndebug
=
ndebug
+
1
CASE
DEFAULT
CASE
DEFAULT
IF
(
GWRITE_STDOUT
)
WRITE
(
UNIT
=
OUTPUT_UNIT
,
FMT
=*
)
'ERROR: PRINT_MSG: wrong verbosity level'
IF
(
GWRITE_STDOUT
)
WRITE
(
UNIT
=
OUTPUT_UNIT
,
FMT
=*
)
'ERROR: PRINT_MSG: wrong verbosity level'
IF
(
GWRITE_OUTLST
)
WRITE
(
UNIT
=
ILU
,
FMT
=*
)
'ERROR: PRINT_MSG: wrong verbosity level'
IF
(
GWRITE_OUTLST
)
WRITE
(
UNIT
=
ILU
,
FMT
=*
)
'ERROR: PRINT_MSG: wrong verbosity level'
...
@@ -256,4 +268,31 @@ END IF
...
@@ -256,4 +268,31 @@ END IF
!
!
end
subroutine
Print_msg_multi
end
subroutine
Print_msg_multi
subroutine
Msg_stats
()
character
(
len
=
10
)
::
ydebug
character
(
len
=
10
)
::
yinfo
character
(
len
=
10
)
::
ywarning
character
(
len
=
10
)
::
yerror
character
(
len
=
10
)
::
yfatal
Write
(
ydebug
,
'( I10 )'
)
ndebug
Write
(
yinfo
,
'( I10 )'
)
ninfo
Write
(
ywarning
,
'( I10 )'
)
nwarning
Write
(
yerror
,
'( I10 )'
)
nerror
Write
(
yfatal
,
'( I10 )'
)
nfatal
Write
(
cmnhmsg
(
1
),
'( A )'
)
'Number of calls to Print_msg (with actual printing):'
Write
(
cmnhmsg
(
2
),
'( A, A10 )'
)
' Calls with level DEBUG: '
,
ydebug
Write
(
cmnhmsg
(
3
),
'( A, A10 )'
)
' Calls with level INFO: '
,
yinfo
Write
(
cmnhmsg
(
4
),
'( A, A10 )'
)
' Calls with level WARNING: '
,
ywarning
Write
(
cmnhmsg
(
5
),
'( A, A10 )'
)
' Calls with level ERROR: '
,
yerror
Write
(
cmnhmsg
(
6
),
'( A, A10 )'
)
' Calls with level FATAL: '
,
yfatal
call
Print_msg
(
NVERB_INFO
,
'GEN'
,
'Msg_stats'
)
end
subroutine
Msg_stats
end
module
mode_msg
end
module
mode_msg
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