Comments (11)
Both are working! Thanks so much for the effort!
from pyopt.
I think the issue is not with pyopt (which is unmaintained, so please don't use this in new software).
Looks like you are building numpy from source for avx512 which your toolchain does not support.
I think you need to either install numpy first (python -m pip install --user numpy
),
or pass extra arguments to limit the cpu features numpy uses.
from pyopt.
Thanks for the reply. I will try play with your suggestion and give a note in case of problems.
from pyopt.
Hi all,
I have also some issues with the installation of pyOpt in Python 3.10. Some of the optimizers work, some don't. It would be really great, if somebody can find a solution to get all the optimizers running. It is quite crucial for a project and was the whole reason to use pyOpt.
This is what I tried. I compiled them all one-by-one inplace via:
python setup.py build_ext --cpu-baseline="native" --inplace
The ones that I cannot import after building are: ALGENCAN, FSQP, GCMMA, MMA, MMFD, NLPQL, NLPQLP, SNOPT. These are the detailed errors that I get upon importing in Python:
For ALGENCAN:
Python 3.10.12+ (heads/3.10:917439d, Aug 16 2023, 18:31:40) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import algencan
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: pyALGENCAN/algencan.cpython-310-x86_64-linux-gnu.so: undefined symbol: pyobj_from_character1
>>>
For FSQP
Python 3.10.12+ (heads/3.10:917439d, Aug 16 2023, 18:31:40) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ffsqp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: pyFSQP/ffsqp.cpython-310-x86_64-linux-gnu.so: undefined symbol: ffsqp_
For GCMMA
Python 3.10.12+ (heads/3.10:917439d, Aug 16 2023, 18:31:40) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gcmma
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: pyGCMMA/gcmma.cpython-310-x86_64-linux-gnu.so: undefined symbol: gcmma_
For MMA
Python 3.10.12+ (heads/3.10:917439d, Aug 16 2023, 18:31:40) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mma
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: pyMMA/mma.cpython-310-x86_64-linux-gnu.so: undefined symbol: mma_
For MMFD
Python 3.10.12+ (heads/3.10:917439d, Aug 16 2023, 18:31:40) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mmfd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: pyMMFD/mmfd.cpython-310-x86_64-linux-gnu.so: undefined symbol: ads_
For NLPQL
Python 3.10.12+ (heads/3.10:917439d, Aug 16 2023, 18:31:40) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nlpql
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: pyNLPQL/nlpql.cpython-310-x86_64-linux-gnu.so: undefined symbol: nlpql1_
For NLPQLP
Python 3.10.12+ (heads/3.10:917439d, Aug 16 2023, 18:31:40) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nlpqlp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: pyNLPQLP/nlpqlp.cpython-310-x86_64-linux-gnu.so: undefined symbol: ql_
For SNOPT (throws also a lot of f2py errors while building):
Python 3.10.12+ (heads/3.10:917439d, Aug 16 2023, 18:31:40) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import snopt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: pySNOPT/snopt.cpython-310-x86_64-linux-gnu.so: undefined symbol: sninit_
Thanks a lot for any help!
from pyopt.
The algencan error is not expected, and I have reported a reproducer upstream (=numpy).
About the other optimizers, these don't work because their fortran sources are missing.
You need to obtain a license for these, and add their sources in the appropriate locations.
from pyopt.
ALGENCAN links now without missing symbols, but it is 100% untested.
from pyopt.
Closing this issue, since there's nothing I can do about the other failing modules, apart from moving them to another location.
from pyopt.
Great, it compiles and importing algencan
directly from ~/.pyenv/versions/3.10-dev/lib/python3.10/site-packages/pyOpt/pyALGENCAN
does not show any errors anymore!
BUT there is still the problem that ALGENCAN and FILTERSD do not appear as methods to pyOpt like the others, e.g. COBYLA:
Python 3.10.12+ (heads/3.10:56e8c87, Aug 22 2023, 13:43:03) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyOpt
>>> pyOpt.
pyOpt.COBYLA( pyOpt.Objective( pyOpt.SOLVOPT( pyOpt.pyFILTERSD pyOpt.pyOpt_objective pyOpt.pySLSQP
pyOpt.CONMIN( pyOpt.Optimization( pyOpt.Variable( pyOpt.pyKSOPT pyOpt.pyOpt_optimization pyOpt.pySOLVOPT
pyOpt.Constraint( pyOpt.Optimizer( pyOpt.pyALGENCAN pyOpt.pyMIDACO pyOpt.pyOpt_optimizer
pyOpt.Gradient( pyOpt.PSQP( pyOpt.pyALHSO pyOpt.pyNSGA2 pyOpt.pyOpt_parameter
pyOpt.History( pyOpt.Parameter( pyOpt.pyALPSO pyOpt.pyOpt_constraint pyOpt.pyOpt_variable
pyOpt.KSOPT( pyOpt.SDPEN( pyOpt.pyCOBYLA pyOpt.pyOpt_gradient pyOpt.pyPSQP
pyOpt.NSGA2( pyOpt.SLSQP( pyOpt.pyCONMIN pyOpt.pyOpt_history pyOpt.pySDPEN
Therefore, using these solvers unfortunately does not work. Can you please have a look? This most likely requires only a minor change to the code as I am pretty sure that both worked in python2. Thanks a lot! Can you please re-open the issue?
from pyopt.
I fixed algencan in 4e1aa7d.
pyopt.FILTERSD
is apparently a wrapper around a python "filterSD" library, but Google doesn't tell me where I can find this library.
So unless you are able to track it down, consider filtersd dead too.
from pyopt.
Thanks! The module is now there, but I get another error:
File ".pyenv/versions/3.10-dev/lib/python3.10/site-packages/pyOpt/pyALGENCAN/pyALGENCAN.py", line 401, in __solve__
algencan.algencan(epsfeas,epsopt,efacc,eoacc,iprint,ncomp,nn,xx,xl,xu,mm,lm,equatn,linear,coded,checkder,ff,cnormu,snorm,nlpsupn,inform,ifile,evalf,evalg,evalh,evalc,evaljac,evalhc,evalfc,evalgjac,evalgjacp,evalhl,evalhlp)
ValueError: algencan.algencan() 22nd argument (ifile) can't be converted to int
And about FILTERSD I found this: https://github.com/coin-or/filterSD
from pyopt.
I think I fixed the obvious python errors.
It looks like the algencan optimizer did not receive a lot of attention, or it has bit rotted a lot.
So I'm not sure it will even work, and it might hang.
And about FILTERSD I found this: https://github.com/coin-or/filterSD
Cool. I looked at it again, and it was just a wrong import. It now imports.
But again, no guarantee on it working.
from pyopt.
Related Issues (17)
- How to obtain solution HOT 1
- I cannot import any solver - For example SLSQP or NSGA2. Attribute does not exists HOT 4
- FTBS on Debian/testing with gfortran 10.2.0 HOT 5
- pip or conda version HOT 5
- Overall improvements HOT 7
- Compilation of PyOpt in the local directory failed HOT 1
- mpi4py HOT 2
- Are some algorithms, such as MMA, GCMMA, and IPOPT, not supported yet? HOT 2
- NSGA2 SegFault HOT 6
- Cannot import pySLSQP on mac-m1 HOT 5
- IPOPT shared library failed to import HOT 1
- I built only 8/20 optimization engines !!!?? And they work well .. the rests have not .pyd file HOT 1
- Import Error for package ALGENCAN
- SNOPT error HOT 3
- Cannot Import MMA from pyMMA
- ImportError: cannot import name 'ALGENCAN' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyopt.