Compare commits
2 commits
c2bf0cb74b
...
41dab7a647
Author | SHA1 | Date | |
---|---|---|---|
41dab7a647 | |||
2944f3cae9 |
1 changed files with 12 additions and 1 deletions
|
@ -13,6 +13,9 @@ def parse_arguments():
|
||||||
parser.add_argument('-s', '--scaling',
|
parser.add_argument('-s', '--scaling',
|
||||||
choices=['strong','weak'], default='weak',
|
choices=['strong','weak'], default='weak',
|
||||||
help='Strong or weak scaling experiment')
|
help='Strong or weak scaling experiment')
|
||||||
|
parser.add_argument('-d', '--debug',
|
||||||
|
action='store_true',
|
||||||
|
help='Print debug messages for developers')
|
||||||
parser.add_argument('mpip_report', nargs='+', type=argparse.FileType('r'))
|
parser.add_argument('mpip_report', nargs='+', type=argparse.FileType('r'))
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
@ -26,7 +29,7 @@ def get_Nranks(fn):
|
||||||
try:
|
try:
|
||||||
nranks = int(result.stdout)
|
nranks = int(result.stdout)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
logging.info("Cannot infer nranks from '@ MPI Task Assignment'.")
|
logging.warning("Cannot infer nranks from '@ MPI Task Assignment'.")
|
||||||
nranks = None
|
nranks = None
|
||||||
|
|
||||||
return {"ranks": nranks}
|
return {"ranks": nranks}
|
||||||
|
@ -225,6 +228,10 @@ def print_scaling(scaling, stream=sys.stdout):
|
||||||
def main():
|
def main():
|
||||||
args = parse_arguments()
|
args = parse_arguments()
|
||||||
|
|
||||||
|
if args.debug:
|
||||||
|
logging.getLogger().setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
|
||||||
metrics = list()
|
metrics = list()
|
||||||
|
|
||||||
# compute parallel efficiencies for each input
|
# compute parallel efficiencies for each input
|
||||||
|
@ -242,5 +249,9 @@ def main():
|
||||||
pretty_print(metrics)
|
pretty_print(metrics)
|
||||||
print_scaling(args.scaling)
|
print_scaling(args.scaling)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
# set default logging level
|
||||||
|
logging.getLogger().setLevel(logging.WARNING)
|
||||||
|
|
||||||
main()
|
main()
|
Loading…
Reference in a new issue