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

updated cg_goto_f to use F2008 API #759

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

updated cg_goto_f to use F2008 API #759

wants to merge 13 commits into from

Conversation

brtnfld
Copy link
Member

@brtnfld brtnfld commented Mar 8, 2024

Experimenting with switching to using F2008 features.

@brtnfld
Copy link
Member Author

brtnfld commented Mar 8, 2024

@MicK7, I wonder why we are passing an array of strings as an argument for cg_goto_f. I don't think passing an array would work (at least, I don't think any tests do that).

I'm unsure why we did not "flip the switch" to doing it this way; it was probably a compiler issue.

It also looks like we never technically use the end variable, so if someone does "end=end," it won't work.

@MicK7
Copy link
Contributor

MicK7 commented Mar 10, 2024

If you refer to the optional array of argument of cg_goto_f in cgns_f.F90 It was introduced to imitate the C variadic array.
I don't think it is heavily tested.

I am not aware of the "end=end" issue I need to investigate but you might be right.
Anyway good job on moving forward with more fortran 2008 support.
If we could retire the old legacy fortran API it would be nice but a lot of test and tutorial would need an update

@MicK7
Copy link
Contributor

MicK7 commented Mar 19, 2024

LGTM as the MacOs failure is not related to the change but to a tooling bad configuration.

@brtnfld
Copy link
Member Author

brtnfld commented May 2, 2024

The goto_f interface should be DIMENSION(1) and not DIMENSION(*), as passing a character array with a len != 1 does not work (and is probably not common anyway since no one has complained).

CHARACTER(C_CHAR), DIMENSION(*), INTENT(IN), OPTIONAL :: UserDataName1,UserDataName2, &
            UserDataName3,UserDataName4,UserDataName5,UserDataName6,UserDataName7,UserDataName8, &
            UserDataName9,UserDataName10,UserDataName11,UserDataName12,UserDataName13,UserDataName14, &
            UserDataName15,UserDataName16,UserDataName17,UserDataName18,UserDataName19,UserDataName20

@brtnfld
Copy link
Member Author

brtnfld commented May 2, 2024

@MicK7, What is the issue with the MacOS runner?

@MicK7
Copy link
Contributor

MicK7 commented May 2, 2024

@MicK7, What is the issue with the MacOS runner?

It seems the MacOS runner image switched from Apple clang 14 to Apple clang 15.
In the build gcc is specified through the CC variable but it is well apple clang that is used for the build.
It appears that gfortran 13 may not link properly with clang 15 abi or there is something missing at compile and/or link time.

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

Successfully merging this pull request may close these issues.

None yet

2 participants