jcaiuwyo / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

"Sundials was not found" by scons on Ubuntu 11.10 64bit #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. get svn 2.0.0b1 (r1413)
2. scons build include_sundials=y
3. INFO: Sundials was not found. Building with minimal ODE solver capabilities.

What is the expected output?
Building with Sundials...

What do you see instead?
INFO: Sundials was not found.

What version of the product are you using? On what operating system?
latest svn (r1413) from cantera/trunk -> 2.0.0b1

Please provide any additional information below.

When using version 1.8 from svn with the old make system it finds the sundials 
files fine. I have also tried to point to the directories (/usr/include or 
/usr/locale/include), but still the same result...

Original issue reported on code.google.com by Termope...@gmail.com on 16 Apr 2012 at 11:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
if I set the check for CV_BDF and CV_NEWTON to "not":

env['HAS_SUNDIALS'] = not conf.CheckLibWithHeader('sundials_cvodes', 
'cvodes/cvodes.h', 'C++', 'CVodeCreate(CV_BDF, CV_NEWTON);', False)

it shows that it actually works fine?!?

Checking for CVodeCreate(CV_BDF, CV_NEWTON) in C++ library sundials_cvodes... no
Checking for double x; log(x) in C library None... no
1 2.4.0
INFO: Using Sundials version 2.4.0
INFO: Building the full Python package using numpy.
llibs =  ['cantera', 'sundials_cvodes', 'sundials_ida', 'sundials_nvecserial', 
'ctmath', 'execstream', 'blas', 'lapack', 'ctf2c', 'sundials_cvodes', 
'sundials_ida', 'sundials_nvecserial', 'blas', 'lapack']
scons: done reading SConscript files.

(I have input a print of the output from the TryRun)

Original comment by Termope...@gmail.com on 16 Apr 2012 at 2:53

GoogleCodeExporter commented 9 years ago
The command line option you're looking for is "use_sundials=y", not 
"include_sundials=y" as you state. If that doesn't help, can you provide the 
following additional information (after trying to build with the unmodified 
SConstruct file):

(1) the contents of the 'cantera.conf' file
(2) the contents of the 'config.log' file
(3) the path to "cvodes.h"
(4) the path to "libsundials_cvodes.a"
(5) the include search path for your compiler (the list at the end of the 
output from 'cpp -v')
(6) the library search path, by running 'ld --verbose | grep SEARCH_DIR'

Original comment by yarmond on 16 Apr 2012 at 6:24

GoogleCodeExporter commented 9 years ago
1) cantera.conf attached

2) config.log attached

3) /usr/include/cvodes/cvodes.h

4) libsundials_cvodes.a doesn't exist

5)
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include

6)
SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); 
SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu"); 
SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib/x86_64-linux-gnu"); 
SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu"); 
SEARCH_DIR("=/usr/lib64"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); 
SEARCH_DIR("=/usr/lib");

Original comment by Termope...@gmail.com on 16 Apr 2012 at 6:45

Attachments:

GoogleCodeExporter commented 9 years ago
maybe related to 4)

https://bugs.launchpad.net/ubuntu/+source/sundials/+bug/871739

Original comment by Termope...@gmail.com on 16 Apr 2012 at 6:48

GoogleCodeExporter commented 9 years ago
Just updated libsundials-serial and libsundials-serial-dev to 2.4.0-5 and now 

>locate libsundials_cvodes.a
/usr/lib/libsundials_cvodes.a

but still not able to find sundials header files?!?

Original comment by Termope...@gmail.com on 16 Apr 2012 at 7:04

GoogleCodeExporter commented 9 years ago
The issue here is that the Ubuntu Sundials needs to be linked against BLAS and 
LAPACK (as indicated by "libsundials_cvodes.so: undefined reference to 
`dgbtrf_'" etc. in the config.log).

In r1417, I've updated the configuration step for detecting Sundials so that 
the BLAS and LAPACK libraries are specified in the link command. I was able to 
build with the Ubuntu sundials-serial-dev version 2.4.0-3 packages after these 
changes.

Original comment by yarmond on 16 Apr 2012 at 9:07

GoogleCodeExporter commented 9 years ago
Indeed now it works. I was just expecting a speed up of my transient reactor 
calculations.

with r1417 and use_sundials=n                         ~17sec
with r1417 and use_sundials=y (ubuntu sundials 2.4.0) ~25sec

Thanks for fixing this bug!

Original comment by Termope...@gmail.com on 17 Apr 2012 at 9:33

GoogleCodeExporter commented 9 years ago

Original comment by yarmond on 17 Apr 2012 at 1:25