Compare commits

..

2 commits

Author SHA1 Message Date
41dab7a647 Add flag vor debug logging 2024-01-26 13:46:12 +01:00
2944f3cae9 Fix log level of a message 2024-01-26 11:47:25 +01:00

View file

@ -13,6 +13,9 @@ def parse_arguments():
parser.add_argument('-s', '--scaling',
choices=['strong','weak'], default='weak',
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'))
return parser.parse_args()
@ -26,7 +29,7 @@ def get_Nranks(fn):
try:
nranks = int(result.stdout)
except ValueError:
logging.info("Cannot infer nranks from '@ MPI Task Assignment'.")
logging.warning("Cannot infer nranks from '@ MPI Task Assignment'.")
nranks = None
return {"ranks": nranks}
@ -225,6 +228,10 @@ def print_scaling(scaling, stream=sys.stdout):
def main():
args = parse_arguments()
if args.debug:
logging.getLogger().setLevel(logging.DEBUG)
metrics = list()
# compute parallel efficiencies for each input
@ -242,5 +249,9 @@ def main():
pretty_print(metrics)
print_scaling(args.scaling)
if __name__ == "__main__":
# set default logging level
logging.getLogger().setLevel(logging.WARNING)
main()