Skip to content

Console Output

+ source /etc/profile.d/larson-group.sh
++ export GIT_EDITOR=vi
++ GIT_EDITOR=vi
++ export SVN_EDITOR=vi
++ SVN_EDITOR=vi
++ export OMP_STACKSIZE=1048579
++ OMP_STACKSIZE=1048579
++ export LMOD_ROOT=/opt/lmod/
++ LMOD_ROOT=/opt/lmod/
++ source /opt/lmod//lmod/lmod/init/bash
+++ '[' -z '' ']'
+++ case "$-" in
+++ __lmod_vx=x
+++ '[' -n x ']'
+++ set +x
Shell debugging temporarily silenced: export LMOD_SH_DBG_ON=1 for this output (/usr/local/spack/opt/spack/linux-pop22-skylake_avx512/gcc-12.2.0/lmod-8.7.37-fq24mybyn2li6got2bxzk62ejh5d3p4z/lmod/lmod/init/bash)
Shell debugging restarted
+++ unset __lmod_vx
+++ find /usr/local/spack/share/spack/lmod/linux-pop22-x86_64/Core -print -quit
++ export MODULEPATH=/usr/local/spack/share/spack/lmod/linux-pop22-x86_64/Core
++ MODULEPATH=/usr/local/spack/share/spack/lmod/linux-pop22-x86_64/Core
+ module load gcc netcdf-fortran
+ '[' -z '' ']'
+ case "$-" in
+ __lmod_sh_dbg=x
+ '[' -n x ']'
+ set +x
Shell debugging temporarily silenced: export LMOD_SH_DBG_ON=1 for Lmod's output
Lmod Warning:
-------------------------------------------------------------------------------
The following dependent module(s) are not currently loaded:
gcc-runtime/13.1.0-wiuv7wc (required by: mpich/4.2.1, hdf5/1.14.3-nhc23hl,
netcdf-c/4.9.2-xduzp77, netcdf-fortran/4.5.3), glibc/2.35-tdr5czg (required by:
mpich/4.2.1, hdf5/1.14.3-nhc23hl, netcdf-c/4.9.2-xduzp77, netcdf-fortran/4.5.3)
-------------------------------------------------------------------------------



Shell debugging restarted
+ unset __lmod_sh_dbg
+ return 0
+ bash tests/run_pytests.sh -unit -include_generated --junitxml=/home/jenkins/workspace/clubb_branch_python/output/tests/pytests/unit.xml --durations=10
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-9.1.1, pluggy-1.7.0
rootdir: /home/jenkins/workspace/clubb_branch_python
collected 448 items

utilities/pytests/auto_llm_generated_pytests/test_case_json_to_namelist.py . [  0%]
.........                                                                [  2%]
utilities/pytests/auto_llm_generated_pytests/test_clubb_case_runner.py . [  2%]
...........                                                              [  4%]
utilities/pytests/auto_llm_generated_pytests/test_expldiff_settings_rules.py . [  5%]
..........                                                               [  7%]
utilities/pytests/auto_llm_generated_pytests/test_loss_cli.py .......... [  9%]
..                                                                       [ 10%]
utilities/pytests/auto_llm_generated_pytests/test_timing_workers.py ...  [ 10%]
utilities/pytests/test_clubb_settings_resolution.py ..........           [ 12%]
utilities/pytests/test_create_case_namelist.py ......................... [ 18%]
............                                                             [ 21%]
utilities/pytests/test_create_multi_col_params.py ...                    [ 21%]
utilities/pytests/test_output_paths.py .....                             [ 22%]
utilities/pytests/test_run_script_arguments.py ..............            [ 26%]
utilities/pytests/test_settings_rules.py ...................             [ 30%]
utilities/pytests/test_stats_json_to_namelist.py .........               [ 32%]
utilities/pytests/test_time_clubb.py .......................             [ 37%]
utilities/pytests/test_timing_profiles.py .......                        [ 39%]
tuner/pytests/auto_llm_generated_pytests/test_case_window_overrides.py . [ 39%]
..                                                                       [ 39%]
tuner/pytests/auto_llm_generated_pytests/test_jax_backend.py ........... [ 42%]
......                                                                   [ 43%]
tuner/pytests/auto_llm_generated_pytests/test_jax_launch_errors.py ....  [ 44%]
tuner/pytests/auto_llm_generated_pytests/test_runtime_device_settings.py . [ 44%]
........                                                                 [ 46%]
tuner/pytests/auto_llm_generated_pytests/test_tuner_top_overrides.py ... [ 47%]
.....                                                                    [ 48%]
tuner/pytests/test_adam_baselines.py ............                        [ 50%]
tuner/pytests/test_parameter_ranges.py .......                           [ 52%]
tuner/pytests/test_presets.py ........F..                                [ 54%]
tuner/pytests/test_tuning_strategy.py .................................. [ 62%]
........                                                                 [ 64%]
tuner/pytests/test_workspaces.py ......                                  [ 65%]
tests/pytests/auto_llm_generated_pytests/test_compile_compiler_selection.py . [ 65%]
......                                                                   [ 67%]
tests/pytests/auto_llm_generated_pytests/test_jax_silhs_forwarding.py .. [ 67%]
.                                                                        [ 67%]
tests/pytests/auto_llm_generated_pytests/test_run_loss_output_consistency.py . [ 68%]
.....                                                                    [ 69%]
tests/pytests/auto_llm_generated_pytests/test_run_restart_test.py ...... [ 70%]
....                                                                     [ 71%]
tests/pytests/auto_llm_generated_pytests/test_run_stats_output_consistency.py . [ 71%]
......................                                                   [ 76%]
tests/pytests/auto_llm_generated_pytests/test_run_timestep_sweep.py .... [ 77%]
..............F....                                                      [ 81%]
tests/pytests/auto_llm_generated_pytests/test_scm_jax_driver_test.py ... [ 82%]
........                                                                 [ 84%]
tests/pytests/test_bindiff_report.py ....                                [ 85%]
tests/pytests/test_column_mirror.py .................................... [ 93%]
.....................                                                    [ 97%]
tests/pytests/test_compile_install_aliases.py ..                         [ 98%]
tests/pytests/test_jax_compare_forwarding.py ......                      [ 99%]
tests/pytests/test_run_clubb_conv_test.py ..                             [100%]

=================================== FAILURES ===================================
___________ test_request_expands_preset_then_normalizes_linked_range ___________

tmp_path = PosixPath('/tmp/pytest-of-jenkins/pytest-3/test_request_expands_preset_th0')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x705006dafa70>

    def test_request_expands_preset_then_normalizes_linked_range(tmp_path, monkeypatch):
        path = tmp_path / "request.json"
        path.write_text(
            json.dumps(
                {
                    "preset": "wpxp",
                    "batch_size": 1,
                    "max_workers": 1,
                    "strategy": {"name": "random", "options": {"max_samples": 1}},
                }
            ),
            encoding="utf-8",
        )
        monkeypatch.setattr("tuner.request.supported_fields", lambda: ["wprtp", "wpthlp", "rtp2", "thlp2", "rtpthlp"])
        monkeypatch.setattr(
            "tuner.presets.default_parameter_ranges",
            lambda _config: {
                "C6rt": {"default": 2.0, "min": 0.0, "max": 8.0},
                "C6thl": {"default": 2.0, "min": 0.0, "max": 8.0},
                "C6rtb": {"default": 2.0, "min": 0.0, "max": 8.0},
                "C6thlb": {"default": 2.0, "min": 0.0, "max": 8.0},
                "C6rtc": {"default": 1.0, "min": 0.0, "max": 4.0},
                "C6thlc": {"default": 1.0, "min": 0.0, "max": 4.0},
                "C7": {"default": 0.5, "min": 0.0, "max": 1.0},
                "C7b": {"default": 0.5, "min": 0.0, "max": 1.0},
                "C7c": {"default": 0.5, "min": 0.0, "max": 2.0},
                "C6rt_Lscale0": {"default": 5.0, "min": 0.0, "max": 20.0},
                "C6thl_Lscale0": {"default": 5.0, "min": 0.0, "max": 20.0},
                "C7_Lscale0": {"default": 0.2, "min": 0.0, "max": 0.8},
                "wpxp_L_thresh": {"default": 50.0, "min": 0.0, "max": 200.0},
                "c_K6": {"default": 0.2, "min": 0.0, "max": 0.8},
                "nu6": {"default": 4.0, "min": 0.0, "max": 16.0},
                "C_uu_shr": {"default": 0.4, "min": 0.0, "max": 1.0},
                "altitude_threshold": {"default": 75.0, "min": 0.0, "max": 300.0},
            },
        )
        monkeypatch.setattr(
            "tuner.request.read_case_tuner_defaults",
            lambda _case, overrides=None: {
                "les_stats_file": "benchmark.nc", "altitude_comparison_range": [0.0, 1000.0],
                "time_average_range": [0, 3600], "num_time_windows": 1,
            },
        )
>       request = load_request(path)
                  ^^^^^^^^^^^^^^^^^^

tuner/pytests/test_presets.py:133: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request_path = PosixPath('/tmp/pytest-of-jenkins/pytest-3/test_request_expands_preset_th0/request.json')

    def load_request(request_path: Path) -> dict:
        """Load and validate the tuning request."""
        request = apply_preset(json.loads(request_path.read_text(encoding="utf-8")))
    
        request["backend"] = _normalize_choice(
            request.get("backend", "fortran"), {"fortran", "jax"}, "backend",
        )
        if request["backend"] == "jax":
            request["jax_options"] = str(request.get("jax_options", "cpu"))
    
        tuner_runtime_settings(request)
    
        request["config"] = _normalize_config(request.get("config"))
        available_targets = _tunable_parameter_names(request["config"])
        cases, case_configs, case_defaults = _normalize_case_configs(request)
    
        selected_fields = [str(name).strip() for name in request.get("selected_fields", []) if str(name).strip()]
        if not selected_fields:
            raise RuntimeError("Tuning request must contain at least one selected field")
        unsupported_fields = sorted(set(selected_fields) - set(supported_fields()))
        if unsupported_fields:
            raise RuntimeError("Unsupported normalized benchmark field(s): " + ", ".join(unsupported_fields))
    
        raw_ranges = list(request.get("parameter_ranges", []))
        if not raw_ranges:
            raise RuntimeError("Tuning request must contain at least one parameter range")
        parameter_ranges = []
        seen_params = set()
        owned_targets = set()
        for spec in raw_ranges:
            if not isinstance(spec, dict):
                raise RuntimeError("Each parameter range must be an object")
            name = str(spec.get("name", "")).strip()
            if not name:
                raise RuntimeError("Each parameter range must include a name")
            if name in seen_params:
                raise RuntimeError(f"Duplicate tuning parameter: {name}")
            seen_params.add(name)
            raw_targets = spec.get("targets", [name])
            if isinstance(raw_targets, str):
                raw_targets = [raw_targets]
            targets = [str(target).strip() for target in raw_targets or [] if str(target).strip()]
            if not targets:
                raise RuntimeError(f"{name} must include at least one physical target")
            duplicate_targets = owned_targets.intersection(targets)
            if duplicate_targets:
                raise RuntimeError(
                    f"Physical tuning parameter(s) assigned by more than one range: {', '.join(sorted(duplicate_targets))}"
                )
            if len(targets) != len(set(targets)):
                raise RuntimeError(f"{name} repeats a physical target")
            unknown_targets = sorted(set(targets) - available_targets)
            if unknown_targets:
                raise RuntimeError(
                    f"Unknown tunable parameter target(s) for config {request['config']}: "
                    + ", ".join(unknown_targets)
                )
            owned_targets.update(targets)
            try:
                min_value = float(spec.get("min"))
                max_value = float(spec.get("max"))
            except (TypeError, ValueError):
                raise RuntimeError(f"Invalid numeric range for {name}")
            if not math.isfinite(min_value) or not math.isfinite(max_value):
                raise RuntimeError(f"{name} requires finite min and max")
            if min_value > max_value:
                raise RuntimeError(f"{name} requires min <= max")
            parameter_ranges.append({"name": name, "targets": targets, "min": min_value, "max": max_value})
    
        request["case_name"] = cases[0]
        request["cases"] = cases
        request["case_configs"] = case_configs
        request["case_defaults"] = case_defaults
        request["override"] = normalize_override_string(request.get("override"))
        resolution = evaluate_tune_settings(request["config"], request["override"])
        resolution_errors = [issue for issue in resolution.get("issues", []) if issue.get("severity") == "error"]
        if resolution_errors:
            raise RuntimeError("; ".join(str(issue.get("message") or "Invalid CLUBB settings.") for issue in resolution_errors))
        inactive_targets = sorted(
            target
            for spec in parameter_ranges
            for target in spec["targets"]
            if not is_independently_tunable(resolution.get("parameter_states", {}).get(target))
        )
        if inactive_targets:
            details = "; ".join(
                f"{name}: {resolution['parameter_states'][name]['reason']}" for name in inactive_targets
            )
>           raise RuntimeError("Tune request selects inactive parameter(s): " + details)
E           RuntimeError: Tune request selects inactive parameter(s): C6rt_Lscale0: Lscale_method=2 uses inverse-tau Lscale instead of this direct-Lscale control.; C6thl_Lscale0: Lscale_method=2 uses inverse-tau Lscale instead of this direct-Lscale control.

tuner/request.py:136: RuntimeError
______ test_invalid_paths_and_abbreviated_options_are_rejected[options1] _______

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x705006a8aa80>
options = ['-time', '60']

    @pytest.mark.parametrize("options", [["-output_root", "../outside"], ["-time", "60"]])
    def test_invalid_paths_and_abbreviated_options_are_rejected(monkeypatch, options):
        monkeypatch.setattr(sys, "argv", ["run_timestep_sweep.py", *options])
>       with pytest.raises(SystemExit) as exc:
E       Failed: DID NOT RAISE SystemExit

tests/pytests/auto_llm_generated_pytests/test_run_timestep_sweep.py:103: Failed
- generated xml file: /home/jenkins/workspace/clubb_branch_python/output/tests/pytests/unit.xml -
============================= slowest 10 durations =============================
1.57s call     tests/pytests/test_column_mirror.py::test_incremental_build_reuses_objects_and_picks_up_source_changes
0.90s call     utilities/pytests/test_time_clubb.py::test_continue_on_error_completes_remaining_sweep_points
0.73s call     tests/pytests/test_column_mirror.py::test_runner_detects_first_column_state_leak[separator0-True]
0.71s call     utilities/pytests/test_time_clubb.py::test_fake_runner_is_concurrent_and_writes_isolated_csv_rows
0.68s call     tests/pytests/test_column_mirror.py::test_runner_detects_first_column_state_leak[separator1-True]
0.64s call     utilities/pytests/test_time_clubb.py::test_live_results_have_workload_metadata_before_benchmark_finishes
0.61s call     tests/pytests/test_column_mirror.py::test_failed_run_does_not_compare_stale_output
0.60s call     utilities/pytests/test_time_clubb.py::test_failure_preserves_completed_and_failed_points
0.58s call     utilities/pytests/auto_llm_generated_pytests/test_timing_workers.py::test_warmup_and_repetitions_keep_pids_and_wait_for_all_peers
0.50s call     utilities/pytests/test_time_clubb.py::test_warmups_are_aggregated_and_dash_ignores_them
=========================== short test summary info ============================
FAILED tuner/pytests/test_presets.py::test_request_expands_preset_then_normalizes_linked_range - RuntimeError: Tune request selects inactive parameter(s): C6rt_Lscale0: Lscale_method=2 uses inverse-tau Lscale instead of this direct-Lscale control.; C6thl_Lscale0: Lscale_method=2 uses inverse-tau Lscale instead of this direct-Lscale control.
FAILED tests/pytests/auto_llm_generated_pytests/test_run_timestep_sweep.py::test_invalid_paths_and_abbreviated_options_are_rejected[options1] - Failed: DID NOT RAISE SystemExit
======================== 2 failed, 446 passed in 15.65s ========================