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
0a8ef8e6
Commit
0a8ef8e6
authored
2 years ago
by
RIETTE Sébastien
Browse files
Options
Downloads
Patches
Plain Diff
S. Riette 28 nov 2022: testprogs output enhancement
parent
101a6452
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/testprogs/support/diff.F90
+7
-7
7 additions, 7 deletions
src/testprogs/support/diff.F90
tools/check_commit_testprogs.sh
+11
-2
11 additions, 2 deletions
tools/check_commit_testprogs.sh
with
18 additions
and
9 deletions
src/testprogs/support/diff.F90
+
7
−
7
View file @
0a8ef8e6
...
@@ -31,20 +31,20 @@ IF (LLCHECK) THEN
...
@@ -31,20 +31,20 @@ IF (LLCHECK) THEN
IF
(
SUM
(
ABS
(
POUT
)
+
ABS
(
PREF
))
>
0
)
THEN
IF
(
SUM
(
ABS
(
POUT
)
+
ABS
(
PREF
))
>
0
)
THEN
WRITE
(
*
,
'(A4)'
,
ADVANCE
=
'NO'
)
""
WRITE
(
*
,
'(A4)'
,
ADVANCE
=
'NO'
)
""
DO
JLON
=
1
,
NPROMA
DO
JLON
=
1
,
NPROMA
WRITE
(
*
,
'("|",I12,A12)'
,
ADVANCE
=
'NO'
)
JLON
,
""
WRITE
(
*
,
'("|",I12,
"..",
A12)'
,
ADVANCE
=
'NO'
)
JLON
,
""
ENDDO
ENDDO
WRITE
(
*
,
'("|")'
)
WRITE
(
*
,
'("|")'
)
DO
JLEV
=
1
,
KLEV
DO
JLEV
=
1
,
KLEV
WRITE
(
*
,
'(I4)'
,
ADVANCE
=
'NO'
)
JLEV
WRITE
(
*
,
'(I4)'
,
ADVANCE
=
'NO'
)
JLEV
DO
JLON
=
1
,
NPROMA
DO
JLON
=
1
,
NPROMA
IF
(
ABS
(
PREF
(
JLON
,
1
,
JLEV
))
+
ABS
(
POUT
(
JLON
,
1
,
JLEV
))
==
0.
)
THEN
IF
(
ABS
(
PREF
(
JLON
,
1
,
JLEV
))
+
ABS
(
POUT
(
JLON
,
1
,
JLEV
))
==
0.
)
THEN
WRITE
(
*
,
'("|",
2
A12)'
,
ADVANCE
=
'NO'
)
""
,
""
WRITE
(
*
,
'("|",
A12,"..",
A12)'
,
ADVANCE
=
'NO'
)
""
,
""
ELSE
ELSE
!
IF(ABS(POUT (JLON, 1, JLEV)-PREF (JLON, 1, JLEV))>0.001 * ABS(PREF (JLON, 1, JLEV))) THEN
IF
(
ABS
(
POUT
(
JLON
,
1
,
JLEV
)
-
PREF
(
JLON
,
1
,
JLEV
))
>
0.001
*
ABS
(
PREF
(
JLON
,
1
,
JLEV
)))
THEN
!
WRITE (*, '("|",E12.5,"!=",E12.5)', ADVANCE='NO') PREF (JLON, 1, JLEV), POUT (JLON, 1, JLEV)
WRITE
(
*
,
'("|",E12.5,"!=",E12.5)'
,
ADVANCE
=
'NO'
)
PREF
(
JLON
,
1
,
JLEV
),
POUT
(
JLON
,
1
,
JLEV
)
!
ELSE
ELSE
WRITE
(
*
,
'("|",
2
E12.5)'
,
ADVANCE
=
'NO'
)
PREF
(
JLON
,
1
,
JLEV
),
POUT
(
JLON
,
1
,
JLEV
)
WRITE
(
*
,
'("|",
E12.5,"~=",
E12.5)'
,
ADVANCE
=
'NO'
)
PREF
(
JLON
,
1
,
JLEV
),
POUT
(
JLON
,
1
,
JLEV
)
!
ENDIF
ENDIF
ENDIF
ENDIF
ENDDO
ENDDO
WRITE
(
*
,
'("|")'
)
WRITE
(
*
,
'("|")'
)
...
...
This diff is collapsed.
Click to expand it.
tools/check_commit_testprogs.sh
+
11
−
2
View file @
0a8ef8e6
...
@@ -9,7 +9,12 @@ set -e
...
@@ -9,7 +9,12 @@ set -e
#ice_adjust: the ice adjust test case
#ice_adjust: the ice adjust test case
#ref is commit 855b8f8 for ice_adjust, rain_ice, turb and shallow_mf
#ref is commit 855b8f8 for ice_adjust, rain_ice
#ref is commit 4171c53 for turb
#Commit 4171c53 can be used for turb (ref commit for this testprogs), and for
#rain_ice and ice_adjust (as it gives the same results as commit 855b8f8
#for these test cases).
specialName
=
"ref"
specialName
=
"ref"
availTests
=
"ice_adjust,rain_ice,turb"
availTests
=
"ice_adjust,rain_ice,turb"
...
@@ -258,9 +263,13 @@ if [ $check -eq 1 ]; then
...
@@ -258,9 +263,13 @@ if [ $check -eq 1 ]; then
fi
fi
if
[
$te
-eq
0
]
;
then
if
[
$te
-eq
0
]
;
then
set
+e
set
+e
mess
=
$(
cmp
$file1
$file2
246 246 2>&1
)
mess
=
$(
cmp <
(
cat
$file1
|
sed
's/\.\.//g'
|
sed
's/~=//g'
|
sed
's/!=//g'
)
\
<
(
cat
$file2
|
sed
's/\.\.//g'
|
sed
's/~=//g'
|
sed
's/!=//g'
)
246 246 2>&1
)
te
=
$?
te
=
$?
set
-e
set
-e
#The use of "<()" bash syntax replaces the actual file name seen by cmp
#We modify the cmp output to display the actual file names
mess
=
$(
echo
$mess
|
sed
"s#^.*differ#
$file1
$file2
differ#"
)
fi
fi
[
$te
-ne
0
]
&&
message
=
"
$message
$mess
\n
"
[
$te
-ne
0
]
&&
message
=
"
$message
$mess
\n
"
alltests
=
$((
$alltests
+
$te
))
alltests
=
$((
$alltests
+
$te
))
...
...
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