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

Update iso c binding library, replace PR#490 #491

Merged
merged 2 commits into from
Feb 3, 2023

Conversation

stcui007
Copy link
Contributor

Update ISO C Binding library functions to be compatible with new noah-owp-modular.

Additions

Removals

Changes

extern/iso_c_fortran_bmi/src/bmi.f90
extern/iso_c_fortran_bmi/src/iso_c_bmi.f90
extern/iso_c_fortran_bmi/test/test_iso_c.c

Testing

Unit tests
Run ngen test
Build and run test_iso_c.c

Screenshots

Notes

This PR replace PR#490

Todos

Checklist

  • PR has an informative and human-readable title
  • [x ] Changes are limited to a single goal (no scope creep)
  • [x ] Code can be automatically merged (no conflicts)
  • [x ] Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist (automated report can be put here)

Target Environment support

  • [x ] Linux

Copy link
Contributor

@hellkite500 hellkite500 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to update the fortran unit test model code to implement these as well, and we could probably replicate the stand alone test conditions in the ngen unit tests at that point.

Other than that this looks like a reasonable implementation to make the binding conformant with BMI 2.0.

@@ -56,7 +65,7 @@ void check_status(int* status, char* name){
}
else{
printf("FAILURE\n");
exit(*status);
//exit(*status); //temporarily disable so test can continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to come back?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not commented out, the test exit from the first failure test, the rest of the code won't get run.

extern/iso_c_fortran_bmi/test/test_iso_c.c Outdated Show resolved Hide resolved
@stcui007
Copy link
Contributor Author

stcui007 commented Jan 25, 2023 via email

@hellkite500
Copy link
Contributor

Will open an issue about to update the test_bmi_fortran unit test model, that can be done in a separate PR.

@hellkite500 hellkite500 merged commit c2d39c1 into NOAA-OWP:master Feb 3, 2023
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.

2 participants