Autoconf: Fortran testing of C bindings#234
Merged
Merged
Conversation
This patch fixes some issues with testing of C bindings in Fortran. Specifically, some tests are using a C compiler which may be unconfigured, causing unexpected errors. The autoconf script now uses the Fortran compiler to test these bindings, rather than using the C compiler to test for their existence. A new macro (AX_FC_CHECK_BIND_C) was added to run these tests. This achieves the actual goal (test of Fortran binding) on top of the original goal (availability of C function), while ensuring that the actual compiler of interest (FC) is used in the test. Two C-based tests are still present in the script for testing the size of jmp_buf and sigjmp_buf. The C compiler is now configured with the AX_MPI macro, and is only used to determine the size of these structs.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #234 +/- ##
============================================
+ Coverage 37.23% 37.50% +0.27%
============================================
Files 263 263
Lines 73060 72530 -530
Branches 13605 13503 -102
============================================
Hits 27201 27201
+ Misses 40841 40311 -530
Partials 5018 5018
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
adcroft
approved these changes
Nov 9, 2022
Member
adcroft
left a comment
There was a problem hiding this comment.
This seems to have fixed the issue we encountered on Gaea (that we'd have caught if I had not skipped a step).
Testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/17405
marshallward
pushed a commit
that referenced
this pull request
Apr 4, 2023
Fix NUOPC gnu restart issue by removing leading spaces in restartfiles list
This was referenced Apr 6, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch fixes some issues with testing of C bindings in Fortran. Specifically, some tests are using a C compiler which may be unconfigured, causing unexpected errors.
The autoconf script now uses the Fortran compiler to test these bindings, rather than using the C compiler to test for their existence. A new macro (AX_FC_CHECK_BIND_C) was added to run these tests.
This achieves the actual goal (test of Fortran binding) on top of the original goal (availability of C function), while ensuring that the actual compiler of interest (FC) is used in the test.
Two C-based tests are still present in the script for testing the size of jmp_buf and sigjmp_buf. The C compiler is now configured with the AX_MPI macro, and is only used to determine the size of these structs.