-
Notifications
You must be signed in to change notification settings - Fork 120
Switch to cyipopt #425
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
Merged
Merged
Switch to cyipopt #425
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9cb76f1
very preliminary attempt with cyipoptcore
ewu63 f3b53a4
clean up meson.build
ewu63 5604b95
remove old ipopt bindings
ewu63 670648b
fix unsized array
ewu63 f2d9469
make cyipopt optional
ewu63 0791cdd
update build system
ewu63 6a7c907
set PKG_CONFIG_PATH
ewu63 5c3f069
format
ewu63 0dfe380
get rid of IPOPT_DIR
ewu63 18f8fdd
PKG_CONFIG_PATH
ewu63 bae881a
update docs
ewu63 95f06fe
return array of nans under analysis failure
kanekosh ef5fd77
added tests to check eval failure
kanekosh 1fec43b
only test SNOPT and IPOPT in func eval failure test
kanekosh 452dd7d
clean up meson.build again
ewu63 14734ab
typo
kanekosh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,60 +1,10 @@ | ||
| fs = import('fs') | ||
|
|
||
| if get_option('ipopt_dir') != '' or fs.is_dir('Ipopt') | ||
|
|
||
| ipopt_dir = '' | ||
|
|
||
| if get_option('ipopt_dir') != '' | ||
| ipopt_dir = get_option('ipopt_dir') | ||
| elif fs.is_dir('Ipopt') | ||
| ipopt_dir = fs.is_dir('Ipopt') | ||
| endif | ||
|
|
||
| ipopt_lib = [] | ||
| ipopt_idir = '' | ||
|
|
||
| # Ipopt installs differently on some systems (i.e. Fedora) | ||
| if fs.is_dir(ipopt_dir / 'lib') | ||
| ipopt_lib = [ipopt_dir / 'lib'] | ||
| elif fs.is_dir(ipopt_dir / 'lib64') | ||
| ipopt_lib = [ipopt_dir / 'lib64'] | ||
| endif | ||
|
|
||
|
|
||
| if fs.is_dir(ipopt_dir / 'include' / 'coin-or') | ||
| ipopt_idir = ipopt_dir / 'include' / 'coin-or' | ||
| elif fs.is_dir(ipopt_dir / 'include' / 'coin') | ||
| ipopt_idir = ipopt_dir / 'include' / 'coin' | ||
| endif | ||
|
|
||
| ipopt_dep = cc.find_library('ipopt-3', required: false, dirs: ipopt_lib) # only relevant on windows | ||
| if not ipopt_dep.found() | ||
| ipopt_dep = cc.find_library('ipopt', required: true, dirs: ipopt_lib) | ||
| endif | ||
|
|
||
| if fs.is_dir(ipopt_idir) | ||
| ipopt_inc = include_directories(ipopt_idir) | ||
| else | ||
| error('IPOPT include directory not found: ', ipopt_dir) | ||
| endif | ||
|
|
||
| py3_target.extension_module('pyipoptcore', | ||
| 'src/callback.c', | ||
| 'src/pyipoptcoremodule.c', | ||
| include_directories: [inc_np, 'src', ipopt_inc], | ||
| dependencies : [py3_dep, ipopt_dep], | ||
| subdir: 'pyoptsparse/pyIPOPT', | ||
| link_language: 'c', | ||
| install : false) | ||
| endif | ||
|
|
||
| #python_sources = [ | ||
| # python_sources = [ | ||
| # '__init__.py', | ||
| # 'pyIPOPT.py', | ||
| #] | ||
| # | ||
| #py3_target.install_sources( | ||
| # ] | ||
|
|
||
| # py3_target.install_sources( | ||
| # python_sources, | ||
| # pure: false, | ||
| # subdir: 'pyoptsparse/pyIPOPT' | ||
| #) | ||
| # ) | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.