Skip to content

Commit 9055b13

Browse files
author
telemin
committed
correct names for metric cli calc
1 parent a4be35b commit 9055b13

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pypop/cli.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ def _dimemas_idealise_parse_args():
3838
return parser.parse_args()
3939

4040

41-
def _mpi_parse_args():
41+
def _cli_metrics_parse_args(metric_name="MPI"):
4242

4343
# make an argument parser
44-
parser = ArgumentParser(description="Calculate POP MPI strong scaling metrics")
44+
parser = ArgumentParser(
45+
description="Calculate POP {} strong scaling metrics".format(metric_name)
46+
)
4547

4648
# First define collection of traces
4749
parser.add_argument(
@@ -134,7 +136,7 @@ def mpi_cli_metrics():
134136
"""Entrypoint for pypop-mpi-metrics script
135137
"""
136138

137-
config = _mpi_parse_args()
139+
config = _cli_metrics_parse_args("MPI")
138140

139141
if config.paramedir_path:
140142
set_paramedir_path(config.paramedir_path)
@@ -165,7 +167,7 @@ def openmp_cli_metrics():
165167
"""Entrypoint for pypop-hybrid-metrics script
166168
"""
167169

168-
config = _mpi_parse_args()
170+
config = _cli_metrics_parse_args("OpenMP")
169171

170172
if config.paramedir_path:
171173
set_paramedir_path(config.paramedir_path)
@@ -196,7 +198,7 @@ def hybrid_cli_metrics():
196198
"""Entrypoint for pypop-hybrid-metrics script
197199
"""
198200

199-
config = _mpi_parse_args()
201+
config = _cli_metrics_parse_args("hybrid MPI+OpenMP")
200202

201203
if config.paramedir_path:
202204
set_paramedir_path(config.paramedir_path)
@@ -283,11 +285,9 @@ def copy_examples():
283285

284286
config = _copy_examples_parse_args()
285287

286-
outpath = (
287-
getcwd() if config.target_dir is None else expanduser(config.target_dir)
288-
)
288+
outpath = getcwd() if config.target_dir is None else expanduser(config.target_dir)
289289

290-
outpath = normpath(path_join(outpath, 'pypop_examples'))
290+
outpath = normpath(path_join(outpath, "pypop_examples"))
291291

292292
try:
293293
copytree(examples_directory(), outpath)

0 commit comments

Comments
 (0)