Thursday, December 10, 2009

Sundials CVODE

If you're like me, and solve differential equations numerically, it's great to use the cvode suite through sundials! So, let's look at CVODE-2.6

Sundials Home Page

But you may have trouble compiling the source code because the options on configure are long and tedious and there's not enough documentation on that step. Especially if you want to use the new links to Lapack which speed things up considerably.

Before you start, you need: a C compiler, a Fortran compiler, math library, lapack, and blas libraries. If you want the parallel libraries to work, you'll also need those libraries and a C++ compiler, but I don't want to get into that right now.

This was compiled on a linux machine, and the names of the specific compilers and libraries I used.

sudo ./configure CC=gcc F77=gfortran-4.4 CFLAGS="-g3 -O0" --with-lapack-libs="-L/usr/lib -llapack-3" --with-blas-libs="-L/usr/lib -lblas-3" --enable-examples

sudo make

sudo make install

And from here you should be set. Good luck.