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

Tests fail after vanilla "developer" IDAES install on macOS. #148

Closed
adowling2 opened this issue Jan 8, 2021 · 9 comments
Closed

Tests fail after vanilla "developer" IDAES install on macOS. #148

adowling2 opened this issue Jan 8, 2021 · 9 comments
Assignees
Labels
Priority:Normal Normal Priority Issue or PR

Comments

@adowling2
Copy link
Contributor

adowling2 commented Jan 8, 2021

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:

  1. I had to uninstall the version of Ipopt from conda. I did this by running conda remove ipopt.
  2. Then I had to install pynumero: 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: ???

@adowling2
Copy link
Contributor Author

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.

@adowling2
Copy link
Contributor Author

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'.

@adowling2
Copy link
Contributor Author

@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.

@adowling2
Copy link
Contributor Author

@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

@adowling2 adowling2 changed the title Improve documentation: get IDAES to work with user compiled Ipopt Tests fail after vanilla "developer" IDAES install on macOS. Jan 8, 2021
@adowling2
Copy link
Contributor Author

@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).

@ksbeattie
Copy link
Member

This is (kinda) a duplicate of #157

@adowling2
Copy link
Contributor Author

adowling2 commented Jan 14, 2021

@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.

@ksbeattie ksbeattie added the Priority:High High Priority Issue or PR label Jan 14, 2021
@andrewlee94 andrewlee94 removed the Priority:High High Priority Issue or PR label Apr 21, 2022
@andrewlee94 andrewlee94 added the Priority:Normal Normal Priority Issue or PR label Apr 21, 2022
@ksbeattie
Copy link
Member

@adowling2 can we close this as part of the larger effort to support MacOS?

@andrewlee94
Copy link
Member

Given the lack of response, I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Normal Normal Priority Issue or PR
Projects
No open projects
Development

No branches or pull requests

4 participants