meshpro / meshplex

:spider_web: Compute interesting points, areas, and volumes in simplex meshes of any dimension.
104 stars 22 forks source link

Result of test_remove_cells_boundary() is hardware-dependent #177

Closed sanvila closed 1 week ago

sanvila commented 1 week ago

Hello. This issue was discovered while building all Debian packages from source.

In some systems, test_remove_cells_boundary() from tests/test_remove_cells.py always fails:

=================================== FAILURES ===================================
__________________________ test_remove_cells_boundary __________________________

    def test_remove_cells_boundary():
        mesh = get_mesh1()

        assert np.all(mesh.is_boundary_point == [True, True, True, True, False])
        assert np.all(mesh.is_boundary_facet_local[0] == [False, False, False, False])
        assert np.all(mesh.is_boundary_facet_local[1] == [False, False, False, True])
        assert np.all(mesh.is_boundary_facet_local[2] == [True, True, True, False])
        assert np.all(
            mesh.is_boundary_facet == [True, True, False, True, False, True, False, False]
        )
        assert np.all(mesh.is_boundary_cell)
        assert np.all(mesh.facets_cells_idx == [0, 1, 0, 2, 1, 3, 2, 3])
        # cell id:
        assert np.all(mesh.facets_cells["boundary"][1] == [0, 3, 1, 2])
        # local edge:
        assert np.all(mesh.facets_cells["boundary"][2] == [2, 1, 2, 2])
        # cell id:
>       assert np.all(
            mesh.facets_cells["interior"][1:3].T == [[0, 3], [0, 1], [1, 2], [2, 3]]
        )
E       assert False
E        +  where False = <function all at 0x7fa4822107b0>(array([[3, 0]...      [2, 3]]) == [[0, 3], [0, ...1, 2], [2, 3]]
E        +    where <function all at 0x7fa4822107b0> = np.all
E           
E           Use -v to get more diff)

tests/test_remove_cells.py:104: AssertionError

The outcome seems to be hardware-dependent. On AWS instances of type c7a.large and c7i.large, the test always fails. These are the specs:

https://aws.amazon.com/es/ec2/instance-types/c7a/ https://aws.amazon.com/es/ec2/instance-types/c7i/

We (Debian) will probably disable the test in the meantime, as we want everybody to be able to build Debian packages from source.

Thanks.

nschloe commented 1 week ago

What version of meshplex?

sanvila commented 1 week ago

Version 0.17.1

Edit: Oh, I see there is version meshplex 0.19.7 in pypi.org. We could try to update the package first, assuming it still has a license which is compatible with the Debian Free Software Guidelines. I'll ask the usual maintainer (as I'm just doing general Debian QA work).

nschloe commented 1 week ago

We no longer support that version.

assuming it still has a license which is compatible with the Debian Free Software Guidelines

It doesn't.