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

NSGA2 patch #365

Merged
merged 3 commits into from
Dec 22, 2023
Merged

NSGA2 patch #365

merged 3 commits into from
Dec 22, 2023

Conversation

ewu63
Copy link
Collaborator

@ewu63 ewu63 commented Nov 14, 2023

Purpose

Merge the patch from conda-forge/pyoptsparse-feedstock#36 upstream.

Expected time until merged

1 week

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

@ewu63 ewu63 requested a review from a team as a code owner November 14, 2023 02:26
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c233e8f) 73.34% compared to head (dee7a09) 61.58%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #365       +/-   ##
===========================================
- Coverage   73.34%   61.58%   -11.77%     
===========================================
  Files          22       22               
  Lines        3316     3316               
===========================================
- Hits         2432     2042      -390     
- Misses        884     1274      +390     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ewu63
Copy link
Collaborator Author

ewu63 commented Dec 4, 2023

Just rebased the code @marcomangano @ArshSaja

@eirikurj
Copy link
Contributor

eirikurj commented Dec 5, 2023

Strange that this is showing up now. @nwu63 for my information, what triggered this, and what was the system/compiler? Also, why is codecov reporting a large drop?

@ewu63
Copy link
Collaborator Author

ewu63 commented Dec 6, 2023

Strange that this is showing up now. @nwu63 for my information, what triggered this, and what was the system/compiler? Also, why is codecov reporting a large drop?

@whophil did this for the mac build, not sure what the root cause was. Maybe something changed in the toolchain within conda?
Coverage change is due to the PR being submitted on a fork, so some optimizers are skipped. Those should be irrelevant since there are only NSGA2-related changes here, which are covered in the public images.

@whophil
Copy link
Contributor

whophil commented Dec 6, 2023

@eirikurj @nwu63 the problem this patch was meant to fix first started appearing on builds after conda-forge moved from clang(x) 15 to 16 for Mac builds. I don't suppose this project is built with clang compilers on CI, but I imagine the error could be reproduced by attempting a build of the main branch with clang 16.

@whophil
Copy link
Contributor

whophil commented Dec 6, 2023

Here is a relevant excerpt from the Clang 16 release notes (https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html)

The -Wimplicit-function-declaration and -Wimplicit-int warnings now default to an error in C99, C11, and C17. As of C2x, support for implicit function declarations and implicit int has been removed, and the warning options will have no effect. Specifying -Wimplicit-int in C89 mode will now issue warnings instead of being a noop.

@eirikurj
Copy link
Contributor

eirikurj commented Dec 6, 2023

Thanks for the info. I looked a bit into this with GCC and there is a warning that is thrown,

../pyoptsparse/pyNSGA2/source/eval.c:25:5: warning: implicit declaration of function ‘nsga2func’ [-Wimplicit-function-declaration]

The patch removes this warning.

@ewu63
Copy link
Collaborator Author

ewu63 commented Dec 21, 2023

Bump @marcomangano @ArshSaja

Copy link
Contributor

@marcomangano marcomangano left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this, LGTM. Making a new release asap so that the patch can be removed from conda-forge

@marcomangano marcomangano merged commit 5fef213 into mdolab:main Dec 22, 2023
12 of 13 checks passed
@ewu63 ewu63 deleted the update-nsga2 branch December 22, 2023 17:29
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.

4 participants