Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

f2py appears to skip code in solid.for that is not supported for Mac M2s #65

Open
scottstanie opened this issue Aug 8, 2023 · 1 comment

Comments

@scottstanie
Copy link
Collaborator

forwarded from Paul Rosen (on trying to install it on an M2 machine):

F2py appears to be skipping code in solid.fort that is not supported, in my case an implied DO in a DATA statement that is common in old fortran. A possible solution is to modify the setup to use –std=legacy in gfortran, but I don’t know how robust that is for all compilers and all machines.

More details

Pip failed until I had Michael Aivazis guide me through what is actually happening with pip and we got the code to rebuild the source with the right pip command line switch (--no-binary).
I ran f2py by hand in verbose mode and it told me that the compiler did not understand a particular implied do array definition so it was skipping the code! So I have no confidence that the code is actually correctly compiled. According to Aivazis, you must use –std=legacy to get old code like this to compile properly, but I have no idea how to do that with the pip infrastructure.

it might be solved now that you can Conda install it even for osx-arm... but it's probably a bad sign for future stability that a new macbook causes the standard compilation to fail.

@yunjunz yunjunz changed the title F2py appears to be skipping code in solid.fort that is not supported for Mac M2s f2py appears to skip code in solid.for that is not supported for Mac M2s Aug 9, 2023
@yunjunz
Copy link
Member

yunjunz commented Aug 9, 2023

Thank you @scottstanie for the info and forwarding. Could you update the notes regarding the --no-binary and -std=legacy options?

The long-term solution would be to translate the fotran code to python completely, as Piyush suggested before. This should not be a big project. UPDATE: I will try to work on this after #72.

I am a little bit hesitant going in this direction because the official code from IERS is still also in Fortran, based on which the solid.for is modified. Having a pure Python version seems to make it difficult to update together with the IERS version, although we have never done it in the current Fortran version neither.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants