Adding MATLAB toolbox to existing Cantera installation

420 views
Skip to first unread message

Joel Lawson

unread,
Nov 21, 2017, 3:24:11 PM11/21/17
to Cantera Users' Group
I have Cantera installed on Debian 9 under both Python 2 and 3. I have subsequently installed Matlab on this machine and I'd like to get Cantera working on it too. What is the simplest way to add this functionality without having to completely re-install the Python packages?

Thanks,
Joel

Bryan W. Weber

unread,
Nov 25, 2017, 8:55:27 PM11/25/17
to Cantera Users' Group
Hi Joel,

How did you install the Python interfaces? What is the problem with reinstalling the Python packages? What version of Cantera do you have installed?

Best,
Bryan

Joel Lawson

unread,
Nov 27, 2017, 3:10:17 PM11/27/17
to Cantera Users' Group
Hi Bryan,

Thanks for the response. I did it using Aptitude, according to the instructions at http://www.cantera.org/docs/sphinx/html/install.html#ubuntu. It is the latest stable version, 2.3.x I think.

There is no fundamental problem in uninstalling Cantera if need be, although at the page linked above I don't see any instructions on how to get the Matlab toolbox working with Linux anyway. Are there some optional flags at installation to fetch the Matlab files, as written for the Mac OS instructions?

Regards,
Joel

Bryan W. Weber

unread,
Nov 27, 2017, 8:52:31 PM11/27/17
to Cantera Users' Group
Joel,

You'll have to compile and install from source. This shouldn't require reinstalling the Python interfaces.

You'll want to follow these instructions (http://cantera.org/docs/sphinx/html/compiling/index.html), probably downloading the latest stable release (http://cantera.org/docs/sphinx/html/compiling/source-code.html#stable-release). Once you have the source and the prerequisites (http://cantera.org/docs/sphinx/html/compiling/installation-reqs.html#linux), cd to the root of the source directory and type

scons build python_package=none python3_package=n f90_interface=n matlab_path=/path/to/matlab/RXXy

Once the build completes, type

sudo scons install

to install to the default /usr/local directories. If you want to install into a non-root location, you can add the prefix option to the build line (e.g., prefix=/home/user/directory after the matlab_path) and then you won't need sudo.

Hope it helps,
Bryan

Ray Speth

unread,
Nov 30, 2017, 11:22:19 PM11/30/17
to Cantera Users' Group
Joel,

The essential point I think is that there is no way for us to provide packaged versions of the Matlab toolbox on most platforms. Compiling the Matlab toolbox requires having Matlab installed, and the automated build systems that we use to produce the Ubuntu and Anaconda packages generally don't have that kind of commercial software installed. The same applies for Homebrew, except that Homebrew has the ability to compile packages locally when there aren't prepackaged versions available.

Regards,
Ray
Reply all
Reply to author
Forward
0 new messages