-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Incompatibility with sundial 6.6.2 #1645
Incompatibility with sundial 6.6.2 #1645
Comments
Hi! Thanks for reporting this. Can you provide the exact command you used to install Cantera? Thanks! |
Thanks for your reply. I installed it in a conda environmnent, with mamba install cantera |
The environment was roughly created with mamba create -n my_env python=3.10 numpy scipy <other irrelevant stuff> |
What channels do you have configured for mamba? Specifically, did you install from the |
To give us a bit more detail about the specific package versions installed and where they came from, can you provide the output of |
I'm having the same issue, also on Ubuntu-20.04.
Adding Below the output from Complete list of packages
|
Hello @bryanwweber. |
I managed to reproduce the bug in a minimal environment: mamba create -n cantera python=3.10 cantera -c conda-forge In a python console: >>> import cantera
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/config/mambaforge/envs/cantera/lib/python3.10/site-packages/cantera/__init__.py", line 4, in <module>
from ._cantera import *
ImportError: libsundials_sunlinsollapackdense.so.4.6.1: cannot open shared object file: No such file or directory Detail of the environment: conda list
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
bzip2 1.0.8 hd590300_5 conda-forge
c-ares 1.21.0 hd590300_0 conda-forge
ca-certificates 2023.7.22 hbcca054_0 conda-forge
cantera 3.0.0 py310h4c3f389_2 conda-forge
fmt 10.1.1 h00ab1b0_0 conda-forge
gmp 6.3.0 h59595ed_0 conda-forge
hdf5 1.14.2 nompi_h4f84152_100 conda-forge
icu 73.2 h59595ed_0 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
krb5 1.21.2 h659d440_0 conda-forge
ld_impl_linux-64 2.40 h41732ed_0 conda-forge
libaec 1.1.2 h59595ed_1 conda-forge
libblas 3.9.0 19_linux64_openblas conda-forge
libcantera 3.0.0 h2f7dcaf_2 conda-forge
libcblas 3.9.0 19_linux64_openblas conda-forge
libcurl 8.4.0 hca28451_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 13.2.0 h807b86a_3 conda-forge
libgfortran-ng 13.2.0 h69a702a_3 conda-forge
libgfortran5 13.2.0 ha4646dd_3 conda-forge
libgomp 13.2.0 h807b86a_3 conda-forge
libhwloc 2.9.3 default_h554bfaf_1009 conda-forge
libiconv 1.17 h166bdaf_0 conda-forge
liblapack 3.9.0 19_linux64_openblas conda-forge
libnghttp2 1.58.0 h47da74e_0 conda-forge
libnsl 2.0.1 hd590300_0 conda-forge
libopenblas 0.3.24 pthreads_h413a1c8_0 conda-forge
libsqlite 3.44.0 h2797004_0 conda-forge
libssh2 1.11.0 h0841786_0 conda-forge
libstdcxx-ng 13.2.0 h7e041cc_3 conda-forge
libuuid 2.38.1 h0b41bf4_0 conda-forge
libxml2 2.11.5 h232c23b_1 conda-forge
libzlib 1.2.13 hd590300_5 conda-forge
metis 5.1.0 h59595ed_1007 conda-forge
mpfr 4.2.1 h9458935_0 conda-forge
ncurses 6.4 h59595ed_2 conda-forge
numpy 1.26.0 py310hb13e2d6_0 conda-forge
openssl 3.1.4 hd590300_0 conda-forge
pip 23.3.1 pyhd8ed1ab_0 conda-forge
python 3.10.13 hd12c33a_0_cpython conda-forge
python_abi 3.10 4_cp310 conda-forge
readline 8.2 h8228510_1 conda-forge
ruamel_yaml 0.15.80 py310h2372a71_1009 conda-forge
setuptools 68.2.2 pyhd8ed1ab_0 conda-forge
suitesparse 5.10.1 h9e50725_1 conda-forge
sundials 6.6.2 h777d08e_0 conda-forge
tbb 2021.10.0 h00ab1b0_2 conda-forge
tk 8.6.13 noxft_h4845f30_101 conda-forge
tzdata 2023c h71feb2d_0 conda-forge
wheel 0.41.3 pyhd8ed1ab_0 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
yaml-cpp 0.8.0 h59595ed_0 conda-forge
zstd 1.5.5 hfc55251_0 conda-forge |
I can reproduce on macOS. |
On my Mac (I assume similar on Linux), I have these files:
So it does appear to be a linking error and/or that a different version of SUNDIALS is installed compared to what we linked against. I think the fix is to pin the Cantera package to
|
Same on Linux, indeed: lrwxrwxrwx 1 abc abc 41 Nov 13 09:24 libsundials_sunlinsollapackdense.so -> libsundials_sunlinsollapackdense.so.4.6.2
-rwxrwxr-x 2 abc abc 98032 Nov 7 13:20 libsundials_sunlinsollapackdense.so.4.6.2 |
I think this is a problem with either the SUNDIALS conda-forge recipe (https://github.com/conda-forge/sundials-feedstock) or SUNDIALS itself. All we specify directly in the Cantera recipe (https://github.com/conda-forge/cantera-feedstock/blob/main/recipe/meta.yaml) is a build requirement of SUNDIALS 6.6, and then link to build:
number: 1
run_exports:
- {{ pin_subpackage('sundials', max_pin='x.x') }} Which corresponds to an expectation that any version of 6.6.* is binary compatible. However, it appears that SUNDIALS specifies a SONAME down to the patch level (4.6.2) for this library and has incremented it between SUNDIALS 6.6.0 and 6.6.2. I think typically, one would aim for binary compatibility for at least the the minor version (6.6.x) if not the major version (6.x.y). If SUNDIALS 6.6.2 is not binary compatible with 6.6.0, then this is correct, and the conda-forge package pinning is too loose. Otherwise, it would be helpful for the SUNDIALS to specify the SONAME to be as broadly compatible as possible. One thing I did notice is that the SONAME for the CVODES library does just specify the major version. I'm not sure why the linear algebra sublibrary has such strict compatibility specified by contrast. |
I think this may be addressed by LLNL/sundials#343, which will hopefully be included in Sundials 6.6.3 (assuming that happens and they don't go to 6.7.0). After that, we can specify 6.6.3 as the minimum build requirement, rebuild and get packages that work for 6.6.x where x >= 3. I'm not sure if there's something else we should do in the meantime. I guess we could rebuild and specify |
Thanks for looking into this @speth. I agree that the resolution is to pin to 6.6.2 and rebuild, then pin again for the next version. |
I confirmed that the resulting packages work both on my M1 Mac and an amd64 Linux server. One thing to note is that if you already have the older build of the |
Problem description
It seems the version of a few
sundials
libs are hard-coded incantera
3.0.0:After investigation, it appears my version of
sundials
(version 6.6.2, installed as a dependency ofcantera
) contains version 4.6.2 of linear algebra libs (libsundials_sunlinsollapackdense.so
,libsundials_sunlinsolband.so
, etc.).Work around
Downgrading to
sundials=6.6.1
miraculously installs said libs at version 4.6.1, and everything works.It could be a
sundials
packaging error, but I am reporting the issue here, as it might impact othercantera
users.System information
The text was updated successfully, but these errors were encountered: