Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
IPSL
LMD
InTro
RoutingPP
Commits
f061f003
Commit
f061f003
authored
Sep 24, 2021
by
Anthony
Browse files
Avoid infinite loop when the nbasmax is already fine.
parent
b2b92c5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
Truncate.py
Truncate.py
+12
-2
No files found.
Truncate.py
View file @
f061f003
...
...
@@ -72,9 +72,13 @@ class trunc:
with
open
(
"check.out"
,
"a+"
)
as
foo
:
foo
.
write
(
"Step 1 iter. {0}, maxops: {1}->max_bas : {2}
\n
"
.
format
(
i
,
self
.
max_ops_num
,
max_bas
))
INFO
(
"Step 1 iter. {0}, maxops: {1}->max_bas : {2}"
.
format
(
i
,
self
.
max_ops_num
,
max_bas
))
if
max_bas
<
self
.
nbasmax
:
break
i
+=
1
hydrosuper
.
fetch
(
part
)
comm
.
Barrier
()
if
max_bas
<=
self
.
nbasmax
:
break
# Step 2 : HTUs going to the same neighbour
i
=
1
...
...
@@ -107,7 +111,9 @@ class trunc:
comm
.
Barrier
()
hydrosuper
.
fetch
(
part
)
#comm.Barrier()
i
+=
1
i
+=
1
if
max_bas
<=
self
.
nbasmax
:
break
# Step 3 : HTUs with the same ID
...
...
@@ -138,7 +144,9 @@ class trunc:
INFO
(
"Step 3 iter. {0} (halo) maxops: {1}->max_bas : {2}"
.
format
(
i
,
self
.
max_ops_num_halo
,
max_bas
))
hydrosuper
.
fetch
(
part
)
comm
.
Barrier
()
i
+=
1
i
+=
1
if
max_bas
<=
self
.
nbasmax
:
break
# Step 4 : HTUs going to the same point
...
...
@@ -155,6 +163,8 @@ class trunc:
hydrosuper
.
fetch
(
part
)
comm
.
Barrier
()
i
+=
1
if
max_bas
<=
self
.
nbasmax
:
break
# Step 5 : Brutal method
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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