Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fluiddyn
fluidsim
Commits
47dd0bb7d1b4
Commit
a043304b
authored
Aug 26, 2020
by
Pierre Augier
Browse files
Fix end_of_simul with FLUIDDYN_PATH_SCRATCH + define this variable for the CI
parent
7e0ab58ddab4
Pipeline
#9334
passed with stage
in 10 minutes and 34 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
fluidsim/base/output/base.py
View file @
47dd0bb7
...
...
@@ -578,9 +578,11 @@ Warning: params.NEW_DIR_RESULTS is False but the resolutions of the simulation
self
.
__dict__
[
k
].
_close_file
()
def
end_of_simul
(
self
,
total_time
):
# self.path_run: str
path_run
=
Path
(
self
.
path_run
)
self
.
print_stdout
(
f
"Computation completed in
{
total_time
:
8.6
g
}
s
\n
"
"path_run =
\n
"
+
self
.
path_run
f
"path_run =
\n
{
path_run
}
"
)
if
self
.
_has_to_save
:
if
hasattr
(
self
.
sim
,
"forcing"
):
...
...
@@ -599,17 +601,17 @@ Warning: params.NEW_DIR_RESULTS is False but the resolutions of the simulation
new_path_run
=
path_base
/
self
.
sim
.
name_run
try
:
if
new_path_run
.
parent
.
samefile
(
Path
(
self
.
path_run
)
.
parent
):
if
new_path_run
.
parent
.
samefile
(
path_run
.
parent
):
return
except
OSError
:
pass
if
mpi
.
rank
==
0
:
if
mpi
.
rank
==
0
and
path_run
.
exists
()
:
if
not
path_base
.
exists
():
os
.
makedirs
(
path_base
)
shutil
.
move
(
self
.
path_run
,
path_base
)
print
(
"move result directory in directory:
\n
"
+
new_path_run
)
print
(
f
"move result directory in directory:
\n
{
new_path_run
}
"
)
self
.
path_run
=
str
(
new_path_run
)
for
spec_output
in
list
(
self
.
__dict__
.
values
()):
...
...
tox.ini
View file @
47dd0bb7
...
...
@@ -17,6 +17,9 @@ envlist =
[testenv]
passenv
=
SKIP_SHTNS
setenv
=
FLUIDSIM_PATH
=
{toxinidir}/fluidsim_path
FLUIDDYN_PATH_SCRATCH
=
{toxinidir}/scratch
sitepackages
=
True
whitelist_externals
=
make
usedevelop
=
True
...
...
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