Matlab

From IBERS Bioinformatics and HPC Wiki
Revision as of 11:22, 13 August 2015 by Mjv08 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Matlab

Currently we have a license to run matlab on one node. If there is a high demand for this facility then we will look into aquiring more licenses.

The license runs on node001, which is the large memory node, accessible via the large.q in SGE, but you also need to specify the hostname too because this is the only node that will run it and there are two nodes in the large queue.

NOTE: This license only allows one user at a time to use the license on this node.

In order to demonstrate this running, here is a simple two line hello world program written in matlab in a *.m file called hello.m. It is quite important to have the quit command when running matlab as a *.m file. Without it the program halts at the matlab commandline.

 [user@bert ~]$ cat hello.m 
 fprintf ( 1, '  Hello, IBERS!\n' );
 quit

So, with this matlab program in mind, we have the following SGE script.

#specify the shell type
#$ -S /bin/sh
#run in the current working directory
#$ -cwd
#specifcy node001 in the large queue
#$ -q large.q
#$ -l hostname=node001
#specify some memory
#$ -l h_vmem=4G
#load the module
module load matlab/r2013a_node001
#run the program (NOTE the absence of the .m)
matlab -r hello