csu-hmc / opty

A library for using direct collocation in the optimization of dynamic systems.
http://opty.readthedocs.io
Other
86 stars 20 forks source link

Use the libmamba solver in CI and test Python 3.10. #103

Closed moorepants closed 10 months ago

moorepants commented 10 months ago

So the libmamba solver allows Python 3.6 and Python 3.7 builds to solve now, but they both segfault. Suprisingly libmamba finds a set of packages for Python 3.8-3.10 that don't segfault.

Here are the packages that are installed in the working Python 3.8 environment:

# packages in environment at /home/runner/miniconda/envs/test-env:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
alabaster                 0.7.13             pyhd8ed1ab_0    conda-forge
ampl-mp                   3.1.0             h2cc385e_1006    conda-forge
babel                     2.12.1             pyhd8ed1ab_1    conda-forge
brotli                    1.0.9                h166bdaf_9    conda-forge
brotli-bin                1.0.9                h166bdaf_9    conda-forge
brotli-python             1.0.9            py38hfa26641_9    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2023.7.22            hbcca054_0    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
contourpy                 1.1.0            py38h7f3f72f_0    conda-forge
coverage                  7.3.0            py38h01eb140_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cyipopt                   1.2.0            py38hafa0152_2    conda-forge
cython                    3.0.1            py38h17151c0_0    conda-forge
docutils                  0.20.1           py38h578d9bd_0    conda-forge
exceptiongroup            1.1.3              pyhd8ed1ab_0    conda-forge
fonttools                 4.42.1           py38h01eb140_0    conda-forge
freetype                  2.12.1               hca18f0e_1    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
gmpy2                     2.1.2            py38h793c122_1    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
imagesize                 1.4.1              pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
importlib-resources       6.0.1              pyhd8ed1ab_0    conda-forge
importlib_resources       6.0.1              pyhd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
ipopt                     3.14.12              he6d3896_1    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
kiwisolver                1.4.5            py38h7f3f72f_0    conda-forge
lcms2                     2.15                 haa2dc70_1    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libblas                   3.9.0           17_linux64_openblas    conda-forge
libbrotlicommon           1.0.9                h166bdaf_9    conda-forge
libbrotlidec              1.0.9                h166bdaf_9    conda-forge
libbrotlienc              1.0.9                h166bdaf_9    conda-forge
libcblas                  3.9.0           17_linux64_openblas    conda-forge
libdeflate                1.18                 h0b41bf4_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.1.0               he5830b7_0    conda-forge
libgfortran-ng            13.1.0               h69a702a_0    conda-forge
libgfortran5              13.1.0               h15d22d2_0    conda-forge
libgomp                   13.1.0               he5830b7_0    conda-forge
libhwloc                  2.9.1           nocuda_h7313eea_6    conda-forge
libiconv                  1.17                 h166bdaf_0    conda-forge
libjpeg-turbo             2.1.5.1              h0b41bf4_0    conda-forge
liblapack                 3.9.0           17_linux64_openblas    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libopenblas               0.3.23          pthreads_h80387f5_0    conda-forge
libpng                    1.6.39               h753d276_0    conda-forge
libspral                  2023.08.02           h2baf039_0    conda-forge
libsqlite                 3.43.0               h2797004_0    conda-forge
libstdcxx-ng              13.1.0               hfd8a6a1_0    conda-forge
libtiff                   4.5.1                h8b53f26_1    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libwebp-base              1.3.1                hd590300_0    conda-forge
libxcb                    1.15                 h0b41bf4_0    conda-forge
libxml2                   2.11.5               h232c23b_1    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
llvm-openmp               8.0.1                hc9558a2_0    conda-forge
markupsafe                2.1.3            py38h01eb140_0    conda-forge
matplotlib-base           3.7.2            py38hf5b0b65_0    conda-forge
metis                     5.1.0             h58526e2_1006    conda-forge
mpc                       1.3.1                hfe3b2da_0    conda-forge
mpfr                      4.2.0                hb012696_0    conda-forge
mpmath                    1.3.0              pyhd8ed1ab_0    conda-forge
mumps-include             5.2.1               ha770c72_11    conda-forge
mumps-seq                 5.2.1               h2104b81_11    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
ncurses                   6.4                  hcb278e6_0    conda-forge
numpy                     1.24.4           py38h59b608b_0    conda-forge
openjpeg                  2.5.0                hfec8fc6_2    conda-forge
openmp                    8.0.1                         0    conda-forge
openssl                   3.1.2                hd590300_0    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pillow                    10.0.0           py38h885162f_0    conda-forge
pip                       23.2.1             pyhd8ed1ab_0    conda-forge
platformdirs              3.10.0             pyhd8ed1ab_0    conda-forge
pluggy                    1.2.0              pyhd8ed1ab_0    conda-forge
pooch                     1.7.0              pyha770c72_3    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pygments                  2.16.1             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
pytest                    7.4.0              pyhd8ed1ab_0    conda-forge
pytest-cov                4.1.0              pyhd8ed1ab_0    conda-forge
python                    3.8.17          he550d4f_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.8                      3_cp38    conda-forge
pytz                      2023.3             pyhd8ed1ab_0    conda-forge
readline                  8.2                  h8228510_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
scipy                     1.10.1           py38h59b608b_3    conda-forge
scotch                    6.0.9                hb2e6521_2    conda-forge
setuptools                68.1.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sphinx                    7.1.2              pyhd8ed1ab_0    conda-forge
sphinxcontrib-applehelp   1.0.4              pyhd8ed1ab_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_2    conda-forge
sympy                     1.12            pypyh9d50eac_103    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
typing-extensions         4.7.1                hd8ed1ab_0    conda-forge
typing_extensions         4.7.1              pyha770c72_0    conda-forge
unicodedata2              15.0.0           py38h0a891b7_0    conda-forge
unixodbc                  2.3.12               h661eb56_0    conda-forge
urllib3                   2.0.4              pyhd8ed1ab_0    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zipp                      3.16.2             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zstd                      1.5.2                hfc55251_7    conda-forge

and here are the packages installed in the segfault 3.8 from #102 :

# packages in environment at /home/runner/miniconda/envs/test-env:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
alabaster                 0.7.13             pyhd8ed1ab_0    conda-forge
ampl-mp                   3.1.0             h2cc385e_1006    conda-forge
babel                     2.12.1             pyhd8ed1ab_1    conda-forge
brotli                    1.0.9                h166bdaf_9    conda-forge
brotli-bin                1.0.9                h166bdaf_9    conda-forge
brotli-python             1.0.9            py38hfa26641_9    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2023.7.22            hbcca054_0    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
contourpy                 1.1.0            py38h7f3f72f_0    conda-forge
coverage                  7.3.0            py38h01eb140_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cyipopt                   1.2.0            py38hafa0152_2    conda-forge
cython                    0.29.36          py38h17151c0_0    conda-forge
docutils                  0.18.1           py38h06a4308_3  
exceptiongroup            1.1.3              pyhd8ed1ab_0    conda-forge
fonttools                 4.42.1           py38h01eb140_0    conda-forge
freetype                  2.12.1               hca18f0e_1    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
gmpy2                     2.1.2            py38h793c122_1    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
imagesize                 1.4.1              pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
importlib-resources       6.0.1              pyhd8ed1ab_0    conda-forge
importlib_resources       6.0.1              pyhd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
ipopt                     3.14.12              hf9e1ecf_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
kiwisolver                1.4.5            py38h7f3f72f_0    conda-forge
lcms2                     2.15                 haa2dc70_1    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libblas                   3.9.0           17_linux64_openblas    conda-forge
libbrotlicommon           1.0.9                h166bdaf_9    conda-forge
libbrotlidec              1.0.9                h166bdaf_9    conda-forge
libbrotlienc              1.0.9                h166bdaf_9    conda-forge
libcblas                  3.9.0           17_linux64_openblas    conda-forge
libdeflate                1.18                 h0b41bf4_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.1.0               he5830b7_0    conda-forge
libgfortran-ng            13.1.0               h69a702a_0    conda-forge
libgfortran5              13.1.0               h15d22d2_0    conda-forge
libgomp                   13.1.0               he5830b7_0    conda-forge
libiconv                  1.17                 h166bdaf_0    conda-forge
libjpeg-turbo             2.1.5.1              h0b41bf4_0    conda-forge
liblapack                 3.9.0           17_linux64_openblas    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libopenblas               0.3.23          pthreads_h80387f5_0    conda-forge
libpng                    1.6.39               h753d276_0    conda-forge
libsqlite                 3.43.0               h2797004_0    conda-forge
libstdcxx-ng              13.1.0               hfd8a6a1_0    conda-forge
libtiff                   4.5.1                h8b53f26_1    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libwebp-base              1.3.1                hd590300_0    conda-forge
libxcb                    1.15                 h0b41bf4_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
llvm-openmp               8.0.1                hc9558a2_0    conda-forge
markupsafe                2.1.3            py38h01eb140_0    conda-forge
matplotlib-base           3.7.2            py38hf5b0b65_0    conda-forge
metis                     5.1.1                h59595ed_0    conda-forge
mpc                       1.3.1                hfe3b2da_0    conda-forge
mpfr                      4.2.0                hb012696_0    conda-forge
mpmath                    1.3.0              pyhd8ed1ab_0    conda-forge
mumps-include             5.2.1               ha770c72_11    conda-forge
mumps-seq                 5.2.1               h2104b81_11    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
ncurses                   6.4                  hcb278e6_0    conda-forge
numpy                     1.24.4           py38h59b608b_0    conda-forge
openjpeg                  2.5.0                hfec8fc6_2    conda-forge
openmp                    8.0.1                         0    conda-forge
openssl                   3.1.2                hd590300_0    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pillow                    10.0.0           py38h885162f_0    conda-forge
pip                       23.2.1             pyhd8ed1ab_0    conda-forge
platformdirs              3.10.0             pyhd8ed1ab_0    conda-forge
pluggy                    1.2.0              pyhd8ed1ab_0    conda-forge
pooch                     1.7.0              pyha770c72_3    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pygments                  2.16.1             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
pytest                    7.4.0              pyhd8ed1ab_0    conda-forge
pytest-cov                4.1.0              pyhd8ed1ab_0    conda-forge
python                    3.8.17          he550d4f_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.8                      3_cp38    conda-forge
pytz                      2023.3             pyhd8ed1ab_0    conda-forge
readline                  8.2                  h8228510_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
scipy                     1.10.1           py38h59b608b_3    conda-forge
scotch                    6.0.9                hb2e6521_2    conda-forge
setuptools                68.1.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sphinx                    7.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-applehelp   1.0.2              pyhd3eb1b0_0  
sphinxcontrib-devhelp     1.0.2              pyhd3eb1b0_0  
sphinxcontrib-htmlhelp    2.0.0              pyhd3eb1b0_0  
sphinxcontrib-jsmath      1.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-qthelp      1.0.3              pyhd3eb1b0_0  
sphinxcontrib-serializinghtml 1.1.5              pyhd3eb1b0_0  
sympy                     1.12            pypyh9d50eac_103    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
typing-extensions         4.7.1                hd8ed1ab_0    conda-forge
typing_extensions         4.7.1              pyha770c72_0    conda-forge
unicodedata2              15.0.0           py38h0a891b7_0    conda-forge
unixodbc                  2.3.12               h661eb56_0    conda-forge
urllib3                   2.0.4              pyhd8ed1ab_0    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zipp                      3.16.2             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zstd                      1.5.2                hfc55251_7    conda-forge
moorepants commented 10 months ago

Here is the difference in the two environments:

$ diff --color /tmp/working.txt /tmp/notworking.txt 
21,22c21,22
< cython                    3.0.1            py38h17151c0_0    conda-forge
< docutils                  0.20.1           py38h578d9bd_0    conda-forge
---
> cython                    0.29.36          py38h17151c0_0    conda-forge
> docutils                  0.18.1           py38h06a4308_3  
28d27
< icu                       73.2                 h59595ed_0    conda-forge
35c34
< ipopt                     3.14.12              he6d3896_1    conda-forge
---
> ipopt                     3.14.12              hf9e1ecf_0    conda-forge
53d51
< libhwloc                  2.9.1           nocuda_h7313eea_6    conda-forge
60d57
< libspral                  2023.08.02           h2baf039_0    conda-forge
67d63
< libxml2                   2.11.5               h232c23b_1    conda-forge
72c68
< metis                     5.1.0             h58526e2_1006    conda-forge
---
> metis                     5.1.1                h59595ed_0    conda-forge
107,110c103,106
< sphinx                    7.1.2              pyhd8ed1ab_0    conda-forge
< sphinxcontrib-applehelp   1.0.4              pyhd8ed1ab_0    conda-forge
< sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
< sphinxcontrib-htmlhelp    2.0.1              pyhd8ed1ab_0    conda-forge
---
> sphinx                    7.0.0              pyhd8ed1ab_0    conda-forge
> sphinxcontrib-applehelp   1.0.2              pyhd3eb1b0_0  
> sphinxcontrib-devhelp     1.0.2              pyhd3eb1b0_0  
> sphinxcontrib-htmlhelp    2.0.0              pyhd3eb1b0_0  
112,113c108,109
< sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
< sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_2    conda-forge
---
> sphinxcontrib-qthelp      1.0.3              pyhd3eb1b0_0  
> sphinxcontrib-serializinghtml 1.1.5              pyhd3eb1b0_0  
moorepants commented 10 months ago

Something changed in the conda-forge stack and with the libmamba solver it pulls in an ipopt that doesn't segfault.