sundialsTB, a Matlab Interface to SUNDIALS

Modules

Installation

matlab install_STB - installation script

Requirements



Corresponding release of SUNDIALS
Optionally, MPITB with LAM 7.1.1 (for MPI-2 features)

Compilation and installation of sundialsTB



As of version 2.3.0, sundialsTB is distributed only with the complete SUNDIALS package. Compilation of sundialsTB is done by running from under Matlab the install_STB.m script which is located in the sundialsTB top directory.
  1. Launch matlab in sundialsTB:
    % cd 'srcdir'/sundialsTB
    % matlab
  2. Run the install_STB matlab script. Note that parallel support will be compiled into the MEX files only if $LAMHOME is defined and $MPITB_ROOT is defined and 'srcdir'/src/nvec_par exists.
    After the MEX files are generated, you will be asked if you wish to install the sundialsTB toolbox. If you answer yes, you will be then asked for the installation directory (called in the sequel 'instdir'). To install sundialsTB for all Matlab users (not usual), assuming Matlab is installed under /usr/local/matlab7, specify 'instdir' = /usr/local/matlab7/toolbox. To install sundialsTB for just one user (usual configuration), install sundialsTB under a directory of your choice (typically under your 'matlab' working directory). In other words, specify 'instdir' = /home/user/matlab.

Configuring Matlab's startup



After a successful installation, a sundialsTB.m startup script is generated in 'instdir'/sundialsTB. This file must be called by Matlab at initialization.
If sundialsTB was installed for all Matlab users (not usual), add the sundialsTB startup to the system-wide startup file (by linking or copying):
% cd /usr/local/matlab7/toolbox/local
% ln -s ../sundialsTB/startup_STB.m

and add these lines to your original local startup.m
% SUNDIALS Toolbox startup M-file, if it exists.
if exist('startup_STB','file')
startup_STB
end

If sundialsTB was installed for just one user (usual configuration) and assuming you do not need to keep any previously existing startup.m, link or copy the startup_STB.m script to your working 'matlab' directory:
% cd ~/matlab
% ln -s sundialsTB/startup_STB.m startup.m

If you already have a startup.m, use the method described above, first linking (or copying) startup_STB.m to the destination subdir and then editing ~/matlab/startup.m to run startup_STB.m

Testing the installation



If everything went fine, you should now be able to try one of the CVODES, IDAS, or KINSOL examples (in matlab, type 'help cvodes', 'help idas', or 'help kinsol' to see a list of all examples available). For example, cd to the CVODES serial example directory:
% cd 'instdir'/sundialsTB/cvode/examples_ser
and then launch matlab and execute mcvsRoberts_dns.

Links

For further information, contact
Radu Serban radu@llnl.gov