software:matlab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
software:matlab [2014/10/23 12:06]
henkela [Compiling a m-file on a node]
— (current)
Line 1: Line 1:
-====== Mathworks MATLAB  ======  
-{{ http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Matlab_Logo.png/267px-Matlab_Logo.png?100&nocache}} 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 http://en.wikipedia.org/wiki/MATLAB, more details there)  
- 
-[[http://www.mathworks.de/products/matlab/]]\\ 
- 
- 
- 
-^  Matlab  ^^ 
-|**Version:**|R2013a| 
-|**Lizenz:**|[[http://www.uni-mainz.de|University of Mainz]]| 
-|**Developer**:|Mathworks| 
- 
-====== Usage ====== 
-module add software/matlab/R2013a 
- 
-See the vendor documentation: 
-[[http://www.mathworks.de/de/help/index.html]] 
- 
-====== Examples ====== 
-===== Submitting a Matlab job ===== 
- 
-<file bash testmat.lsf> 
-#!/bin/bash 
- 
-# 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 YourEmail@partners.org 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 
-</file> 
- 
-===== Compiling a m-file on a node ===== 
- 
-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 [[:local_scratch|using local scratch on a node]].  
- 
-<file bash compileFile.sh> 
-#!/bin/bash 
- 
-# Store working directory to be safe 
-SAVEDPWD=`pwd` 
-FILENAME=$1 
- 
-# We define a bash function to do the cleaning when the signal is caught 
-cleanup(){ 
-    cp /jobdir/${LSB_JOBID}/*$FILENAME.sh ${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 
-cleanup 
-</file> 
  
  • software/matlab.1414058769.txt.gz
  • Last modified: 2014/10/23 12:06
  • by henkela