equinor / ert

ERT - Ensemble based Reservoir Tool - is designed for running ensembles of dynamical models such as reservoir models, in order to do sensitivity analysis and data assimilation. ERT supports data assimilation using the Ensemble Smoother (ES), Ensemble Smoother with Multiple Data Assimilation (ES-MDA) and Iterative Ensemble Smoother (IES).
https://ert.readthedocs.io/en/latest/
GNU General Public License v3.0
101 stars 104 forks source link

test_slurm_dumps_stder_to_file flaky locally #8743

Open eivindjahren opened 1 week ago

eivindjahren commented 1 week ago

Had the following failure happen locally while running pytest tests/unit_tests -n logical -m "not integration_test"

    async def test_slurm_dumps_stderr_to_file(tmp_path, job_name):
        os.chdir(tmp_path)
        driver = SlurmDriver()
        failure_message = "failURE"
        await driver.submit(0, "sh", "-c", f"echo {failure_message} >&2", name=job_name)
        await poll(driver, {0})
        assert Path(f"{job_name}.stderr").exists(), "Slurm system did not write stderr file"

>       assert (
            Path(f"{job_name}.stderr").read_text(encoding="utf-8").strip()
            == failure_message
        )
E       AssertionError: assert '' == 'failURE'
E         - failURE

.../tests/unit_tests/scheduler/test_slurm_driver.py:274: AssertionError
berland commented 1 week ago

Not able to reproduce with pytest tests/unit_tests/scheduler/test_slurm_driver.py -k dumps_stderr -sxv --count 4000 -n 6

eivindjahren commented 1 week ago

@berland Perhaps very unlikely then or only happens when the machine is busy with other things?