-
Notifications
You must be signed in to change notification settings - Fork 105
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
Enable user requested termination of IPOPT #305
Conversation
Codecov Report
@@ Coverage Diff @@
## main #305 +/- ##
===========================================
- Coverage 84.17% 72.53% -11.65%
===========================================
Files 22 22
Lines 3317 3331 +14
===========================================
- Hits 2792 2416 -376
- Misses 525 915 +390
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hmm seems to be a linking issue on the Windows build. I'm not really familiar with conda nor flang but maybe @jackm97 is able to take a look? The log says
This isn't necessarily a blocker for me and I am okay with merging this if fixing this takes too long. It appears to be an unrelated issue anyhow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me, approving to speed up the process but I agree we should look into that windows failure
The issue seems to be the same as mesonbuild/meson#10778, so I will merge this PR now and deal with the Windows build failure later. |
@nwu63 Sorry, I just saw I was mentioned in this thread. Is there still an issue with the Windows build? |
@jackm97 no worries. Yes the Windows build still fails but the issue was reported to meson in the issue referenced above. Do you know if we could use a different Fortran compiler on Windows instead of flang? I thought conda provides GCC for Windows but I'm not sure. |
@nwu63 It does have GCC, the problem is it's extremely out of date. They're on something like gcc 4.6. I now recall this issue when building pyoptsparse internally. We locked meson to a previous version in the environment.yml. It slipped my mind that we did this. Is that a good enough workaround until it's fixed in meson? Edit to add: We may also be able to specify the linker, rather than let meson guess |
@jackm97 I don't want to take up too much of your time, so if it's easier to just pin meson to an earlier version let's do that. Would you mind pushing a small PR to test that out? |
@nwu63 will do |
Purpose
The intent of this change is to enable the IPOPT Optimizer to respond to a user requested termination in the same way that the SNOPT Optimizer does.
As with SNOPT, a value of 2 returned in the
fail
flag from a user evaluation function will be interpreted as a request to terminate the optimization. This is accomplished by means of theintermediate_callback
in the IPOPT API.Expected time until merged
Not urgent.
Type of change
Testing
The existing
user_termination
test for SNOPT has been updated to test IPOPT as well.Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedblack
andflake8
but left a few existing lines thatflake8
complained were over 80 columnsblack
made some changes that yourblack
didn't likefprettify
or C/C++ code withclang-format
as applicable