Skip to content

Turn on restart reproducability for 1deg ryf (#175)

Sign in for the full log view
GitHub Actions / Repro Test Results failed Feb 19, 2025 in 0s

2 fail, 1 pass in 23m 16s

3 tests   1 ✅  23m 16s ⏱️
1 suites  0 💤
1 files    2 ❌

Results for commit b494782.

Annotations

Check warning on line 0 in test-venv.lib.python3.10.site-packages.model_config_tests.test_bit_reproducibility.TestBitReproducibility

See this annotation in the file changed.

@github-actions github-actions / Repro Test Results

test_bit_repro_historical (test-venv.lib.python3.10.site-packages.model_config_tests.test_bit_reproducibility.TestBitReproducibility) failed

/opt/testing/checksum/test_report.xml [took 4m 2s]
Raw output
AssertionError: Checksums were not equal. The new checksums have been written to /scratch/tm70/repro-ci/experiments/access-om3-configs/ae52db93c337aa94708ca6758ed3e3541d916508/checksum/historical-3hr-checksum.json.
assert {'output': {'...ion': '1-0-0'} == {'output': {'...ion': '1-0-0'}
  
  Omitting 1 identical items, use -vv to show
  Differing items:
  {'output': {'CFL': ['0.00000', '0.06876'], 'En': ['3.0906073728130855E-23', '5.1157582642758414E-04'], 'M': ['1.36404E+21', '1.36404E+21'], 'Me': ['0.00E+00', '-3.59E-10'], ...}} != {'output': {'CFL': ['0.00000', '0.06864'], 'En': ['3.0906073728130855E-23', '5.0864633807670766E-04'], 'M': ['1.36404E+21', '1.36404E+21'], 'Me': ['0.00E+00', '-3.52E-10'], ...}}
  Use -v to get more diff
self = <model_config_tests.test_bit_reproducibility.TestBitReproducibility object at 0x7fc43a41df30>
output_path = PosixPath('/scratch/tm70/repro-ci/experiments/access-om3-configs/ae52db93c337aa94708ca6758ed3e3541d916508')
control_path = PosixPath('/scratch/tm70/repro-ci/experiments/access-om3-configs/ae52db93c337aa94708ca6758ed3e3541d916508/base-experiment')
checksum_path = PosixPath('/scratch/tm70/repro-ci/experiments/access-om3-configs/ae52db93c337aa94708ca6758ed3e3541d916508/compared/testing/checksum/historical-3hr-checksum.json')
keep_archive = False

    @pytest.mark.checksum
    def test_bit_repro_historical(
        self,
        output_path: Path,
        control_path: Path,
        checksum_path: Optional[Path],
        keep_archive: Optional[bool],
    ):
        """
        Test that a run reproduces historical checksums
    
        Parameters (these are fixtures defined in conftest.py)
        ----------
        output_path: Path
            Output directory for test output and where the control and
            lab directories are stored for the payu experiments. Default is
            set in conftest.py
        control_path: Path
            Path to the model configuration to test. This is copied for
            for control directories in experiments. Default is set in
            conftests.py
        checksum_path: Optional[Path]
            Path to checksums to compare model output against. Default is
            set to checksums saved on model configuration (set in )
        keep_archive: Optional[bool]
            This flag is used in testing for test code to use a previous test
            archive, and to disable running the model with payu
        """
        # Setup checksum output directory
        checksum_output_dir = set_checksum_output_dir(output_path=output_path)
    
        # Setup experiment
        exp = setup_exp(
            control_path, output_path, "test_bit_repro_historical", keep_archive
        )
    
        # Set model runtime using the configured default
        exp.model.set_model_runtime()
    
        # Run the experiment using payu
        status, stdout, stderr, output_files = exp.setup_and_run()
    
        if status != 0 or not exp.model.output_exists():
            # Log the run information
            exp.print_run_logs(status, stdout, stderr, output_files)
    
        assert status == 0, (
            "There was an error running the experiment. "
            "See the logs for more infomation on the experiment run"
        )
    
        assert exp.model.output_exists(), (
            "Output file for the model does not exist. "
            "See the logs for more information on the experiment run"
        )
    
        # Set the checksum output filename using the model default runtime
        runtime_hours = exp.model.default_runtime_seconds // HOUR_IN_SECONDS
        checksum_filename = f"historical-{runtime_hours}hr-checksum.json"
    
        # Read the historical checksum file
        hist_checksums = read_historical_checksums(
            control_path, checksum_filename, checksum_path
        )
    
        # Use historical file checksums schema version for parsing checksum,
        # otherwise use the model default, if file does not exist
        schema_version = (
            hist_checksums["schema_version"]
            if hist_checksums
            else exp.model.default_schema_version
        )
    
        # Extract checksums
        checksums = exp.extract_checksums(schema_version=schema_version)
    
        # Write out checksums to output file
        checksum_output_file = checksum_output_dir / checksum_filename
        with open(checksum_output_file, "w") as file:
            json.dump(checksums, file, indent=2)
    
>       assert (
            hist_checksums == checksums
        ), f"Checksums were not equal. The new checksums have been written to {checksum_output_file}."
E       AssertionError: Checksums were not equal. The new checksums have been written to /scratch/tm70/repro-ci/experiments/access-om3-configs/ae52db93c337aa94708ca6758ed3e3541d916508/checksum/historical-3hr-checksum.json.
E       assert {'output': {'...ion': '1-0-0'} == {'output': {'...ion': '1-0-0'}
E         
E         Omitting 1 identical items, use -vv to show
E         Differing items:
E         {'output': {'CFL': ['0.00000', '0.06876'], 'En': ['3.0906073728130855E-23', '5.1157582642758414E-04'], 'M': ['1.36404E+21', '1.36404E+21'], 'Me': ['0.00E+00', '-3.59E-10'], ...}} != {'output': {'CFL': ['0.00000', '0.06864'], 'En': ['3.0906073728130855E-23', '5.0864633807670766E-04'], 'M': ['1.36404E+21', '1.36404E+21'], 'Me': ['0.00E+00', '-3.52E-10'], ...}}
E         Use -v to get more diff

../test-venv/lib/python3.10/site-packages/model_config_tests/test_bit_reproducibility.py:131: AssertionError

Check warning on line 0 in test-venv.lib.python3.10.site-packages.model_config_tests.test_bit_reproducibility.TestBitReproducibility

See this annotation in the file changed.

@github-actions github-actions / Repro Test Results

test_restart_repro (test-venv.lib.python3.10.site-packages.model_config_tests.test_bit_reproducibility.TestBitReproducibility) failed

/opt/testing/checksum/test_report.xml [took 13m 8s]
Raw output
assert False
self = <model_config_tests.test_bit_reproducibility.TestBitReproducibility object at 0x7fc43a41d4b0>
output_path = PosixPath('/scratch/tm70/repro-ci/experiments/access-om3-configs/ae52db93c337aa94708ca6758ed3e3541d916508')
control_path = PosixPath('/scratch/tm70/repro-ci/experiments/access-om3-configs/ae52db93c337aa94708ca6758ed3e3541d916508/base-experiment')

    @pytest.mark.checksum_slow
    def test_restart_repro(self, output_path: Path, control_path: Path):
        """
        Test that a run reproduces across restarts.
        """
        # First do two short (1 day) runs.
        exp_2x1day = setup_exp(control_path, output_path, "test_restart_repro_2x1day")
    
        # Reconfigure to a 1 day run.
        exp_2x1day.model.set_model_runtime(seconds=DAY_IN_SECONDS)
    
        # Now run twice.
        exp_2x1day.setup_and_run()
        exp_2x1day.force_qsub_run()
    
        # Now do a single 2 day run
        exp_2day = setup_exp(control_path, output_path, "test_restart_repro_2day")
        # Reconfigure
        exp_2day.model.set_model_runtime(seconds=(2 * DAY_IN_SECONDS))
    
        # Run once.
        exp_2day.setup_and_run()
    
        # Now compare the output between our two short and one long run.
        checksums_1d_0 = exp_2x1day.extract_checksums()
        checksums_1d_1 = exp_2x1day.extract_checksums(exp_2x1day.output001)
    
        checksums_2d = exp_2day.extract_checksums()
    
        # Use model specific comparision method for checksums
        model = exp_2day.model
        matching_checksums = model.check_checksums_over_restarts(
            long_run_checksum=checksums_2d,
            short_run_checksum_0=checksums_1d_0,
            short_run_checksum_1=checksums_1d_1,
        )
    
        if not matching_checksums:
            # Write checksums out to file
            with open(output_path / "restart-1d-0-checksum.json", "w") as file:
                json.dump(checksums_1d_0, file, indent=2)
            with open(output_path / "restart-1d-1-checksum.json", "w") as file:
                json.dump(checksums_1d_1, file, indent=2)
            with open(output_path / "restart-2d-0-checksum.json", "w") as file:
                json.dump(checksums_2d, file, indent=2)
    
>       assert matching_checksums
E       assert False

../test-venv/lib/python3.10/site-packages/model_config_tests/test_bit_reproducibility.py:203: AssertionError

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Repro Test Results

3 tests found

There are 3 tests, see "Raw output" for the full list of tests.
Raw output
test-venv.lib.python3.10.site-packages.model_config_tests.test_bit_reproducibility.TestBitReproducibility ‑ test_bit_repro_historical
test-venv.lib.python3.10.site-packages.model_config_tests.test_bit_reproducibility.TestBitReproducibility ‑ test_bit_repro_repeat
test-venv.lib.python3.10.site-packages.model_config_tests.test_bit_reproducibility.TestBitReproducibility ‑ test_restart_repro