This is an old revision of the document!

Mathworks MATLAB

MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, and Fortran. (taken from, more details there)

Lizenz:University of Mainz


module add software/matlab/R2013a

See the vendor documentation:


# enable your environment, which will use .bashrc configuration in your home directory 
#BSUB -L /bin/bash 
# the name of your job showing on the queue system 
#SUB -J mytest
# the following BSUB line specify the queue that you will use, 
#BSUB -q short
# the system output and error message output, %J will show as your jobID 
#BSUB -o %J.out BSUB -e %J.err 
# the CPU number that you will collect
#BSUB -n 4
# when job finish that you will get 
# email notification BSUB -u BSUB -N 
#enter your working directory
cd /home/$USER/TestMatlab
# Finally, Start the program
/cluster/Lic_Apps/Matlab/R2013a/bin/matlab -nodisplay -r main_matlabfile

Using the following shell script you can compile a m-file into a stand-alone c application. It's a variation of the script for using local scratch on a node.
# Store working directory to be safe
# We define a bash function to do the cleaning when the signal is caught
    cp /jobdir/${LSB_JOBID}/*$ ${SAVEDPWD}/
    cp /jobdir/${LSB_JOBID}/$FILENAME ${SAVEDPWD}/
    exit 0
# Register the cleanup function when SIGUSR2 is sent, ten minutes before the job gets killed
trap 'cleanup' SIGUSR2
# Copy input file
cp ${SAVEDPWD}/$FILENAME.m /jobdir/${LSB_JOBID}/
# Go to jobdir and start the program
cd /jobdir/${LSB_JOBID}
mcc -m $FILENAME.m
# Call the cleanup function when everything went fine
  • software/matlab.1414058769.txt.gz
  • Last modified: 2014/10/23 12:06
  • by henkela