Closed adowling2 closed 1 year ago
I am going to use this issue to document the debugging on my computer.
Challenge: I have multiple version of Ipopt installed on my computer. I installed both Ipopt via conda forge and I compiled Ipopt myself (with HSL). I have a symbolic link in /usr/local/bin/ipopt to the version of Ipopt I compiled myself. However, the version installed via anaconda supersedes this one when I use Ipopt. I know from running which ipopt
.
Running pytest per the installation instructions gave me this error:
Exception ignored in: <function AmplInterface.__del__ at 0x15836b5f0>
Traceback (most recent call last):
File "/anaconda3/envs/idaes-pse/lib/python3.7/site-packages/pyomo/contrib/pynumero/asl.py", line 216, in __del__
self.ASLib.EXTERNAL_AmplInterface_free_memory(self._obj)
AttributeError: 'AmplInterface' object has no attribute 'ASLib'
This was the reason I suspected the Ipopt version conflict.
Update: I ran conda remove ipopt
. I then verified the removal:
(idaes-pse) #####:idaes-pse adowling$ which ipopt
/usr/local/bin/ipopt
I am still getting the error 'AmplInterface' object has no attribute 'ASLib'
.
@michaelbynum @carldlaird Do you have any suggestions on how to get pynumero to work with a user compiled version of Ipopt. I am walking through the IDAES installation instructions in a fresh conda environment. Because I am on macOS, I had to compile Ipopt by myself.
@michaelbynum @carldlaird I figured it out.
I had to run conda install -c conda-forge pynumero_libraries
. This fixed the error 'AmplInterface' object has no attribute 'ASLib'
.
Next problem: OSError: dlopen(/Users/adowling/.idaes/bin/cubic_roots.so, 6): image not found
@ksbeattie @eslickj @dangunter As you likely know, idaes get-extensions
does not work on macOS. This has a few consequences. I worked through the Ipopt one. I need help with the thermo package external calls.
Once we work through these issues, I purpose updating idaes get-extensions
to partially work with macOS. We can warn the user they need to compile Ipopt with HSL on their own (or perhaps even check the proper version of Ipopt is available).
This is (kinda) a duplicate of #157
@ksbeattie This issue is broader. Right now, the IDAES installation instructions just fail because idaes get-extensions
checks the OS and exits if it is not supported. The Ipopt executable is just part of the problem. I think we can make idaes get-extensions
partially work on macOS without the Ipopt binaries.
@adowling2 can we close this as part of the larger effort to support MacOS?
Given the lack of response, I'll close this.
Note on organization: I'll update this top post as my understanding of the issue evolves. Posts in the comment thread document my debugging steps.
Overall problem:
idaes get-extensions
is not supported on macOS.I followed these instructions https://idaes-pse.readthedocs.io/en/stable/advanced_user_guide/advanced_install/index.html to install IDAES in a fresh conda environment.
After completing the installation instructions, multiple tests fail.
Specific problem 1: Ipopt
macOS users need to compile their own version of Ipopt with HSL to use advanced features such as scaling. It is tricky to ensure conda/IDAES uses the right version of Ipopt (user compiled version instead of the conda installed version).
Workaround:
conda remove ipopt
.conda install -c conda-forge pynumero_libraries
Specific problem 2: Cubic EoS/thermo solvers not installed
I think this is part of
idaes get-extensions
.Workaround: ???