Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slow tests #46

Closed
paugier opened this issue Dec 6, 2022 · 1 comment · Fixed by #47
Closed

Fix slow tests #46

paugier opened this issue Dec 6, 2022 · 1 comment · Fixed by #47

Comments

@paugier
Copy link
Collaborator

paugier commented Dec 6, 2022

slow tests can be run on Github Actions with https://github.com/snek5000/snek5000-cbox/actions/workflows/tests_slow.yml

test_SW_linear_base_from_SFD is now broken and needs to be fixed.

    @pytest.mark.slow
    def test_SW_linear_base_from_SFD():
    
        params = params_SW()
    
        params.Ra_side = 1.86e8
    
        params.oper.enable_sfd = float(True)
    
        params.nek.general.end_time = 900
        params.nek.general.write_interval = 10
    
        aspect_ratio = 1.0
        nb_elements = 10
        params.oper.ny = nb_elements
        params.oper.nx = int(nb_elements / aspect_ratio)
    
        sim_sfd = Simul(params)
    
>       sim.make.exec("run_fg", nproc=4)
E       UnboundLocalError: local variable 'sim' referenced before assignment
@paugier
Copy link
Collaborator Author

paugier commented Dec 6, 2022

Other error: (@akhoubani )

     @pytest.mark.slow
    def test_SW_linear_base_provided():
    
        params = params_SW()
    
        restart_file = "./doc/examples/base_flow_side_simple.restart"
    
        params = params_SW()
    
        params.Ra_side = 1.86e8
    
        aspect_ratio = 1.0
        nb_elements = 10
        params.oper.ny = nb_elements
        params.oper.nx = int(nb_elements / aspect_ratio)
    
        params.nek.general.start_from = "base_flow.restart"
    
        params.nek.problemtype.equation = "incompLinNS"
        params.oper.elem.staggered = "auto"
    
        params.nek.general.extrapolation = "standard"
    
        sim = Simul(params)
    
        copyfile(restart_file, sim.params.output.path_session / "base_flow.restart")
    
        sim.make.exec("run_fg", nproc=4)
    
        growth_rate_linear = compute_growth_rate(sim)
    
>       assert 0.0049 < growth_rate_linear < 0.0055
E       assert 0.008127315550479523 < 0.0055

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant