BUG: fix _selected_real_kind_func return values for macOS on arm64#21785
BUG: fix _selected_real_kind_func return values for macOS on arm64#21785seberg merged 2 commits intonumpy:mainfrom
_selected_real_kind_func return values for macOS on arm64#21785Conversation
|
Thanks @dhomeier. The |
Yes, apparently for I still tend to the second option, as it would at least correct some more cases that have just not been covered by tests before. Or might try and investigate what the kinds are on other CPUs. |
|
Adding |
|
As it only checks for |
b77ce35 to
d688510
Compare
|
As an alternative I have made an |
|
I tested this on |
Wow. This must be failing on main and 1.23rc as well? |
There's one failure on |
|
I guess darwin-arm64 has not been tested for that long anyway. |
|
@HaoZeke any chance you have time to check this out? Since a couple of platforms have these issues including M1 setups and debian arm builds. Will close reopen, to see retrigger CI, since this has been a while (it was all green). |
d688510 to
0bee070
Compare
|
The |
|
Thanks @HaoZeke in that case, it sounds like we should give this a try. I guess if something is off, it should be noisy and easy to fix. |
np.f2py.crackfortran._selected_real_kind_funcwas only consideringaarch64as amachinevalue for determining Fortran'sselected_real_kindvalues on these CPUs, but on macOS M1platform.machine()returnsarm64(in system/usr/bin/python3(3.8.9) and any Python 3.9-3.11 build I have tested).This PR adds the latter to the list of processors, fixing #21765. I have also extended the return range to 33, which matches the Fortran values on arm64 and x86_64 (and thus possibly works for all higher numbers, for which –1 is returned); giving this a try here by extending the test to
range(40).Tested on macOS 12.4 with the new ports for gcc 11.3 and 12.1 documented in iains/gcc-darwin-arm64#91 and iains/gcc-darwin-arm64#92.