Bug#981901: basix: Nedelec 2nd kind H(curl) test fails on 32-bit systems
Drew Parsons
dparsons at debian.org
Thu Feb 4 21:18:30 GMT 2021
Source: basix
Version: 0.0.1~git20210122.4f10ef2-1
Severity: normal
Control: forwarded -1 https://github.com/FEniCS/basix/issues/111
Judging by the build errors at
https://buildd.debian.org/status/package.php?p=basix, looks like
Nedelec 2nd kind H(curl) is not compatible with 32 bit systems. e.g.
i386 https://buildd.debian.org/status/fetch.php?pkg=basix&arch=i386&ver=0.0.1%7Egit20210122.4f10ef2-1&stamp=1612391676&raw=0
armel https://buildd.debian.org/status/fetch.php?pkg=basix&arch=armel&ver=0.0.1%7Egit20210122.4f10ef2-1&stamp=1612398463&raw=0
armhf https://buildd.debian.org/status/fetch.php?pkg=basix&arch=armhf&ver=0.0.1%7Egit20210122.4f10ef2-1&stamp=1612392128&raw=0
The error message is
__ test_permutation_of_tabulated_data_tetrahedron[5-Nedelec 2nd kind H(curl)] __
element_name = 'Nedelec 2nd kind H(curl)', order = 5
@pytest.mark.parametrize("element_name", tetrahedron_elements)
@pytest.mark.parametrize("order", range(1, 6))
def test_permutation_of_tabulated_data_tetrahedron(element_name, order):
if element_name == "Crouzeix-Raviart" and order != 1:
pytest.xfail()
e = basix.create_element(element_name, "tetrahedron", order)
N = 4
points = np.array([[i / N, j / N, k / N]
for i in range(N + 1) for j in range(N + 1 - i) for k in range(N + 1 - i - j)])
values = e.tabulate(0, points)[0]
start = sum(e.entity_dofs[0])
ndofs = e.entity_dofs[1][0]
if ndofs != 0:
# Check that the 0th permutation undoes the effect of reflecting edge 0
reflected_points = np.array([[p[0], p[2], p[1]] for p in points])
reflected_values = e.tabulate(0, reflected_points)[0]
if e.mapping_name == "affine":
pass
elif e.mapping_name == "covariant piola":
for i, r in enumerate(reflected_values):
for j in range(e.dim):
reflected_values[i][j + e.dim::e.dim] = r[j + e.dim::e.dim][::-1]
elif e.mapping_name == "contravariant piola":
for i, r in enumerate(reflected_values):
for j in range(e.dim):
reflected_values[i][j] = -r[j]
reflected_values[i][j + e.dim::e.dim] = -r[j + e.dim::e.dim][::-1]
elif e.mapping_name == "double covariant piola":
pytest.skip() # TODO: implement double covariant piola
else:
raise ValueError(f"Unknown mapping: {e.mapping_name}")
for i, j in zip(values, reflected_values):
for d in range(e.value_size):
i_slice = i[d * e.dim:(d + 1) * e.dim]
j_slice = j[d * e.dim:(d + 1) * e.dim]
> assert np.allclose((e.base_permutations[0].dot(i_slice))[start: start + ndofs],
j_slice[start: start + ndofs])
E assert False
E + where False = <function allclose at 0xf6d2a658>(array([ 0., -0., -0., -0., -0., 0.]), array([-1.34, -1.12, -0.28, 0.68, 0.8 , -1.5 ]))
E + where <function allclose at 0xf6d2a658> = np.allclose
test/test_permutations.py:227: AssertionError
Since only this one test fails (for only this one element), I'll just
skip this test in the 32-bit Debian builds. This is a relatively rare
Finite Element, so the package is still useful for providing the others.
Once the test is skipped the error won't show in future builds (but
will still be there). So I'm filing this bug to keep track of the
problem.
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-2-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
More information about the debian-science-maintainers
mailing list