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

got rid of travis stuff and added github actions badge to readme #729

Merged
merged 2 commits into from
Oct 6, 2024

Conversation

pavelkomarov
Copy link
Contributor

I heard we're not using travis anymore. Just some clean up.

@pavelkomarov
Copy link
Contributor Author

pavelkomarov commented Oct 3, 2024

Exit code 134 on shallow spheres again. Stack overflow says this could mean buffer overflow? Oh dear. This has been broken a long time and deprioritized due to build system rework and CI migration. Doesn't seem like an easy fix, and the discussion over at #642 was inconclusive. This PR puts a big red reminder on the readme. I think that test should either be chased all the way down or be considered permanently broken and taken out of the flow.

@mandli
Copy link
Member

mandli commented Oct 3, 2024

I do not think we should take it out but chase it down. Feel free to take the initiative if you are interested and you can reproduce the problem we can step through figuring out what is wrong.

@pavelkomarov
Copy link
Contributor Author

pavelkomarov commented Oct 3, 2024

I'm not very interested lol. I'm only interested in

  1. doing simulations successfully to create datasets that are instrumental to me for other things
  2. kvetching (hopefully constructively; I would help rework some things if a suggestion is well-loved)
  3. being grim reaper to any dead code

@pavelkomarov
Copy link
Contributor Author

pavelkomarov commented Oct 4, 2024

Okay, I actually was curious enough to run the pytests. I'm on a Mac, but old enough to be Intel silicon. I got a failure, but I don't think it's the same one. Interestingly, there are warnings for the shallow water test. Maybe the segfault has to do with taking the sqrt of a negative or something?

pavel@Pavels-MacBook-Pro pyclaw % pytest --ignore=development
================================================================================= test session starts ==================================================================================
platform darwin -- Python 3.12.5, pytest-8.3.2, pluggy-1.5.0
rootdir: /Users/pavel/Code/clawpack
configfile: pyproject.toml
plugins: anyio-4.4.0
collected 67 items                                                                                                                                                                     

examples/acoustics_1d_homogeneous/test_acoustics.py ......                                                                                                                       [  8%]
examples/acoustics_2d_homogeneous/test_2d_acoustics.py ....                                                                                                                      [ 14%]
examples/acoustics_2d_mapped/test_acoustics_2d_mapped.py .                                                                                                                       [ 16%]
examples/acoustics_2d_variable/test_acoustics_2d_variable.py ...                                                                                                                 [ 20%]
examples/acoustics_2d_variable/test_acoustics_2d_variable_io.py .                                                                                                                [ 22%]
examples/acoustics_3d_variable/test_3d_acoustics.py ..                                                                                                                           [ 25%]
examples/advection_1d/test_advection.py ......                                                                                                                                   [ 34%]
examples/advection_1d/test_advection_nonunif.py ..                                                                                                                               [ 37%]
examples/advection_1d_variable/test_variable_coefficient_advection.py ....F                                                                                                      [ 44%]
examples/advection_2d/test_2d_advection.py .....                                                                                                                                 [ 52%]
examples/advection_2d_annulus/test_2d_advection_annulus.py .                                                                                                                     [ 53%]
examples/advection_reaction_2d/test_advection_reaction.py .                                                                                                                      [ 55%]
examples/burgers_1d/test_burgers_1d.py ....                                                                                                                                      [ 61%]
examples/cubic_1d/test_cubic.py .                                                                                                                                                [ 62%]
examples/euler_1d/test_shocksine.py .                                                                                                                                            [ 64%]
examples/euler_1d/test_shocktube.py .                                                                                                                                            [ 65%]
examples/euler_1d/test_woodward_colella_blast.py .                                                                                                                               [ 67%]
examples/euler_2d/test_euler2d.py ...                                                                                                                                            [ 71%]
examples/euler_3d/test_euler3d.py ..s                                                                                                                                            [ 76%]
examples/euler_gravity_3d/test_eulerg3d.py .                                                                                                                                     [ 77%]
examples/mhd_1d/test_shocktube.py .                                                                                                                                              [ 79%]
examples/peano_shallow_2d/test_identical_grids.py s                                                                                                                              [ 80%]
examples/peano_shallow_2d/test_peano_solver.py s                                                                                                                                 [ 82%]
examples/psystem_2d/test_2d_psystem.py .                                                                                                                                         [ 83%]
examples/shallow_1d/test_shallow1d.py ..                                                                                                                                         [ 86%]
examples/shallow_2d/test_shallow2d.py ..                                                                                                                                         [ 89%]
examples/shallow_sphere/test_shallow_sphere.py .                                                                                                                                 [ 91%]
examples/stegoton_1d/test_stego.py ....                                                                                                                                          [ 97%]
examples/traffic/test_traffic.py ..                                                                                                                                              [100%]

======================================================================================= FAILURES =======================================================================================
____________________________________________________________ TestAdvectionVarCoeff1D.test_sharpclaw_custom_time_integrator _____________________________________________________________

self = <examples.advection_1d_variable.test_variable_coefficient_advection.TestAdvectionVarCoeff1D object at 0x1121d4110>

    def test_sharpclaw_custom_time_integrator(self):
        #Load Butcher Tableaux for custom time integrators
        rk_methods_dict = np.load(os.path.join(thisdir,'rk_methods.npy'),allow_pickle=True).item()
        rk_names = list(rk_methods_dict.keys())
        for rk_name in rk_names:
            rk_coeffs = rk_methods_dict[rk_name]
>           assert error(test_name='sharpclaw_custom_time_integrator_'+rk_name,kernel_language='Fortran',solver_type='sharpclaw',
                             time_integrator='RK',rk_coeffs=rk_coeffs)<1e-6, f"Failed for {rk_name}"
E           AssertionError: Failed for SSP33
E           assert np.float64(1.1389149780820139e-06) < 1e-06
E            +  where np.float64(1.1389149780820139e-06) = error(test_name=('sharpclaw_custom_time_integrator_' + 'SSP33'), kernel_language='Fortran', solver_type='sharpclaw', time_integrator='RK', rk_coeffs=[array([[0.  , 0.  , 0.  ],\n       [1.  , 0.  , 0.  ],\n       [0.25, 0.25, 0.  ]]), array([0.16666667, 0.16666667, 0.66666667]), array([0. , 1. , 0.5])])

examples/advection_1d_variable/test_variable_coefficient_advection.py:50: AssertionError
--------------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------------
2024-10-03 17:13:18,438 INFO CLAW: Solution 0 computed for time t=0.000000
2024-10-03 17:13:18,442 INFO CLAW: Solution 1 computed for time t=0.100000
2024-10-03 17:13:18,446 INFO CLAW: Solution 2 computed for time t=0.200000
2024-10-03 17:13:18,449 INFO CLAW: Solution 3 computed for time t=0.300000
2024-10-03 17:13:18,452 INFO CLAW: Solution 4 computed for time t=0.400000
2024-10-03 17:13:18,456 INFO CLAW: Solution 5 computed for time t=0.500000
2024-10-03 17:13:18,460 INFO CLAW: Solution 6 computed for time t=0.600000
2024-10-03 17:13:18,463 INFO CLAW: Solution 7 computed for time t=0.700000
2024-10-03 17:13:18,467 INFO CLAW: Solution 8 computed for time t=0.800000
2024-10-03 17:13:18,471 INFO CLAW: Solution 9 computed for time t=0.900000
2024-10-03 17:13:18,474 INFO CLAW: Solution 10 computed for time t=1.000000
2024-10-03 17:13:18,475 INFO CLAW: Solution 0 computed for time t=0.000000
2024-10-03 17:13:18,480 INFO CLAW: Solution 1 computed for time t=0.100000
2024-10-03 17:13:18,485 INFO CLAW: Solution 2 computed for time t=0.200000
2024-10-03 17:13:18,490 INFO CLAW: Solution 3 computed for time t=0.300000
2024-10-03 17:13:18,495 INFO CLAW: Solution 4 computed for time t=0.400000
2024-10-03 17:13:18,499 INFO CLAW: Solution 5 computed for time t=0.500000
2024-10-03 17:13:18,504 INFO CLAW: Solution 6 computed for time t=0.600000
2024-10-03 17:13:18,508 INFO CLAW: Solution 7 computed for time t=0.700000
2024-10-03 17:13:18,512 INFO CLAW: Solution 8 computed for time t=0.800000
2024-10-03 17:13:18,516 INFO CLAW: Solution 9 computed for time t=0.900000
2024-10-03 17:13:18,521 INFO CLAW: Solution 10 computed for time t=1.000000
=================================================================================== warnings summary ===================================================================================
pyclaw/examples/euler_gravity_3d/test_eulerg3d.py::TestEulerGravity3D::test_rising_hot_sphere
  /Users/pavel/Code/clawpack/pyclaw/examples/euler_gravity_3d/rising_hot_sphere.py:21: UserWarning: mpi4py is not available
    warnings.warn('mpi4py is not available')

pyclaw/examples/shallow_1d/test_shallow1d.py::TestShallowWater1D::test_dambreak
  /usr/local/lib/python3.12/site-packages/clawpack/riemann/shallow_1D_py.py:126: RuntimeWarning: invalid value encountered in sqrt
    ubar = ( (q_l[1,:]/np.sqrt(q_l[0,:]) + q_r[1,:]/np.sqrt(q_r[0,:])) /

pyclaw/examples/shallow_1d/test_shallow1d.py::TestShallowWater1D::test_dambreak
  /usr/local/lib/python3.12/site-packages/clawpack/riemann/shallow_1D_py.py:127: RuntimeWarning: invalid value encountered in sqrt
    (np.sqrt(q_l[0,:]) + np.sqrt(q_r[0,:])) )

pyclaw/examples/shallow_1d/test_shallow1d.py::TestShallowWater1D::test_dambreak
  /usr/local/lib/python3.12/site-packages/clawpack/riemann/shallow_1D_py.py:130: RuntimeWarning: invalid value encountered in sqrt
    c_r = np.sqrt(problem_data['grav'] * q_r[0,:])

pyclaw/examples/shallow_1d/test_shallow1d.py::TestShallowWater1D::test_dambreak
  /usr/local/lib/python3.12/site-packages/clawpack/riemann/shallow_1D_py.py:132: RuntimeWarning: invalid value encountered in sqrt
    c_l = np.sqrt(problem_data['grav'] * q_l[0,:])

pyclaw/examples/shallow_1d/test_shallow1d.py::TestShallowWater1D::test_dambreak
  /usr/local/lib/python3.12/site-packages/clawpack/riemann/shallow_1D_py.py:128: RuntimeWarning: invalid value encountered in sqrt
    cbar = np.sqrt(0.5 * problem_data['grav'] * (q_l[0,:] + q_r[0,:]))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================================== short test summary info ================================================================================
FAILED examples/advection_1d_variable/test_variable_coefficient_advection.py::TestAdvectionVarCoeff1D::test_sharpclaw_custom_time_integrator - AssertionError: Failed for SSP33
================================================================= 1 failed, 63 passed, 3 skipped, 6 warnings in 48.38s =================================================================
pavel@Pavels-MacBook-Pro pyclaw % 

@mandli
Copy link
Member

mandli commented Oct 5, 2024

  1. I think even if the main thrust of your research is to use the output of simulations that it's a good idea to have some concept of what is going on so, for example, you can identify possible spurious results. You do not have to debug it yourself, but simply reporting the issue is useful.
  2. Suggestions and comments are always welcome.
  3. Judging something as "dead" is difficult to do without a good understanding of the code and the use cases that may not be directly demonstrated in the examples. Still good to ask the question though.

The problem above is a numerical artifact probably leading to a root of a negative number due to a near vacuum state. Almost certainly not anything related to a buffer overflow. The shallow water problem could be a memory problem. I would not say it has been deprioritized or that it is a build system problem though. Rather it has been hard to debug as most of the able developers have not been able to reproduce the problem.

@ketch
Copy link
Member

ketch commented Oct 6, 2024

Thanks, @pavelkomarov . The test failure looks like a small enough difference to be due to rounding errors and not a code issue. We could loosen the test tolerance slightly to avoid this popping up.

Please, let's keep discussion of the shallow water on the sphere test here: #642. Otherwise it gets too hard to track all of what is said.

@ketch
Copy link
Member

ketch commented Oct 6, 2024

I was keeping some of this old Travis stuff around as a reminder that we still need to get parallel tests running on Github actions, but it's a good idea to remove these files so I've raised an issue as a reminder: #733.

@ketch ketch merged commit 28c638f into clawpack:master Oct 6, 2024
1 check failed
@pavelkomarov pavelkomarov deleted the nix_travis branch October 7, 2024 22:36
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 this pull request may close these issues.

3 participants