Commit a83ecc10 authored by Ashwin Vishnu's avatar Ashwin Vishnu
Browse files

Fix duplicate progress bar problem

parent 61d0d45c5765
Pipeline #12694 passed with stage
in 8 minutes and 48 seconds
......@@ -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,
)
......@@ -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():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment