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

Allow GCC 10+ compilation #21

Merged
merged 3 commits into from
Nov 10, 2022
Merged

Allow GCC 10+ compilation #21

merged 3 commits into from
Nov 10, 2022

Conversation

sseraj
Copy link
Collaborator

@sseraj sseraj commented Nov 2, 2022

Purpose

In #16, I updated the AD code and ADFirstAidKit to use Tapenade 3.16 instead of 3.10. However, the newer ADFirstAidKit is not compatible with GCC 10+ because of type mismatches. I reverted the ADFirstAidKit files to Tapenade 3.10 in this PR. The actual AD code is still generated with Tapenade 3.16.

I added -fallow-argument-mismatch to the F77 gfortran flags to allow compilation with GCC 10+.

Expected time until merged

2-3 days

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@sseraj sseraj requested review from eirikurj and yqliaohk November 2, 2022 14:00
@sseraj sseraj requested a review from a team as a code owner November 2, 2022 14:00
@codecov
Copy link

codecov bot commented Nov 2, 2022

Codecov Report

Merging #21 (cf4cb3c) into main (3f2f060) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #21   +/-   ##
=======================================
  Coverage   49.97%   49.97%           
=======================================
  Files           5        5           
  Lines        1683     1683           
=======================================
  Hits          841      841           
  Misses        842      842           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@eirikurj
Copy link
Contributor

eirikurj commented Nov 7, 2022

I would prefer to keep the 3.16 files to be consistent to the version used. The alternative would be to apply the -fallow-argument-mismatch or develop an explicit interface for these functions. Overall, I think any approach would be a temporary fix anyway, since I know that the Tapenade team is moving away from including an adbuffer.f file, and it will be removed or deprecated in future versions. What do you think?

@sseraj
Copy link
Collaborator Author

sseraj commented Nov 7, 2022

The alternative would be to apply the -fallow-argument-mismatch

Now that you mention it, I think adding -fallow-argument-mismatch to just the F77 flags is the cleanest approach

@sseraj sseraj changed the title Use ADFirstAidKit 3.10 to allow GCC 10 compilation Allow GCC 10+ compilation Nov 7, 2022
@eirikurj
Copy link
Contributor

eirikurj commented Nov 7, 2022

Since this flag is not available for GCC < 10, I think you need something similar to what was done in mdolab/adflow#244, then all versions should work.

@sseraj
Copy link
Collaborator Author

sseraj commented Nov 7, 2022

Since this flag is not available for GCC < 10, I think you need something similar to what was done in mdolab/adflow#244, then all versions should work.

You're right. I just pushed an update.

@yqliaohk yqliaohk merged commit f7de7a4 into main Nov 10, 2022
@sseraj sseraj deleted the gcc10 branch November 10, 2022 16:12
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

Successfully merging this pull request may close these issues.

3 participants