Skip to content

Commit e103b84

Browse files
authored
Add timing to matching script (#202)
1 parent 10b59c3 commit e103b84

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

misc/match_group_membership.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"""
2424

2525
import argparse
26+
import datetime
2627
import os
2728

2829
from mpi4py import MPI
@@ -319,6 +320,8 @@ def mpi_print(string, comm_rank):
319320

320321
if __name__ == "__main__":
321322

323+
start_time = datetime.datetime.now()
324+
322325
parser = argparse.ArgumentParser(
323326
description=(
324327
"Script to match halos across runs by comparing particles"
@@ -503,4 +506,6 @@ def mpi_print(string, comm_rank):
503506
phdf5.collective_write(file, "MatchCount2to1", match_count_21, comm=comm)
504507
phdf5.collective_write(file, "Consistent2to1", consistent_21, comm=comm)
505508

509+
comm.barrier()
510+
mpi_print(f"Runtime: {datetime.datetime.now() - start_time}", comm_rank)
506511
mpi_print("Done!", comm_rank)

0 commit comments

Comments
 (0)