Skip to content

test_macroedge(tet) fails on some hppa machines #979

@drew-parsons

Description

@drew-parsons

basix is failing test_macroedge[1-CellType.tetrahedron] on some debian hppa machines.
Build logs can be found at https://buildd.debian.org/status/logs.php?pkg=fenics-basix&arch=hppa

When failure occurs, the message is

____________________ test_macroedge[1-CellType.tetrahedron] ____________________

cell_type = CellType.tetrahedron, order = 1

    @pytest.mark.parametrize(
        "cell_type",
        [
            basix.CellType.interval,
            basix.CellType.triangle,
            basix.CellType.tetrahedron,
            basix.CellType.quadrilateral,
            basix.CellType.hexahedron,
        ],
    )
    @pytest.mark.parametrize("order", [0, 1, 2, 3, 4])
    def test_macroedge(cell_type, order):
        if cell_type == basix.CellType.triangle and order > 2:
            pytest.xfail("Degree > 2 edge macro polysets not implemented on triangles.")
        if cell_type == basix.CellType.tetrahedron and order > 1:
            pytest.xfail("Degree > 1 edge macro polysets not implemented on tetrahedra.")
    
        Qpts, Qwts = basix.make_quadrature(
            cell_type, 2 * order + 1, polyset_type=basix.PolysetType.macroedge
        )
        basis = basix.polynomials.tabulate_polynomial_set(
            cell_type, basix.PolysetType.macroedge, order, 0, Qpts
        )[0]
    
        ndofs = basis.shape[0]
        mat = np.zeros((ndofs, ndofs))
        for i in range(ndofs):
            for j in range(ndofs):
                mat[i, j] = sum(basis[i, :] * basis[j, :] * Qwts)
>       assert np.allclose(mat, np.eye(ndofs))
E       assert False
E        +  where False = <function allclose at 0x46eecb40>(array([[ 1.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n         0.        , -0.        ,  0.        ...    , -0.        , -0.        , -0.1711633 ,\n        -0.2292677 ,  0.26957468,  0.0286095 , -0.12574794,  0.890625  ]]), array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n       [0., 1., 0., 0., 0., 0., 0., 0., 0., 0.],\n       [0., 0., 1., ...0., 0., 1., 0., 0.],\n       [0., 0., 0., 0., 0., 0., 0., 0., 1., 0.],\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 1.]]))
E        +    where <function allclose at 0x46eecb40> = np.allclose
E        +    and   array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n       [0., 1., 0., 0., 0., 0., 0., 0., 0., 0.],\n       [0., 0., 1., ...0., 0., 1., 0., 0.],\n       [0., 0., 0., 0., 0., 0., 0., 0., 1., 0.],\n       [0., 0., 0., 0., 0., 0., 0., 0., 0., 1.]]) = <function eye at 0x46fb2cf8>(10)
E        +      where <function eye at 0x46fb2cf8> = np.eye

test_orthonormal_basis.py:164: AssertionError
=========================== short test summary info ============================
FAILED test_orthonormal_basis.py::test_macroedge[1-CellType.tetrahedron] - as...
= 1 failed, 9998 passed, 337 skipped, 72 deselected, 23 xfailed in 40618.78s (11:16:58) =

The failure is occuring on Debian's p-machines (pasta, pacific, pad), but passing on s (sap). That suggests to me it's a fault with some subtypes of hppa.

Perhaps it's a bug in gcc, rather than some faulty type assumption in basix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions