Ember Issues with installation and running

156 views
Skip to first unread message

Surya Kaundinya Oruganti

unread,
Dec 14, 2021, 11:10:55 AM12/14/21
to Cantera Users' Group
Dear all, 

I tried to install Ember along with latest versions of Cantera and Sundials. 
These are the configuration options I used for installing each of these softwares: 
1. Sundials:
cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX=/usr/local/sundials -DEXAMPLES_INSTALL_PATH=../example -DBUILD_CVODE=ON -DBUILD_CVODES=ON -DOPENMP_ENABLE=ON ../../sundials/

2.  Cantera : 
scons build sundials_include=/usr/local/sundials/include sundials_libdir=/usr/local/sundials/lib

3. Ember: 
scons build cantera=/usr/local/include/cantera sundials=/usr/local/sundials/ eigen=/usr/include/eigen3 boost=/usr/include/boost tbb=/usr/include/tbb

I do not have any errors with installation of all the three softwares. 
But when I try to run an example case with Ember, I get the following error: 

Traceback (most recent call last):
  File "example_diffusion.py", line 7, in <module>
    from ember import *
  File "/home/surya/.local/lib/python3.6/site-packages/ember/__init__.py", line 4, in <module>
    from ._ember import *
ImportError: libsundials_nvecserial.so.5: cannot open shared object file: No such file or directory

Though ember says that  libsundials_nvecserial.so.5 does not exist, the file is present in /usr/local/sundials/lib/ folder. I think it is somekind of problem of linking these files when ember is compiled. Can someone please help me fix this problem. 

Thank you very much for your help in advance. 

With regards,
Surya.

Mark E. Fuller

unread,
Dec 14, 2021, 1:57:31 PM12/14/21
to Cantera Users' Group
I don't believe this is a build-time problem, but a runtime problem.

You pointed scons to sundials in order to build ember and that seemingly ran without error.
When running Python and importing Ember the required library isn't in the expected locations.
The solution, I expect, is to either put sundials in an expected location or add the location of sundials to the places that are checked when importing ember.

One of the simplest solutions is to symlink sundials from its current location to a "normal" location (e.g. /usr/lib64 on Fedora/CentOS/Red Hat);
Another is to install sundials from the system package manager (if available for your OS / distribution: https://pkgs.org/search/?q=sundials).

Ray Speth

unread,
Dec 14, 2021, 8:16:34 PM12/14/21
to Cantera Users' Group

Hi Surya,

Besides the option Mark suggested, the standard method for letting a program know where its libraries are at runtime, if they are not in standard system locations, is to set the LD_LIBRARY_PATH environment variable. For example, you would run

LD_LIBRARY_PATH=/usr/local/sundials python example_diffusion.py

If you want to install Sundials into a directory that should be on the default library search path, I’d suggest using /usr/local as the PREFIX when building Sundials (which is likely the default anyway). Then, you probably won’t even need to specify paths for it when building either Cantera or Ember.

Regards,
Ray

Surya Kaundinya Oruganti

unread,
Dec 16, 2021, 9:36:24 AM12/16/21
to Cantera Users' Group
Hi Mark & Ray, 

Thanks for the prompt response. 

I tried to install sundials in default location i.e. /usr/local/ and then re-installed cantera and ember. Now all the three softwares are in /usr/local/.

Again there were no installation errors or warnings. 

However this time I get the following error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/cantera/__init__.py", line 4, in <module>
    from ._cantera import *
ImportError: /usr/local/lib/python3.6/dist-packages/cantera/_cantera.cpython-36m-x86_64-linux-gnu.so: undefined symbol: CVSpilsSetLinearSolver

I have been trying different things for past 2-3 weeks and I have getting these kind of errors. Either the Ember or Cantera libraries cannot the Sundials libraries when running a example case. 

With regards,
Surya.

Ray Speth

unread,
Dec 16, 2021, 9:47:03 AM12/16/21
to Cantera Users' Group
Hi Surya,

Can you tell us the exact versions of Sundials/Cantera/Ember that you're trying to install? Are they the latest releases, or the development versions? I think your best bet would be Cantera 2.5.1 plus the latest Ember version from the `main`  branch. The last "release" version of Ember is unfortunately a bit out of date at present.

If that doesn't work, or is what you're already doing, can you provide the full log of the "scons build" command for Ember, after first running "scons build --clean"?

Regards,
Ray

Surya Kaundinya Oruganti

unread,
Dec 16, 2021, 11:51:23 AM12/16/21
to Cantera Users' Group
Hi Ray, 

Once again thanks for prompt reply.
Ember version is from main branch. 
Cantera (2.5.1) and Sundials (2.5.8) are the latest versions. 
Please find attached the build log below.

With regards,
Surya.
build.log

Bryan Weber

unread,
Dec 16, 2021, 4:18:17 PM12/16/21
to Cantera Users' Group
Hi Surya,

Well, one thing I see is that your build.log says it found SUNDIALS 5.7.0 but you said you're using SUNDIALS 2.5.8 (which doesn't exist, did you mean 5.8.2?). Are you sure you're using the same version of SUNDIALS for both Cantera and Ember? 

Best,
Bryan

Ray Speth

unread,
Dec 16, 2021, 6:21:59 PM12/16/21
to Cantera Users' Group

Hi Surya,

The settings you have for cantera and sundials in your ember.conf file don’t make sense. These should be set to the directories that contain the corresponding lib and include directories, which in this case would just be /usr/local. However, /usr/local is almost certainly part of the default search path for your compiler, so you can just delete these settings from ember.conf.

I missed from your earlier message that you are now getting an error arising from just trying to import cantera. In this case, can you provide the output of running scons build for Cantera, after first running scons clean?

Regards,
Ray

Surya Kaundinya Oruganti

unread,
Dec 17, 2021, 10:49:09 AM12/17/21
to Cantera Users' Group
Hi Bryan and Ray, 

Sorry for the confusion. I have been trying to different version of Sundials over the last 1-2 weeks and I got confused with the version numbers.

Today I removed all the versions of Ember/Cantera/Sundials that I have on my system along with all the installation files. 

Now I downloaded Sundials 2.5.7 version and installed it. You can find my build and installation log files attached to this post. The Sundials installation files are located at /usr/local/include/sundials
and the libraries are in /usr/local/lib/cmake/sundials. These are the default locations where they are getting installed on my system.

Next I downloaded Cantera 2.5.1 (main version from git). And installed it using scons. Again you will find the build log  for Cantera attached to this post. The installation files of Cantera are located in 
./local/include/cantera. Again this is the default location where it gets installed on my system.

Now I tried to check if everything is good with Cantera and Sundials by just trying to "import cantera" in python. And I get the following error: 

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/cantera/__init__.py", line 4, in <module>
    from ._cantera import *
ImportError: /usr/local/lib/python3.6/dist-packages/cantera/_cantera.cpython-36m-x86_64-linux-gnu.so: undefined symbol: CVSpilsSetLinearSolver



With regards,
Surya.
cantera_build.log
sundials_make.log
sundials_install.log

Ray Speth

unread,
Dec 17, 2021, 2:54:50 PM12/17/21
to Cantera Users' Group

Hi Surya,

Thanks for the additional details. I believe from the logs that you’re installing Sundials version 5.7.0, which is the latest version that Cantera has been tested with, so that’s a good choice. I don’t think there is a version 2.5.7.

I am confused by the error importing the Cantera Python module, though. The symbol that it’s complaining about should be defined in the “sundials_cvodes” library, which is being specified on the linker command line when the Python module is being built. The only thing I can think of is that you actually have another (older?) copy of Sundials installed somewhere, and that’s being picked up instead of Sundials 5.7. Can you provide the output of building Cantera with the command scons build debug_linker_flags=-Wl,--verbose? I’d also be interested in the output from the following commands (after running scons install):

Lastly, can you let us know what your operating system is, e.g. the Linux distribution and version number?

Regards,
Ray

Surya Kaundinya Oruganti

unread,
Dec 19, 2021, 8:34:57 AM12/19/21
to Cantera Users' Group
Hi Ray, 
Please find attached the outputs of the different commands you asked me to run. 
And my OS is Ubuntu 18.04.5 LTS. 
With regards,
Surya.
ldd.log
cantera_full_build.log
nm.log

Hasan Celik

unread,
Dec 19, 2021, 8:34:57 AM12/19/21
to Cantera Users' Group
Dear Surya,

Is usr/local/sundials/lib/ defined under your LD_LIBRARY_PATH?
If not, adding it to that path may fix your problem maybe?

For instance. running something like this:  LD_LIBRARY_PATH=/usr/local/sundials/lib/

Regards
Hasan

Ray Speth

unread,
Dec 19, 2021, 9:50:50 AM12/19/21
to Cantera Users' Group

Hi Surya,

It looks like you have an old (Sundials 2.x, perhaps) installation in the system library directories. You can either uninstall that old version or do as Hasan suggests and set LD_LIBRARY_PATH before running Python, e.g.

export LD_LIBRARY_PATH=/usr/local/lib
python ...

Regards,
Ray

Surya Kaundinya Oruganti

unread,
Dec 22, 2021, 6:17:23 AM12/22/21
to Cantera Users' Group
Hi Ray and Hasan,

Sorry for the late reply. 
You guys were right. There were double versions of many libraries (for eg. cantera/sundials/tbb) which is causing the issues with installation. 
I had to delete all the old versions and reinstall everything from scratch. 
And finally it is working well. I am able to run example cases in Ember.
Thanks a lot for the help. 

With regards,
Surya. 
Reply all
Reply to author
Forward
0 new messages