Skip to content
Snippets Groups Projects
Commit 9919a98c authored by Hashim Sharif's avatar Hashim Sharif
Browse files

Fixing PIPE issue in subprocess.check_call - hpvm_profiler

parent 698806b5
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment