From 9919a98c7832b69e926310ec6066d3756d70b361 Mon Sep 17 00:00:00 2001 From: Hashim Sharif <hsharif3@miranda.cs.illinois.edu> Date: Thu, 1 Apr 2021 21:42:54 -0500 Subject: [PATCH] Fixing PIPE issue in subprocess.check_call - hpvm_profiler --- hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py b/hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py index 14d0f491b8..4e91fbbe4a 100644 --- a/hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py +++ b/hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py @@ -50,7 +50,7 @@ def profile_configs( # Run binary_path binary, # which generates `profile_filename` and `qos_filename` file in cwd. try: - check_call([str(binary_path), "-c", str(temp_file.name)], stdout=PIPE) + check_call([str(binary_path), "-c", str(temp_file.name)]) except CalledProcessError as e: print("Output from the program:") print(e.output) @@ -158,9 +158,12 @@ def read_hpvm_configs(config_file: PathLike) -> Tuple[str, List[Config]]: def write_hpvm_config(header: str, configs: Iterable[Config], to_file: PathLike): + text_segs = [header] + [str(config) for config in configs] with open(to_file, "w") as f: f.write("\n".join(text_segs)) + f.flush() + def _read_profile_file(profile_file_path: Path): -- GitLab