diff --git a/testingScripts/compare_mage_runs.py b/testingScripts/compare_mage_runs.py index ab3b54a8..baf87c33 100755 --- a/testingScripts/compare_mage_runs.py +++ b/testingScripts/compare_mage_runs.py @@ -384,7 +384,7 @@ def create_magnetosphere_quicklook_plots(xml_files: list): os.chdir(results_dir) # Create the quicklook plot. - cmd = f"msphpic.py -id {runid}" + cmd = f"msphpic -id {runid}" _ = subprocess.run(cmd, shell=True, check=True) # Move back to the starting directory. @@ -464,7 +464,7 @@ def create_REMIX_quicklook_plots(xml_files: list): os.chdir(results_dir) # Create the quicklook plots. - cmd = f"mixpic.py -id {runid}" + cmd = f"mixpic -id {runid}" _ = subprocess.run(cmd, shell=True, check=True) # Add the plots to the lists. @@ -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. @@ -710,20 +633,6 @@ def compare_mage_runs(args): print(f"merged_remix_plot_n = {merged_remix_plot_n}") print(f"merged_remix_plot_s = {merged_remix_plot_s}") - # Create the RCM quicklook plots. - if verbose: - print("Creating RCM quicklook plots.") - rcm_plots = create_RCM_quicklook_plots(run_xml_files) - if debug: - print(f"rcm_plots = {rcm_plots}") - - # Create the merged RCM quicklook plots. - if verbose: - print("Creating merged RCM quicklook plot.") - rcm_merged_plots = merge_RCM_quicklook_plots(rcm_plots) - if debug: - print(f"rcm_merged_plots = {rcm_merged_plots}") - # ------------------------------------------------------------------------ # Post images to Slack. @@ -736,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", @@ -745,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. diff --git a/testingScripts/compare_mage_runs_numerical.py b/testingScripts/compare_mage_runs_numerical.py index ed5e1561..88324c95 100755 --- a/testingScripts/compare_mage_runs_numerical.py +++ b/testingScripts/compare_mage_runs_numerical.py @@ -125,67 +125,6 @@ def compare_GAMERA_results(runxml1: str, runxml2: str, verbose: bool = False): return TEST_PASS -def compare_MHDRCM_results(runxml1: str, runxml2: str, verbose: bool = False): - """Numerically compare the MHD RCM output files from two runs. - - Numerically compare the MHD RCM output files from two runs. - - Parameters - ---------- - runxm1 : str - Path to XML file describing 1st run. - runxm2 : str - Path to XML file describing 2nd run. - verbose : bool - Set to True to print verbose information during comparison. - - Returns - ------- - TEST_PASS or TEST_FAIL : str - Description of result of comparison. - - Raises - ------ - None - """ - # Determine the directories containing the sets of results. - dir1 = os.path.split(runxml1)[0] - dir2 = os.path.split(runxml2)[0] - - # Generate a sorted list of output files for the 1st run. - pattern1 = os.path.join(dir1, "*.mhdrcm.h5") - files1 = glob.glob(pattern1) - files = [os.path.split(f)[1] for f in files1] - files.sort() - - # Compare each output file in the two directories. - # Comparisons are done with h5diff, which must be in the PATH. - # Attributes of the steps and other top-level groups are excluded from - # comparison. - for filename in files: - file1 = os.path.join(dir1, filename) - file2 = os.path.join(dir2, filename) - if verbose: - print(f"Numerically comparing {file1} to {file2}.") - - # Compare each step, without attributes. - _, step_ids = kaiH5.cntSteps(file1) - for step_id in step_ids: - step_path = f"/Step#{step_id}" - if verbose: - print(f" Comparing {step_path}.") - cmd = ( - f"h5diff --exclude-attribute {step_path} {file1} {file2} " - f"{step_path}" - ) - cproc = subprocess.run(cmd, shell=True, check=True) - if cproc.returncode != 0: - return TEST_FAIL - - # Return the result of the comparison. - return TEST_PASS - - def compare_REMIX_results(runxml1: str, runxml2: str, verbose: bool = False): """Numerically compare the REMIX output files from two runs. @@ -247,67 +186,6 @@ def compare_REMIX_results(runxml1: str, runxml2: str, verbose: bool = False): return TEST_PASS -def compare_RCM_results(runxml1: str, runxml2: str, verbose: bool = False): - """Numerically compare the RCM output files from two runs. - - Numerically compare the RCM output files from two runs. - - Parameters - ---------- - runxm1 : str - Path to XML file describing 1st run. - runxm2 : str - Path to XML file describing 2nd run. - verbose : bool - Set to True to print verbose information during comparison. - - Returns - ------- - TEST_PASS or TEST_FAIL : str - Description of result of comparison. - - Raises - ------ - None - """ - # Determine the directories containing the sets of results. - dir1 = os.path.split(runxml1)[0] - dir2 = os.path.split(runxml2)[0] - - # Generate a sorted list of output files for the 1st run. - pattern1 = os.path.join(dir1, "*.rcm.h5") - files1 = glob.glob(pattern1) - files = [os.path.split(f)[1] for f in files1] - files.sort() - - # Compare each result file in the two directories. - # Comparisons are done with h5diff, which must be in the PATH. - # Attributes of the steps and other top-level groups are excluded from - # comparison. - for filename in files: - file1 = os.path.join(dir1, filename) - file2 = os.path.join(dir2, filename) - if verbose: - print(f"Numerically comparing {file1} to {file2}.") - - # Compare each step, without attributes. - _, step_ids = kaiH5.cntSteps(file1) - for step_id in step_ids: - step_path = f"/Step#{step_id}" - if verbose: - print(f" Comparing {step_path}.") - cmd = ( - f"h5diff --exclude-attribute {step_path} {file1} {file2} " - f"{step_path}" - ) - cproc = subprocess.run(cmd, shell=True, check=True) - if cproc.returncode != 0: - return TEST_FAIL - - # Return the result of the comparison. - return TEST_PASS - - def compare_VOLTRON_results(runxml1: str, runxml2: str, verbose: bool = False): """Numerically compare the VOLTRON output files from two runs. @@ -417,14 +295,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 +303,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,10 +316,8 @@ 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" + test_report_details_string += f"REMIX: *{comparison_results[1]}*\n" + test_report_details_string += f"VOLTRON: *{comparison_results[2]}*\n" # Summarize the test results. if run_description is not None: diff --git a/testingScripts/crontab b/testingScripts/crontab index 1e7bb3d3..3aad14f0 100644 --- a/testingScripts/crontab +++ b/testingScripts/crontab @@ -16,8 +16,7 @@ # source tree). Job submission reports to Slack only on failure, report run # in Slack-on-fail (-s) mode. 15 00 * * * ssh derecho "/glade/campaign/hao/msphere/automated_kaiju_tests/kaiju-private/testingScripts/run_mage_tests.sh -v -b development 'unitTest.py -sv'" >> /glade/campaign/hao/msphere/automated_kaiju_tests/logs/nightly-tests-2-development.out 2>&1 -# Disable master unit test for now since it hangs. -# 20 00 * * * ssh derecho "/glade/campaign/hao/msphere/automated_kaiju_tests/kaiju-private/testingScripts/run_mage_tests.sh -v -b master 'unitTest.py -sv'" >> /glade/campaign/hao/msphere/automated_kaiju_tests/logs/nightly-tests-2-master.out 2>&1 +20 00 * * * ssh derecho "/glade/campaign/hao/msphere/automated_kaiju_tests/kaiju-private/testingScripts/run_mage_tests.sh -v -b master 'unitTest.py -sv'" >> /glade/campaign/hao/msphere/automated_kaiju_tests/logs/nightly-tests-2-master.out 2>&1 # Run a weekly dash every Sunday morning for the development branch and # compare to reference development run listed in reference_runs.txt. diff --git a/testingScripts/derecho_configuration_check-template.pbs b/testingScripts/derecho_configuration_check-template.pbs index 6db6122f..451473a8 100644 --- a/testingScripts/derecho_configuration_check-template.pbs +++ b/testingScripts/derecho_configuration_check-template.pbs @@ -20,21 +20,18 @@ echo 'The currently loaded modules are:' module list echo 'Loading python environment.' -export CONDARC="{{ condarc }}" -export CONDA_ENVS_PATH="{{ conda_envs_path }}" -mage_miniconda3="{{ mage_test_root }}/miniconda3" -mage_conda="${mage_miniconda3}/bin/conda" -__conda_setup="$($mage_conda 'shell.bash' 'hook' 2> /dev/null)" +__conda_setup="$('/glade/u/home/ewinter/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else - if [ -f "$mage_miniconda3/etc/profile.d/conda.sh" ]; then - . "$mage_miniconda3/etc/profile.d/conda.sh" + if [ -f "/glade/u/home/ewinter/miniconda3/etc/profile.d/conda.sh" ]; then + . "/glade/u/home/ewinter/miniconda3/etc/profile.d/conda.sh" else - export PATH="$mage_miniconda3/bin:$PATH" + export PATH="/glade/u/home/ewinter/miniconda3/bin:$PATH" fi fi unset __conda_setup + conda activate {{ conda_environment }} echo "The current conda environment is ${CONDA_PREFIX}." @@ -42,10 +39,6 @@ echo 'Setting up MAGE environment.' source {{ kaijuhome }}/scripts/setupEnvironment.sh echo "The kaiju software is located at ${KAIJUHOME}." -echo 'Setting up kaipy environment.' -source {{ kaipy_private_root }}/kaipy/scripts/setupEnvironment.sh -echo "The kaipy software is located at ${KAIPYHOME}." - echo 'Setting environment variables.' export TMPDIR={{ tmpdir }} export SLACK_BOT_TOKEN={{ slack_bot_token }} @@ -82,10 +75,10 @@ echo 'Generating the solar wind boundary condition file.' {{ cda2wind_cmd }} echo "The solar wind boundary condition file is `ls bcwind.h5`." -# Generate the RCM configuration file. -echo 'Generating the RCM configuration file.' -{{ genRCM_cmd }} -echo "The RCM configuration file is `ls rcmconfig.h5`." +# Generate the RAIJU configuration file. +echo 'Generating the RAIJU configuration file.' +genRAIJU +echo "The RAIJU configuration file is `ls raijuconfig.h5`." # Moved this setting here to avoid error from genLFM.py. export OMP_NUM_THREADS=128 @@ -99,7 +92,7 @@ eval $cmd # Run the comparison. Post results to Slack if any test fails. reference_run=`cat /glade/u/home/ewinter/mage_testing/test_runs/derecho_configuration_check_runs.txt` -cmd="python $KAIJUHOME/testingScripts/compare_mage_runs_numerical.py -sv --run_description='`derecho` configuration check' $reference_run `pwd`/weeklyDashGo.xml >& compare_mage_runs_numerical.out" +cmd="python $KAIJUHOME/testingScripts/compare_mage_runs_numerical.py -sv --run_description='derecho configuration check' $reference_run `pwd`/weeklyDashGo.xml >& compare_mage_runs_numerical.out" echo "Run comparison command is:" echo $cmd eval $cmd diff --git a/testingScripts/derecho_configuration_check.py b/testingScripts/derecho_configuration_check.py index 9340b948..f4d00ef8 100644 --- a/testingScripts/derecho_configuration_check.py +++ b/testingScripts/derecho_configuration_check.py @@ -143,16 +143,13 @@ def derecho_configuration_check(args: dict): make_cmd = "make voltron_mpi.x" # Create the command to generate the LFM grid. - genLFM_cmd = "genLFM.py -gid Q" + genLFM_cmd = "genLFM -gid Q" # Create the command to generate the solar wind boundary condition file. cda2wind_cmd = ( - "cda2wind.py -t0 2016-08-09T02:00:00 -t1 2016-08-09T12:00:00" + "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 diff --git a/testingScripts/intelCheckSubmitReport-template.pbs b/testingScripts/intelCheckSubmitReport-template.pbs index e3323f3d..faed3ad4 100644 --- a/testingScripts/intelCheckSubmitReport-template.pbs +++ b/testingScripts/intelCheckSubmitReport-template.pbs @@ -19,11 +19,9 @@ module load {{ module }} module list echo 'Loading python environment.' +mage_test_root=$HOME if [ -d "${mage_test_root}/miniconda3" ]; then echo 'Loading local miniconda3' - mage_test_root='{{ mage_test_root }}' - export CONDARC="${mage_test_root}/.condarc" - export CONDA_ENVS_PATH="${mage_test_root}/.conda" mage_miniconda3="${mage_test_root}/miniconda3" mage_conda="${mage_miniconda3}/bin/conda" __conda_setup="$($mage_conda 'shell.bash' 'hook' 2> /dev/null)" @@ -45,7 +43,6 @@ conda activate {{ conda_environment }} echo 'Setting up MAGE environment.' source {{ kaijuhome }}/scripts/setupEnvironment.sh -source {{ kaipyhome }}/kaipy/scripts/setupEnvironment.sh echo 'Setting environment variables.' export TMPDIR={{ tmpdir }} diff --git a/testingScripts/intelChecks.py b/testingScripts/intelChecks.py index bff1743e..44630ca0 100644 --- a/testingScripts/intelChecks.py +++ b/testingScripts/intelChecks.py @@ -305,7 +305,7 @@ def intelChecks(args: dict): # Generate bcwind data file. if verbose: print("Creating bcwind data file.") - cmd = "cda2wind.py -t0 2016-08-09T09:00:00 -t1 2016-08-09T11:00:00" + cmd = "cda2wind -t0 2016-08-09T09:00:00 -t1 2016-08-09T11:00:00" if debug: print(f"cmd = {cmd}") try: @@ -315,7 +315,7 @@ def intelChecks(args: dict): f"{module_set_name}.\n" f"e.cmd = {e.cmd}\n" f"e.returncode = {e.returncode}\n" - "See testing log for output from cda2wind.py.\n" + "See testing log for output from cda2wind.\n" "Skipping remaining steps for module set" f"{module_set_name}\n") continue @@ -325,7 +325,7 @@ def intelChecks(args: dict): # Generate the LFM grid file. if verbose: print("Creating LFM grid file.") - cmd = "genLFM.py -gid D" + cmd = "genLFM -gid D" if debug: print(f"cmd = {cmd}") try: @@ -335,7 +335,7 @@ def intelChecks(args: dict): f"{module_set_name}.\n" f"e.cmd = {e.cmd}\n" f"e.returncode = {e.returncode}\n" - "See testing log for output from genLFM.py.\n" + "See testing log for output from genLFM.\n" "Skipping remaining steps for module set" f"{module_set_name}\n") continue @@ -345,7 +345,7 @@ def intelChecks(args: dict): # Generate the Raiju configuration file. if verbose: print("Creating Raiju configuration file.") - cmd = "genRAIJU.py" + cmd = "genRAIJU" if debug: print(f"cmd = {cmd}") try: @@ -355,7 +355,7 @@ def intelChecks(args: dict): f" for module set {module_set_name}.\n" f"e.cmd = {e.cmd}\n" f"e.returncode = {e.returncode}\n" - "See testing log for output from genRAIJU.py.\n" + "See testing log for output from genRAIJU.\n" "Skipping remaining steps for module set " f"{module_set_name}\n") continue @@ -373,7 +373,6 @@ def intelChecks(args: dict): pbs_options["job_priority"] = os.environ["DERECHO_TESTING_PRIORITY"] pbs_options["modules"] = module_names pbs_options["kaijuhome"] = KAIJUHOME - pbs_options["kaipyhome"] = os.environ["KAIPYHOME"] pbs_options["tmpdir"] = os.environ["TMPDIR"] pbs_options["slack_bot_token"] = os.environ["SLACK_BOT_TOKEN"] pbs_options["mage_test_root"] = os.environ["MAGE_TEST_ROOT"] diff --git a/testingScripts/mage_reproducibility_check-template.pbs b/testingScripts/mage_reproducibility_check-template.pbs index f73cc0bc..92b1ecd8 100644 --- a/testingScripts/mage_reproducibility_check-template.pbs +++ b/testingScripts/mage_reproducibility_check-template.pbs @@ -19,11 +19,11 @@ module load {{ module }} echo 'The currently loaded modules are:' module list +echo 'Loading python environment.' +mage_test_root=$HOME if [ -d "${mage_test_root}/miniconda3" ]; then echo 'Loading local miniconda3' - export CONDARC="{{ condarc }}" - export CONDA_ENVS_PATH="{{ conda_envs_path }}" - mage_miniconda3="{{ mage_test_root }}/miniconda3" + mage_miniconda3="${mage_test_root}/miniconda3" mage_conda="${mage_miniconda3}/bin/conda" __conda_setup="$($mage_conda 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then @@ -47,10 +47,6 @@ echo 'Setting up MAGE environment.' source {{ kaijuhome }}/scripts/setupEnvironment.sh echo "The kaiju software is located at ${KAIJUHOME}." -echo 'Setting up kaipy environment.' -source {{ kaipy_private_root }}/kaipy/scripts/setupEnvironment.sh -echo "The kaipy software is located at ${KAIPYHOME}." - echo 'Setting environment variables.' export TMPDIR={{ tmpdir }} export SLACK_BOT_TOKEN={{ slack_bot_token }} diff --git a/testingScripts/mage_reproducibility_check.py b/testingScripts/mage_reproducibility_check.py index 925bc54d..c7931601 100644 --- a/testingScripts/mage_reproducibility_check.py +++ b/testingScripts/mage_reproducibility_check.py @@ -84,6 +84,35 @@ MAGE_REPRODUCIBILITY_CHECK_PBS_TEMPLATE_FILE = os.path.join( MAGE_REPRODUCIBILITY_CHECK_PBS_SCRIPT = "mage_reproducibility_check.pbs" +def create_command_line_parser(): + """Create the command-line argument parser. + + Create the parser for command-line arguments. + + Parameters + ---------- + None + + Returns + ------- + parser : argparse.ArgumentParser + Command-line argument parser for this script. + + Raises + ------ + None + """ + parser = common.create_command_line_parser(DESCRIPTION) + parser.add_argument( + "--module_set_file", "-f", default=DEFAULT_MODULE_SET_FILE, + help=( + "Path to text file containing set of modules to build with " + "(default: %(default)s)" + ) + ) + return parser + + def mage_reproducibility_check(args: dict): """Perform a MAGE reproducibility check. @@ -146,7 +175,6 @@ def mage_reproducibility_check(args: dict): module_names, cmake_environment, cmake_options = ( common.read_build_module_list_file(module_set_file) ) - print(f"module_names = {module_names}") # Extract the name of the list. module_set_name = os.path.split(module_set_file)[-1].rstrip(".lst") @@ -213,12 +241,11 @@ def mage_reproducibility_check(args: dict): pbs_template = Template(template_content) # Assemble commands needed in the PBS script. - genLFM_cmd = "genLFM.py -gid Q" + genLFM_cmd = "genLFM -gid Q" cda2wind_cmd = ( - "cda2wind.py -t0 2016-08-09T02:00:00 -t1 2016-08-09T12:00:00" + "cda2wind -t0 2016-08-09T02:00:00 -t1 2016-08-09T12:00:00" ) - genRCM_cmd = "genRCM.py" - genRaiju_cmd = "genRAIJU.py" + genRaiju_cmd = "genRAIJU" mpiexec_cmd = f"mpiexec {KAIJUHOME}/scripts/preproc/pinCpuCores.sh" voltron_cmd = "../bin/voltron_mpi.x weeklyDashGo.xml" @@ -241,13 +268,10 @@ def mage_reproducibility_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["conda_environment"] = os.environ["CONDA_ENVIRONMENT"] 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"] @@ -255,7 +279,6 @@ def mage_reproducibility_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["genRaiju_cmd"] = genRaiju_cmd pbs_options["mpiexec_cmd"] = mpiexec_cmd pbs_options["voltron_cmd"] = voltron_cmd @@ -326,13 +349,10 @@ def mage_reproducibility_check(args: dict): pbs_options["job_priority"] = os.environ["DERECHO_TESTING_PRIORITY"] pbs_options["walltime"] = "02: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["conda_environment"] = os.environ["CONDA_ENVIRONMENT"] 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"] @@ -403,7 +423,7 @@ def mage_reproducibility_check(args: dict): def main(): """Driver for command-line version of code.""" # Set up the command-line parser. - parser = common.create_command_line_parser(DESCRIPTION) + parser = create_command_line_parser() # # Add additional arguments specific to this script. # parser.add_argument( diff --git a/testingScripts/relCasePost-template.pbs b/testingScripts/relCasePost-template.pbs index 8975444e..4e043399 100644 --- a/testingScripts/relCasePost-template.pbs +++ b/testingScripts/relCasePost-template.pbs @@ -12,9 +12,9 @@ echo "Job $PBS_JOBID started at `date` on `hostname` in directory `pwd`." echo 'Loading python environment.' +mage_test_root=$HOME if [ -d "${mage_test_root}/miniconda3" ]; then echo 'Loading local miniconda3' - mage_test_root='{{ mage_test_root }}' export CONDARC="${mage_test_root}/.condarc" export CONDA_ENVS_PATH="${mage_test_root}/.conda" mage_miniconda3="${mage_test_root}/miniconda3" @@ -54,7 +54,7 @@ echo 'The active environment variables are:' printenv # Process the data and generate the output video -python $KAIPYHOME/kaipy/scripts/quicklook/gamerrVid.py -d1 {{ case1F }} -id1 {{ case1id }} -d2 {{ case2F }} -id2 {{ case2id }} -o {{ frameFolder }}/{{ caseName }} -ts {{ ts }} -te {{ te }} -dt {{ dt }} -Nth 9 >& {{ caseName }}.out +gamerrVid -d1 {{ case1F }} -id1 {{ case1id }} -d2 {{ case2F }} -id2 {{ case2id }} -o {{ frameFolder }}/{{ caseName }} -ts {{ ts }} -te {{ te }} -dt {{ dt }} -Nth 9 >& {{ caseName }}.out # copy output video to test root folder cp {{ frameFolder }}/{{ caseName }}.mp4 $MAGE_TEST_SET_ROOT/. diff --git a/testingScripts/relCaseReport-template.pbs b/testingScripts/relCaseReport-template.pbs index 0c817377..ce9dad09 100644 --- a/testingScripts/relCaseReport-template.pbs +++ b/testingScripts/relCaseReport-template.pbs @@ -12,6 +12,7 @@ echo "Job $PBS_JOBID started at `date` on `hostname` in directory `pwd`." echo 'Loading python environment.' +mage_test_root=$HOME if [ -d "${mage_test_root}/miniconda3" ]; then echo 'Loading local miniconda3' mage_test_root='{{ mage_test_root }}' diff --git a/testingScripts/relativeCase-template.pbs b/testingScripts/relativeCase-template.pbs index 24401e13..8c5e902c 100644 --- a/testingScripts/relativeCase-template.pbs +++ b/testingScripts/relativeCase-template.pbs @@ -23,6 +23,7 @@ module load {{ module }} module list echo 'Loading python environment.' +mage_test_root=$HOME if [ -d "${mage_test_root}/miniconda3" ]; then echo 'Loading local miniconda3' mage_test_root='{{ mage_test_root }}' diff --git a/testingScripts/relativeCaseGo-template.xml b/testingScripts/relativeCaseGo-template.xml index bb9e903a..38e2ff33 100644 --- a/testingScripts/relativeCaseGo-template.xml +++ b/testingScripts/relativeCaseGo-template.xml @@ -3,7 +3,7 @@