IDAES / idaes-pse

The IDAES Process Systems Engineering Framework
https://idaes-pse.readthedocs.io/
Other
218 stars 235 forks source link

Unable to load HSL solvers for IPOPT on M1 Mac #1494

Closed mollydougher closed 1 month ago

mollydougher commented 1 month ago

I am trying to get IPOPT with the HSL solvers on my Mac (M1 chip), but the library for the HSL solvers is missing. If I try to specify an HSL solver like ma27, I get the following:

Exception of type: OPTION_INVALID in file "IpAlgBuilder.cpp" at line 268:
 Exception message: Selected linear solver MA27 not available.
Tried to obtain MA27 from shared library "libhsl.dylib", but the following error occured:
dlopen(libhsl.dylib, 0x0002): tried: 'libhsl.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibhsl.dylib' (no such file), '/Users/mollydougher/.idaes/bin/libhsl.dylib' (no such file), '/usr/local/Cellar/gcc/13.1.0/lib/gcc/current/gcc/x86_64-
EXIT: Invalid option encountered.
WARNING: Loading a SolverResults object with a warning status into
model.name="unknown";
  - termination condition: other
  - message from solver: <undefined>
{'Solver': [{'Status': 'warning', 'Termination condition': 'other'}]}
mollydougher commented 1 month ago

@Robbybp , @andrewlee94 suggested I ask for your input.

adowling2 commented 1 month ago

On my computer with an M1 processor, I added these lines to the .bashrc file:

export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/Users/adowling/.idaes/bin"
export PATH="$PATH:/Users/adowling/.idaes/bin"

You can try running these in your terminal.

lbianchi-lbl commented 1 month ago

@mollydougher can you try running the following commands in the same environment where you encountered the error and paste the output?

  1. pip list
  2. pip show idaes-pse pyomo
  3. idaes get-extensions --verbose
  4. Whatever command you ran that caused the original error to be raised (to confirm the error still occurs)
Robbybp commented 1 month ago

@mollydougher How did you obtain Ipopt? Is this compiled from source, from idaes get-extensions, from conda, etc.?

adowling2 commented 1 month ago

Molly is trying to use get extensions on an Apple M1 machine.

mollydougher commented 1 month ago

@mollydougher How did you obtain Ipopt? Is this compiled from source, from idaes get-extensions, from conda, etc.?

@Robbybp I used idaes get-extensions

mollydougher commented 1 month ago

@mollydougher can you try running the following commands in the same environment where you encountered the error and paste the output?

  1. pip list
  2. pip show idaes-pse pyomo
  3. idaes get-extensions --verbose
  4. Whatever command you ran that caused the original error to be raised (to confirm the error still occurs)

3. idaes get-extensions --verbose

@lbianchi-lbl I am getting a new error now.

1.

 Package                       Version                       Editable project location
----------------------------- ----------------------------- ----------------------------------
accessible-pygments           0.0.4
alabaster                     0.7.16
annotated-types               0.7.0
anyio                         4.5.0
appdirs                       1.4.4
appnope                       0.1.3
argon2-cffi                   23.1.0
argon2-cffi-bindings          21.2.0
arrow                         1.3.0
astroid                       2.15.8
asttokens                     2.4.1
async-lru                     2.0.4
attrs                         23.2.0
Babel                         2.14.0
beautifulsoup4                4.12.3
black                         24.3.0
bleach                        6.1.0
Brotli                        1.1.0
cached-property               1.5.2
certifi                       2024.8.30
cffi                          1.17.1
charset-normalizer            3.3.2
click                         8.1.7
comm                          0.2.1
contourpy                     1.2.0
coverage                      7.6.1
cycler                        0.12.1
debugpy                       1.8.5
decorator                     5.1.1
defusedxml                    0.7.1
dill                          0.3.7
dnspython                     2.5.0
docutils                      0.20.1
entrypoints                   0.4
exceptiongroup                1.2.2
executing                     2.1.0
fastjsonschema                2.19.1
flexcache                     0.3
flexparser                    0.3.1
fonttools                     4.47.2
fqdn                          1.5.1
greenlet                      3.0.3
h11                           0.14.0
h2                            4.1.0
h5py                          3.10.0
hpack                         4.0.0
httpcore                      1.0.5
httpx                         0.27.2
hyperframe                    6.0.1
idaes-pse                     2.5.0
idaes-ui                      0.24.8
idna                          3.10
imagesize                     1.4.1
importlib_metadata            8.5.0
importlib_resources           6.4.5
iniconfig                     2.0.0
ipykernel                     6.29.0
ipython                       8.27.0
ipython-genutils              0.2.0
isoduration                   20.11.0
isort                         5.13.2
jedi                          0.19.1
Jinja2                        3.1.4
json5                         0.9.25
jsonpointer                   3.0.0
jsonschema                    4.23.0
jsonschema-specifications     2023.12.1
jupyter-book                  1.0.2
jupyter-cache                 0.6.1
jupyter_client                7.4.9
jupyter_core                  5.7.1
jupyter-events                0.10.0
jupyter-lsp                   2.2.5
jupyter_server                2.14.1
jupyter_server_terminals      0.5.3
jupyterlab                    4.2.5
jupyterlab_pygments           0.3.0
jupyterlab_server             2.27.3
kiwisolver                    1.4.5
latexcodec                    2.0.1
lazy-object-proxy             1.10.0
linkify-it-py                 2.0.2
markdown-it-py                3.0.0
MarkupSafe                    2.1.4
matplotlib                    3.8.2
matplotlib-inline             0.1.6
mccabe                        0.7.0
mdit-py-plugins               0.4.1
mdurl                         0.1.2
mistune                       3.0.2
mpmath                        1.3.0
mypy-extensions               1.0.0
myst-nb                       1.1.1
myst-parser                   2.0.0
nb-conda-kernels              2.3.1
nbclassic                     1.1.0
nbclient                      0.10.0
nbconvert                     7.10.0
nbformat                      5.9.2
nbmake                        1.4.6
nest_asyncio                  1.6.0
networkx                      3.2.1
notebook                      6.5.7
notebook_shim                 0.2.4
numpy                         1.26.3
overrides                     7.7.0
packaging                     24.1
pandas                        2.2.0
pandocfilters                 1.5.0
parameter-sweep               0.1.dev5
parso                         0.8.4
pathspec                      0.12.1
pexpect                       4.9.0
pickleshare                   0.7.5
pillow                        10.2.0
Pint                          0.24.3
pip                           23.3.1
pkgutil_resolve_name          1.3.10
platformdirs                  4.1.0
pluggy                        1.3.0
ply                           3.11
prometheus_client             0.20.0
prommis                       0.4.1.dev3+g56171ea.d20240815 /Users/mollydougher/GitHub/prommis
prompt_toolkit                3.0.47
psutil                        6.0.0
ptyprocess                    0.7.0
pure-eval                     0.2.2
pybtex                        0.24.0
pybtex-docutils               1.0.3
pycparser                     2.22
pydantic                      2.8.2
pydantic_core                 2.20.1
pydata-sphinx-theme           0.15.2
Pygments                      2.17.2
pylint                        2.17.7
pymongo                       4.6.1
pyobjc-core                   10.3.1
pyobjc-framework-Cocoa        10.3.1
Pyomo                         6.7.3
pyparsing                     3.1.1
PySocks                       1.7.1
pytest                        7.4.4
pytest-cov                    5.0.0
python-dateutil               2.9.0
python-json-logger            2.0.7
pytz                          2023.3.post1
PyYAML                        6.0.1
pyzmq                         24.0.1
referencing                   0.35.1
requests                      2.32.3
rfc3339-validator             0.1.4
rfc3986-validator             0.1.1
rpds-py                       0.17.1
scipy                         1.12.0
seaborn                       0.13.2
Send2Trash                    1.8.3
setuptools                    68.2.2
six                           1.16.0
sniffio                       1.3.1
snowballstemmer               2.2.0
soupsieve                     2.5
Sphinx                        7.4.7
sphinx-book-theme             1.1.3
sphinx-comments               0.0.3
sphinx-copybutton             0.5.2
sphinx_design                 0.6.1
sphinx_external_toc           1.0.1
sphinx-jupyterbook-latex      1.0.0
sphinx-multitoc-numbering     0.1.3
sphinx-thebe                  0.3.1
sphinx-togglebutton           0.3.2
sphinxcontrib-applehelp       1.0.8
sphinxcontrib-bibtex          2.5.0
sphinxcontrib-devhelp         1.0.6
sphinxcontrib-htmlhelp        2.0.5
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.7
sphinxcontrib-serializinghtml 1.1.10
SQLAlchemy                    2.0.25
stack-data                    0.6.2
sympy                         1.12
tabulate                      0.9.0
terminado                     0.18.1
tinycss2                      1.3.0
tokenize-rt                   5.2.0
tomli                         2.0.1
tomlkit                       0.12.3
tornado                       6.4.1
traitlets                     5.14.3
types-python-dateutil         2.9.0.20240906
typing_extensions             4.9.0
typing-utils                  0.1.0
tzdata                        2023.4
uc-micro-py                   1.0.2
uri-template                  1.3.0
urllib3                       2.2.2
watertap                      1.0.0
wcwidth                       0.2.13
webcolors                     24.8.0
webencodings                  0.5.1
websocket-client              1.8.0
wheel                         0.41.2
wrapt                         1.16.0
zipp                          3.20.2
  1. Name: idaes-pse
    Version: 2.5.0
    Summary: IDAES Process Systems Engineering Framework
    Home-page: https://idaes.org
    Author: 
    Author-email: 
    License: BSD 
    Location: /Users/mollydougher/opt/anaconda3/envs/prommis-dev/lib/python3.11/site-packages
    Requires: click, matplotlib, networkx, numpy, pandas, pint, pyomo, scipy, sympy
    Required-by: parameter-sweep, prommis, watertap
    ---
    Name: Pyomo
    Version: 6.7.3
    Summary: Pyomo: Python Optimization Modeling Objects
    Home-page: http://pyomo.org
    Author: 
    Author-email: 
    License: BSD
    Location: /Users/mollydougher/opt/anaconda3/envs/prommis-dev/lib/python3.11/site-packages
    Requires: ply
    Required-by: idaes-pse, parameter-sweep, prommis, watertap
  2. Getting files...
    DEBUG   idaes.commands.util.download_bin: Downloading binaries for darwin-x86_64
    DEBUG   idaes.commands.util.download_bin: Downloading binaries from https://github.com/IDAES/idaes-ext/releases/download/3.4.0
    DEBUG   idaes.commands.util.download_bin: Getting checksum file https://raw.githubusercontent.com/IDAES/idaes-ext/main/releases/sha256sum_3.4.0.txt
    DEBUG   idaes.commands.util.download_bin: Getting lib from: https://github.com/IDAES/idaes-ext/releases/download/3.4.0/idaes-lib-darwin-x86_64.tar.gz
    DEBUG   idaes.commands.util.download_bin: Saving solvers to: /Users/mollydougher/.idaes/bin/idaes-lib-darwin-x86_64.tar.gz
    DEBUG   idaes.commands.util.download_bin: Getting solvers from: https://github.com/IDAES/idaes-ext/releases/download/3.4.0/idaes-solvers-darwin-x86_64.tar.gz
    DEBUG   idaes.commands.util.download_bin: Saving solvers to: /Users/mollydougher/.idaes/bin/idaes-solvers-darwin-x86_64.tar.gz
    DEBUG   idaes.commands.util.download_bin: lib Hash a07e6686c7d8eda3f4d11773ad0d9fb8ab1de07de173f9fc5cba6116ca7a4d4c
    DEBUG   idaes.commands.util.download_bin: solvers Hash 27c7ab28a8707b91a7edf81cdab7880c5d58eb24d30eb2411774d0de92b1c775
    DEBUG   idaes.commands.util.download_bin: Extracting files in /Users/mollydougher/.idaes/bin/idaes-lib-darwin-x86_64.tar.gz to /Users/mollydougher/.idaes/bin
    DEBUG   idaes.commands.util.download_bin: Extracting files in /Users/mollydougher/.idaes/bin/idaes-solvers-darwin-x86_64.tar.gz to /Users/mollydougher/.idaes/bin
    Done
    ---------------------------------------------------
    IDAES Extensions Build Versions
    ===================================================
    Solvers:  v3.4.0 20230607-0059 darwin-x86_64
    Library:  v3.4.0 20230607-0125 darwin-x86_64
    ===================================================
  3. WARNING: Could not locate the 'ipopt' executable, which is required for solver
    ipopt
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/Users/mollydougher/opt/anaconda3/envs/prommis-dev/lib/python3.11/site-packages/pyomo/opt/base/solvers.py", line 534, in solve
    self.available(exception_flag=True)
    File "/Users/mollydougher/opt/anaconda3/envs/prommis-dev/lib/python3.11/site-packages/pyomo/opt/solver/shellcmd.py", line 140, in available
    raise ApplicationError(msg % self.name)
    pyomo.common.errors.ApplicationError: No executable found for solver 'ipopt'
mollydougher commented 1 month ago

export PATH="$PATH:/Users/adowling/.idaes/bin"

@adowling2 After running those lines in my terminal, and then trying to solve with ma27, I get the following:

Exception of type: OPTION_INVALID in file "IpAlgBuilder.cpp" at line 268:
 Exception message: Selected linear solver MA27 not available.
Tried to obtain MA27 from shared library "libhsl.dylib", but the following error occured:
dlopen(libhsl.dylib, 0x0002): tried: '/libhsl.dylib' (no such file), '/Users/mollydougher/.idaes/bin/libhsl.dylib' (no such file), 'libhsl.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibhsl.dylib' (no such file), '/Users/mollydougher/.ida

EXIT: Invalid option encountered.
WARNING: Loading a SolverResults object with a warning status into
model.name="unknown";
    - termination condition: other
    - message from solver: <undefined>
{'Solver': [{'Status': 'warning', 'Termination condition': 'other'}]}

I also updated my .bash_profile with this path (my previous path was export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Users/mollydougher/.idaes/bin) but then get the following:

WARNING: Could not locate the 'ipopt' executable, which is required for solver
ipopt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mollydougher/opt/anaconda3/envs/prommis-dev/lib/python3.11/site-packages/pyomo/opt/base/solvers.py", line 534, in solve
    self.available(exception_flag=True)
  File "/Users/mollydougher/opt/anaconda3/envs/prommis-dev/lib/python3.11/site-packages/pyomo/opt/solver/shellcmd.py", line 140, in available
    raise ApplicationError(msg % self.name)
pyomo.common.errors.ApplicationError: No executable found for solver 'ipopt'
lbianchi-lbl commented 1 month ago

@mollydougher Thanks for running those checks. Could you post the contents of your ~/.idaes directory, e.g. by running ls -lahR ~/.idaes/?

mollydougher commented 1 month ago
(prommis-dev) mollydougher@mollys-mbp ~ % ls -lahR ~/.idaes/
total 0
drwxr-xr-x   4 mollydougher  staff   128B Jul  6  2023 .
drwxr-x---+ 49 mollydougher  staff   1.5K Oct  4 11:36 ..
drwxr-xr-x  58 mollydougher  staff   1.8K Oct  3 15:37 bin
drwxr-xr-x   2 mollydougher  staff    64B Jul  6  2023 testing

/Users/mollydougher/.idaes//bin:
total 232960
drwxr-xr-x  58 mollydougher  staff   1.8K Oct  3 15:37 .
drwxr-xr-x   4 mollydougher  staff   128B Jul  6  2023 ..
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._bonmin
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._cbc
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._clp
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._couenne
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._cubic_roots.dylib
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._functions.dylib
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._general_helmholtz_external.dylib
-rwxr-xr-x   1 mollydougher  staff   212B Aug 11 17:52 ._helm_data
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._ipopt
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._ipopt_l1
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._ipopt_sens
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._ipopt_sens_l1
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._libgcc_s.1.1.dylib
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._libgfortran.5.dylib
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._libgomp.1.dylib
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._libipopt.3.dylib
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._libipopt.dylib
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._libpynumero_ASL.dylib
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._libquadmath.0.dylib
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._libsipopt.3.dylib
-rwxr-xr-x   1 mollydougher  staff   212B Jun  6  2023 ._libsipopt.dylib
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._libstdc++.6.dylib
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._license.txt
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._license_lib.txt
-rwxr-xr-x   1 mollydougher  staff    11M Jun  6  2023 bonmin
-rwxr-xr-x   1 mollydougher  staff   9.1M Jun  6  2023 cbc
-rwxr-xr-x   1 mollydougher  staff   5.7M Jun  6  2023 clp
-rwxr-xr-x   1 mollydougher  staff    13M Jun  6  2023 couenne
-rwxr-xr-x   1 mollydougher  staff    33K Jun  6  2023 cubic_roots.dylib
-rwxr-xr-x   1 mollydougher  staff    32K Jun  6  2023 functions.dylib
-rwxr-xr-x   1 mollydougher  staff   1.2M Jun  6  2023 general_helmholtz_external.dylib
drwxr-xr-x  90 mollydougher  staff   2.8K Jun  6  2023 helm_data
-rw-r--r--   1 mollydougher  staff   424K Oct  4 09:06 idaes-lib-darwin-x86_64.tar.gz
-rw-r--r--   1 mollydougher  staff   3.4M Jun  6  2023 idaes-local-darwin-x86_64.tar.gz
-rw-r--r--   1 mollydougher  staff    32M Oct  4 09:07 idaes-solvers-darwin-x86_64.tar.gz
-rwxr-xr-x   1 mollydougher  staff   4.6M Jun  6  2023 ipopt
-rwxr-xr-x   1 mollydougher  staff   4.8M Jun  6  2023 ipopt_l1
-rwxr-xr-x   1 mollydougher  staff   4.8M Jun  6  2023 ipopt_sens
-rwxr-xr-x   1 mollydougher  staff   5.0M Jun  6  2023 ipopt_sens_l1
-rw-r--r--   1 mollydougher  staff   180K Jun  6  2023 libgcc_s.1.1.dylib
-rw-r--r--   1 mollydougher  staff   3.3M Jun  6  2023 libgfortran.5.dylib
-rw-r--r--   1 mollydougher  staff   444K Jun  6  2023 libgomp.1.dylib
-rwxr-xr-x   1 mollydougher  staff   4.2M Jun  6  2023 libipopt.3.dylib
-rwxr-xr-x   1 mollydougher  staff   4.2M Jun  6  2023 libipopt.dylib
-rwxr-xr-x   1 mollydougher  staff   395K Jun  6  2023 libpynumero_ASL.dylib
-rw-r--r--   1 mollydougher  staff   340K Jun  6  2023 libquadmath.0.dylib
-rwxr-xr-x   1 mollydougher  staff   233K Jun  6  2023 libsipopt.3.dylib
-rwxr-xr-x   1 mollydougher  staff   233K Jun  6  2023 libsipopt.dylib
-rw-r--r--   1 mollydougher  staff   3.8M Jun  6  2023 libstdc++.6.dylib
-rw-r--r--   1 mollydougher  staff   5.8K Jun  6  2023 license.txt
-rw-r--r--   1 mollydougher  staff   5.8K Jun  6  2023 license_lib.txt
-rw-r--r--   1 mollydougher  staff   3.5K Jul  6  2023 sha256sum_3.3.0.txt
-rw-r--r--   1 mollydougher  staff   3.5K Oct  4 09:06 sha256sum_3.4.0.txt
-rw-r--r--   1 mollydougher  staff   3.5K Oct  3 15:37 sha256sum_3.4.2.txt
-rw-r--r--   1 mollydougher  staff    34B Jun  6  2023 version_lib.txt
-rw-r--r--@  1 mollydougher  staff    34B Jun  6  2023 version_solvers.txt

/Users/mollydougher/.idaes//bin/helm_data:
total 1024
drwxr-xr-x  90 mollydougher  staff   2.8K Jun  6  2023 .
drwxr-xr-x  58 mollydougher  staff   1.8K Oct  3 15:37 ..
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._co2.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._co2.py
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._co2_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._co2_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._co2_expressions_tcx.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._co2_expressions_visc.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._co2_parameters.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._h2o.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._h2o.py
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._h2o_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._h2o_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._h2o_expressions_tcx.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._h2o_expressions_visc.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._h2o_parameters.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._helmholtz_parameters.py
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r1234ze.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r1234ze.py
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r1234ze_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r1234ze_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r1234ze_expressions_tcx.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r1234ze_expressions_visc.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r1234ze_parameters.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r125.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r125.py
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r125_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r125_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r125_parameters.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r134a.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r134a.py
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r134a_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r134a_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r134a_expressions_tcx.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r134a_expressions_visc.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r134a_parameters.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r227ea.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r227ea.py
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r227ea_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r227ea_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r227ea_parameters.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r32.json
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r32.py
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r32_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r32_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   212B Jun  6  2023 ._r32_parameters.json
-rw-r--r--   1 mollydougher  staff   8.2K Jun  6  2023 co2.json
-rw-r--r--   1 mollydougher  staff   3.7K Jun  6  2023 co2.py
-rw-r--r--   1 mollydougher  staff    20K Jun  6  2023 co2_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   616B Jun  6  2023 co2_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   1.3K Jun  6  2023 co2_expressions_tcx.nl
-rw-r--r--   1 mollydougher  staff   1.1K Jun  6  2023 co2_expressions_visc.nl
-rw-r--r--   1 mollydougher  staff   1.2K Jun  6  2023 co2_parameters.json
-rw-r--r--   1 mollydougher  staff   9.9K Jun  6  2023 h2o.json
-rw-r--r--   1 mollydougher  staff   6.9K Jun  6  2023 h2o.py
-rw-r--r--   1 mollydougher  staff    27K Jun  6  2023 h2o_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   689B Jun  6  2023 h2o_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   3.4K Jun  6  2023 h2o_expressions_tcx.nl
-rw-r--r--   1 mollydougher  staff   1.3K Jun  6  2023 h2o_expressions_visc.nl
-rw-r--r--   1 mollydougher  staff   1.2K Jun  6  2023 h2o_parameters.json
-rw-r--r--   1 mollydougher  staff    32K Jun  6  2023 helmholtz_parameters.py
-rw-r--r--   1 mollydougher  staff   5.6K Jun  6  2023 r1234ze.json
-rw-r--r--   1 mollydougher  staff   4.0K Jun  6  2023 r1234ze.py
-rw-r--r--   1 mollydougher  staff    10K Jun  6  2023 r1234ze_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   686B Jun  6  2023 r1234ze_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   894B Jun  6  2023 r1234ze_expressions_tcx.nl
-rw-r--r--   1 mollydougher  staff   1.7K Jun  6  2023 r1234ze_expressions_visc.nl
-rw-r--r--   1 mollydougher  staff   1.2K Jun  6  2023 r1234ze_parameters.json
-rw-r--r--   1 mollydougher  staff   4.5K Jun  6  2023 r125.json
-rw-r--r--   1 mollydougher  staff   167B Jun  6  2023 r125.py
-rw-r--r--   1 mollydougher  staff   9.2K Jun  6  2023 r125_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   615B Jun  6  2023 r125_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   1.0K Jun  6  2023 r125_parameters.json
-rw-r--r--   1 mollydougher  staff   5.2K Jun  6  2023 r134a.json
-rw-r--r--   1 mollydougher  staff   6.0K Jun  6  2023 r134a.py
-rw-r--r--   1 mollydougher  staff   7.3K Jun  6  2023 r134a_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   614B Jun  6  2023 r134a_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   3.7K Jun  6  2023 r134a_expressions_tcx.nl
-rw-r--r--   1 mollydougher  staff   2.0K Jun  6  2023 r134a_expressions_visc.nl
-rw-r--r--   1 mollydougher  staff   1.2K Jun  6  2023 r134a_parameters.json
-rw-r--r--   1 mollydougher  staff   5.3K Jun  6  2023 r227ea.json
-rw-r--r--   1 mollydougher  staff   169B Jun  6  2023 r227ea.py
-rw-r--r--   1 mollydougher  staff    12K Jun  6  2023 r227ea_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   754B Jun  6  2023 r227ea_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   1.0K Jun  6  2023 r227ea_parameters.json
-rw-r--r--   1 mollydougher  staff   4.9K Jun  6  2023 r32.json
-rw-r--r--   1 mollydougher  staff   166B Jun  6  2023 r32.py
-rw-r--r--   1 mollydougher  staff   8.2K Jun  6  2023 r32_expressions_eos.nl
-rw-r--r--   1 mollydougher  staff   615B Jun  6  2023 r32_expressions_st.nl
-rw-r--r--   1 mollydougher  staff   997B Jun  6  2023 r32_parameters.json

/Users/mollydougher/.idaes//testing:
total 0
drwxr-xr-x  2 mollydougher  staff    64B Jul  6  2023 .
drwxr-xr-x  4 mollydougher  staff   128B Jul  6  2023 ..
mollydougher commented 1 month ago

One more piece of information (from @adowling2):

(prommis-dev) mollydougher@mollys-mbp ~ % whereis ipopt
ipopt: /Users/mollydougher/.idaes/bin/ipopt
Robbybp commented 1 month ago
---------------------------------------------------
IDAES Extensions Build Versions
===================================================
Solvers:  v3.4.0 20230607-0059 darwin-x86_64
Library:  v3.4.0 20230607-0125 darwin-x86_64
===================================================

This indicates that you're pulling down the x86-64 binaries, which is odd. Can you run uname -om and share the result?

mollydougher commented 1 month ago

Darwin arm64

Robbybp commented 1 month ago

How about the following Python script:

from pyomo.common.downloader import FileDownloader
import platform
print(FileDownloader.get_sysinfo())
print(platform.machine())
mollydougher commented 1 month ago

I can't run this script, I get: ModuleNotFoundError: No module named 'pyomo.common.downloader'

Robbybp commented 1 month ago

Typo. Should be:

from pyomo.common.download import FileDownloader
import platform
print(FileDownloader.get_sysinfo())
print(platform.machine())
mollydougher commented 1 month ago
('darwin', 64)
x86_64
adowling2 commented 1 month ago

Any chance @mollydougher accidentally installed x86 version of Python (running in emulation mode) on her M1 Mac?

Robbybp commented 1 month ago

That would be my best guess. Although I would have expected/hoped that Python (from conda, I assume?) would not just silently run in emulation mode...

@mollydougher Can you confirm where you downloaded/installed Python from? Out of curiosity, any reason you're not using your system's built-in Python? (assuming you're not)

mollydougher commented 1 month ago

I am pretty sure I am using my system's built-in Python. I do not remember downloading it from anywhere. I installed anaconda, though I am not sure if that would be related to this issue.

Robbybp commented 1 month ago

What does which python output? (Or which python3, if that's what you use)

mollydougher commented 1 month ago

/Users/mollydougher/opt/anaconda3/envs/prommis-dev/bin/python

Robbybp commented 1 month ago

Because this is a conda environment, this might be Python from conda. I would guess that this is the case, as I don't think your built-in Python would have the wrong architecture (could be wrong!). Can you run conda info?

mollydougher commented 1 month ago
     active environment : prommis-dev
    active env location : /Users/mollydougher/opt/anaconda3/envs/prommis-dev
            shell level : 2
       user config file : /Users/mollydougher/.condarc
 populated config files : /Users/mollydougher/.condarc
          conda version : 22.11.1
    conda-build version : 3.22.0
         python version : 3.9.13.final.0
       virtual packages : __archspec=1=x86_64
                          __osx=10.16=0
                          __unix=0=0
       base environment : /Users/mollydougher/opt/anaconda3  (writable)
      conda av data dir : /Users/mollydougher/opt/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/mollydougher/opt/anaconda3/pkgs
                          /Users/mollydougher/.conda/pkgs
       envs directories : /Users/mollydougher/opt/anaconda3/envs
                          /Users/mollydougher/.conda/envs
               platform : osx-64
             user-agent : conda/22.11.1 requests/2.28.1 CPython/3.9.13 Darwin/23.6.0 OSX/10.16
                UID:GID : 501:20
             netrc file : None
           offline mode : False
Robbybp commented 1 month ago

As far as I can tell, this is an x86-64 version of Conda. I would recommend you create a new virtual environment from your system python:

  1. Deactivate all conda environments
  2. Run which python3 to make sure you're not using Python from conda. The output should be something like /usr/bin/python3 (or /opt/homebrew/bin/python3 if you have brew-installed Python)
  3. Create a new environment with e.g. python3 -m venv new-prommis-env. Activate with source new-prommis-env/bin/activate
  4. Install IDAES with pip install idaes-pse
  5. Run idaes get-extensions. This should download the correct version of the binaries.
  6. Install the rest of the packages you need and re-try your program that uses Ipopt.

You could also just re-install an ARM version of conda, but that might override your current installation.

mollydougher commented 1 month ago

Thank you @Robbybp for your help. This allows me to run a simple python script and solve a pyomo model with ma27. However I am now having trouble running my prommis scripts (I think this is a question for @lbianchi-lbl). When I try running pip install -r requirements-dev.txt while my working directory is prommis/prommis I get the following output:

ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode: /Users/mollydougher/GitHub/prommis/prommis
(A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.)
Robbybp commented 1 month ago

Glad that worked. I'll close this issue as I think the original problem has been resolved. If you continue having trouble installing dependencies, open an issue in the prommis repository.