CS 595 - Advanced Scientific Computing

Fall 2010

The Boss is: OUT


Site Map

Contact Information

  • Hong Zhang : hzhang@mcs.anl.gov
    • Office : SB 235C
    • Office Hours : R 3:00-5:30
  • Michael McCourt : mccomic@mcs.anl.gov (or mccomic@iit.edu)
    • Office : E1 105d
    • Office Hours : MW 10:00-1:00, TR 2:00-5:00

Matlab in PETSc

Many of you are more familiar working in Matlab than working with a real computational language in the UNIX OS. This is understandable because Matlab is self-contained and provides some really awesome software which is adequate for most basic omputational problems.

However, if you are in this class, then you have a problem beyond the standard abilities of Matlab. This is why you are being trained in MPI and PETSc. Even though this requires you to learn makefiles and libraries and C/C++ or Fortran, that doesn't mean that there are not uses for Matlab.

There are two different ways Matlab can be used in cooperation with PETSc: Let's go over how to configure PETSc with Matlab accessible. First obviously, you'd need a machine that has Matlab installed, and frankly I don't know how to do this with Cygwin which is bad since most of you have Matlab installed in Windows.

Assuming that you have Matlab installed on your UNIX machine below are the steps you need to take. I'm doing this on the laplace.math.iit.edu, so you may need to change the locations to whatever your machine has.
  1. Make sure that your Matlab installation works. The easiest way would be
    matlab -nodisplay
    although you can omit the -nodisplay option if you are using X Forwarding. When you open Matlab you should see something to the effect of:

    and that means that you're good to go. In addition to knowing that Matlab works, you also need to know where Matlab is installed on your machine. Most sys admins will install all packages in the same space to make your life easy, but you may have to ask yours where Matlab is installed. On laplace.math.iit.edu the directory is /apps/matlab_2010a, and the odds are good your directory name is probably similar.

    Once you know what the directory is, there's some other stuff you have to do that I'll write about later. There is an error with libeng.so on the system that is preventing me from finishing successful tests. I'll fill in the rest soon.