dedalus
dedalus copied to clipboard
EVP errors on native-arm builds on apple silicon
It looks like theres a variety of problems with both the dense and sparse eigenvalue solvers when using a native-arm build on apple silicon. For now I've changed the conda install scripts to build the stack for x86 on apple silicon by default. This comes at a 1.5-2x performance penalty, but seems much more robust for eigenvalue problems.
For dense problems, it seems like pinning libopenblas < 0.3.20 helps things, otherwise there are ggev errors. But for sparse problems, there are still ARPACK convergence errors for problems that work fine on x86.
Still getting ggev errors with libopenblas 0.3.21.
Opened an issue on the openblas repo: https://github.com/xianyi/OpenBLAS/issues/3735.
Less expensive workaround should be to build OpenBLAS on M1 with TARGET=ARMV8
The dense eigenvalue (ggev) errors are fixed with https://github.com/conda-forge/openblas-feedstock/pull/144 and https://github.com/conda-forge/openblas-feedstock/pull/145, so builds 1+ for libopenblas 0.3.21 from conda-forge should work. Sparse problems still persist.
Sparse problems seem to be fixed with scipy 1.9.1, so native-arm conda builds now pass all tests and run the examples. They still don't have higher-precision support in numpy, though, so we should add tests that can explicitly tell when e.g. spherical harmonic polynomial construction is failing due to underflow issues with the envelopes.
Is this fixed with the conda-forge packages for Dedalus3? (The documentation still says to install the x86_64 packages.)
No, we still need to work around the lack of higher-precision support on apple silicon for spherical problems. But for Cartesian problems I expect everything to work fine. But that said, we haven't tested thoroughly on arm builds yet.