Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fluiddyn
transonic
Commits
9de0cf49b878
Commit
a83ecc10
authored
Nov 13, 2020
by
Ashwin Vishnu
Browse files
Fix duplicate progress bar problem
parent
61d0d45c5765
Pipeline
#12694
passed with stage
in 8 minutes and 48 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
transonic/compiler.py
View file @
9de0cf49
...
...
@@ -197,9 +197,6 @@ class SchedulerPopen:
self
.
processes
.
append
(
process
)
advance
(
70
)
if
mpi
.
rank
==
0
:
# FIXME: If we don't remove the task, duplicate progress bars appear
self
.
progress
.
remove_task
(
task
)
return
process
...
...
@@ -209,8 +206,7 @@ scheduler = SchedulerPopen()
def
wait_for_all_extensions
():
"""Wait until all compilation processes are done"""
with
scheduler
.
progress
:
scheduler
.
wait_for_all_extensions
()
scheduler
.
wait_for_all_extensions
()
def
compile_extension
(
...
...
@@ -228,15 +224,14 @@ def compile_extension(
path
=
Path
(
path
)
# return the process
with
scheduler
.
progress
:
return
scheduler
.
compile_extension
(
path
,
backend
,
name_ext_file
,
native
=
native
,
xsimd
=
xsimd
,
openmp
=
openmp
,
str_accelerator_flags
=
str_accelerator_flags
,
parallel
=
parallel
,
force
=
force
,
)
return
scheduler
.
compile_extension
(
path
,
backend
,
name_ext_file
,
native
=
native
,
xsimd
=
xsimd
,
openmp
=
openmp
,
str_accelerator_flags
=
str_accelerator_flags
,
parallel
=
parallel
,
force
=
force
,
)
transonic/run.py
View file @
9de0cf49
...
...
@@ -17,7 +17,7 @@ import sys
from
transonic
import
__version__
from
transonic.compiler
import
wait_for_all_extensions
from
transonic.compiler
import
wait_for_all_extensions
,
scheduler
from
.backends
import
backends
from
transonic.config
import
backend_default
...
...
@@ -106,15 +106,16 @@ def run():
if
backend_path
.
exists
()
and
has_to_build
(
ext_path
,
backend_path
):
backends_paths
.
append
(
backend_path
)
backend
.
compile_extensions
(
backends_paths
,
str_accelerator_flags
=
args
.
accelerator_flags
,
parallel
=
True
,
force
=
args
.
force
,
)
with
scheduler
.
progress
:
backend
.
compile_extensions
(
backends_paths
,
str_accelerator_flags
=
args
.
accelerator_flags
,
parallel
=
True
,
force
=
args
.
force
,
)
if
not
args
.
no_blocking
:
wait_for_all_extensions
()
if
not
args
.
no_blocking
:
wait_for_all_extensions
()
def
parse_args
():
...
...
Write
Preview
Supports
Markdown
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