Tabulation of simple elements fail on an aarch64 machine
- Dominant language
- C++
- Stars
- 145
- Forks
- 47
- Avg merge
- 3h 5m
- Merged PRs (30d)
- 8
Description
Reproducer:
```python3
import numpy as np
import basix
from basix import CellType, ElementFamily, LagrangeVariant
def round(x : np.ndarray):
# round less than 1e-10 to 0
x[np.abs(x) < 1e-10] = 0
return x
for i in range(1, 5):
lagrange = basix.create_element(
ElementFamily.P, CellType.interval, i, LagrangeVariant.equispaced
)
points = lagrange.points
print(f"Degree {i}: \n{points}")
phi = lagrange.tabulate(0, points)
phi = round(phi)
print(f"Phi: \n{phi.reshape((points.size, -1))}")
```
It should be the identity.
Using `openblas@0.3.27 `:
```
Degree 1:
[[0.]
[1.]]
Phi:
[[1. 0.]
[0. 1.]]
Degree 2:
[[0. ]
[1. ]
[0.5]]
Phi:
[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]
Degree 3:
[[0. ]
[1. ]
[0.33333333]
[0.66666667]]
Phi:
[[ 1. 0. 0. 0. ]
[ 0. 1. 0. 0. ]
[ 0. 0. 1. 0. ]
[-0.03804685 -0.03804685 -0.11414056 0.88585944]]
Degree 4:
[[0. ]
[1. ]
[0.25]
[0.5 ]
[0.75]]
Phi:
[[ 1. 0. 0. 0. 0. ]
[ 0. 1. 0. 0. 0. ]
[ 0. 0. 1. 0. 0. ]
[-0.01150543 0.01150543 -0.02629812 1. 0.02629812]
[ 0.02229177 -0.02229177 0.05095261 0. 0.94904739]]
```
Tested with `gcc@11.4.0`, `gcc@12.4.0`, `gcc@14.2.0`
Since the matrices are so small, 1D elements I wouldn't expect it to use `blas`, but this could be the issue.
I haven't investigated it further.
Contributor guide
Assessment
This issue has not been assessed yet.