Final merge changes from Jeff?

This commit is contained in:
Eric Winter
2025-08-27 12:16:29 -06:00
parent f4f5044d31
commit 166da3f45a
4 changed files with 7 additions and 111 deletions

View File

@@ -517,83 +517,6 @@ def merge_REMIX_quicklook_plots(plots_north: list, plots_south: list):
return merged_plot_north, merged_plot_south
# def create_RCM_quicklook_plots(xml_files: list):
# """Create the RCM quicklook plot for each run.
# Create the RCM quicklook plot for each run.
# Parameters
# ----------
# xml_files : list of str
# List of XML files describing each run.
# Returns
# -------
# quicklook_plots : list of str
# Path to each quicklook file.
# Raises
# ------
# None
# """
# # Save the current directory.
# cwd = os.getcwd()
# # Make the RCM quicklook plot for each run.
# quicklook_plots = []
# for xml_file in xml_files:
# # Extract the run ID.
# runid = common.extract_runid(xml_file)
# # Compute the path to the results directory.
# results_dir = os.path.split(xml_file)[0]
# # Move to the results directory.
# os.chdir(results_dir)
# # Create the quicklook plot.
# cmd = f"rcmpic.py -id {runid}"
# _ = subprocess.run(cmd, shell=True, check=True)
# # Add the plot to the list.
# path = os.path.join(results_dir, "qkrcmpic.png")
# quicklook_plots.append(path)
# # Return to the original directory.
# os.chdir(cwd)
# # Return the list of quicklook plots.
# return quicklook_plots
# def merge_RCM_quicklook_plots(quicklook_plots: list):
# """Merge the RCM quicklook plots for all runs.
# Merge the RCM quicklook plots for all runs.
# Parameters
# ----------
# quicklook_plots : list of str
# List of quicklook plots to merge.
# Returns
# -------
# merged_plot : str
# Path to merged quicklook file.
# Raises
# ------
# None
# """
# # Merge RCM quicklooks.
# merged_plot = "combined_qkrcmpic.png"
# cmd = f"convert {' '.join(quicklook_plots)} -append {merged_plot}"
# print(f"cmd = {cmd}")
# _ = subprocess.run(cmd, shell=True, check=True)
# return merged_plot
def compare_mage_runs(args):
"""Compare a set of MAGE model runs.
@@ -722,7 +645,6 @@ def compare_mage_runs(args):
"combined_msphpic.png",
"combined_remix_n.png",
"combined_remix_s.png",
# "combined_qkrcmpic.png",
]
comments_to_post = [
"Real-Time Performance\n\n",
@@ -731,7 +653,6 @@ def compare_mage_runs(args):
"Magnetosphere Quicklook Comparison Plots\n\n",
"REMIX (north) Quicklook Comparison Plots\n\n",
"REMIX (south) Quicklook Comparison Plots\n\n",
# "RCM Quicklook Comparison Plots\n\n",
]
# If loud mode is on, post results to Slack.

View File

@@ -417,14 +417,6 @@ def compare_mage_runs_numerical(args: dict):
print(f"comparison_result = {comparison_result}")
comparison_results.append(comparison_result)
# # Compare the MHD RCM output files.
# if verbose:
# print("Comparing MHD RCM output files.")
# comparison_result = compare_MHDRCM_results(runxml1, runxml2, verbose)
# if debug:
# print(f"comparison_result = {comparison_result}")
# comparison_results.append(comparison_result)
# Compare the REMIX output files.
if verbose:
print("Comparing REMIX output files.")
@@ -433,14 +425,6 @@ def compare_mage_runs_numerical(args: dict):
print(f"comparison_result = {comparison_result}")
comparison_results.append(comparison_result)
# # Compare the RCM output files.
# if verbose:
# print("Comparing RCM output files.")
# comparison_result = compare_RCM_results(runxml1, runxml2, verbose)
# if debug:
# print(f"comparison_result = {comparison_result}")
# comparison_results.append(comparison_result)
# Compare the VOLTRON output files.
if verbose:
print("Comparing VOLTRON output files.")
@@ -454,9 +438,7 @@ def compare_mage_runs_numerical(args: dict):
# Detail the test results.
test_report_details_string = ""
test_report_details_string += f"GAMERA: *{comparison_results[0]}*\n"
# test_report_details_string += f"MHD RCM: *{comparison_results[1]}*\n"
test_report_details_string += f"REMIX: *{comparison_results[2]}*\n"
# test_report_details_string += f"RCM: *{comparison_results[3]}*\n"
test_report_details_string += f"VOLTRON: *{comparison_results[4]}*\n"
# Summarize the test results.

View File

@@ -150,9 +150,6 @@ def derecho_configuration_check(args: dict):
"cda2wind -t0 2016-08-09T02:00:00 -t1 2016-08-09T12:00:00"
)
# # Create the command to generate the RCM configuration.
# genRCM_cmd = "genRCM.py"
# Create the command for launching an MPI program.
mpiexec_cmd = f"mpiexec {KAIJUHOME}/scripts/preproc/pinCpuCores.sh"
@@ -179,13 +176,10 @@ def derecho_configuration_check(args: dict):
pbs_options["job_priority"] = os.environ["DERECHO_TESTING_PRIORITY"]
pbs_options["walltime"] = "08:00:00"
pbs_options["modules"] = module_names
# pbs_options["condarc"] = os.environ["CONDARC"]
# pbs_options["conda_envs_path"] = os.environ["CONDA_ENVS_PATH"]
pbs_options["conda_environment"] = os.environ["CONDA_ENVIRONMENT"]
pbs_options["mage_test_root"] = os.environ["MAGE_TEST_ROOT"]
pbs_options["mage_test_set_root"] = os.environ["MAGE_TEST_SET_ROOT"]
pbs_options["kaijuhome"] = KAIJUHOME
# pbs_options["kaipy_private_root"] = os.environ["KAIPY_PRIVATE_ROOT"]
pbs_options["tmpdir"] = os.environ["TMPDIR"]
pbs_options["slack_bot_token"] = os.environ["SLACK_BOT_TOKEN"]
pbs_options["branch_or_commit"] = os.environ["BRANCH_OR_COMMIT"]
@@ -193,7 +187,6 @@ def derecho_configuration_check(args: dict):
pbs_options["make_cmd"] = make_cmd
pbs_options["genLFM_cmd"] = genLFM_cmd
pbs_options["cda2wind_cmd"] = cda2wind_cmd
# pbs_options["genRCM_cmd"] = genRCM_cmd
pbs_options["mpiexec_cmd"] = mpiexec_cmd
pbs_options["voltron_cmd"] = voltron_cmd

View File

@@ -152,13 +152,13 @@ def mage_reproducibility_check(args: dict):
subprocess.CalledProcessError
If an exception occurs in subprocess.run()
"""
# Set missing arguments to defaults.
debug = args["debug"]
loud = args["loud"]
slack_on_fail = args["slack_on_fail"]
test = args["test"]
verbose = args["verbose"]
module_set_file = args["module_set_file"]
# Local convenience variables.
debug = args.get("debug", False)
loud = args.get("loud", False)
slack_on_fail = args.get("slack_on_fail", False)
test = args.get("test", False)
verbose = args.get("verbose", False)
module_set_file = args.get("module_set_file", DEFAULT_MODULE_SET_FILE)
# ------------------------------------------------------------------------