Skip to content

Commit

Permalink
Add handling for output file naming conventions in OpenMPI 5.0.x (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvoskuilen authored Oct 2, 2024
1 parent 13b3e18 commit b863990
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/sst/core/testingframework/sst_unittest_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -1418,6 +1418,7 @@ def testing_merge_mpi_files(filepath_wildcard, mpiout_filename, outputfilepath,
outputfilepath (str): The output file path for stdout
errorfilepath (str): The output file path for stderr. If none, stderr redirects to stdout.
"""

check_param_type("filepath_wildcard", filepath_wildcard, str)
check_param_type("mpiout_filename", mpiout_filename, str)
check_param_type("outputfilepath", outputfilepath, str)
Expand Down Expand Up @@ -1449,8 +1450,15 @@ def testing_merge_mpi_files(filepath_wildcard, mpiout_filename, outputfilepath,
os.system(cmd)
else:
# Cat the files together normally (OpenMPI V5)
cmd = "cat {0} > {1}".format(filepath_wildcard, outputfilepath)
os.system(cmd)
# MPI 5.x - [email protected] or .err
if errorfilepath is None:
cmd = "cat {0} > {1}".format(filepath_wildcard, outputfilepath)
os.system(cmd)
else:
cmd = "cat {0}.out > {1}".format(filepath_wildcard, outputfilepath)
os.system(cmd)
cmd = "cat {0}.err > {1}".format(filepath_wildcard, errorfilepath)
os.system(cmd)

###

Expand Down

0 comments on commit b863990

Please sign in to comment.