Child pages
  • Hyak MATLAB programming
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

For interactive use of matlab:

ssh -X abc@hyak.washington.edu

qsub -I -V -l walltime=3:00:00

Below command shows you the available matlab versions on hyak:

module avail

Use below command to load matlab and start the GUI

module load matlab_2015b

matlab

After the above step, you can continue with your matlab commands at the matlab command line.

For PBS queue use of matlab:

Include below lines in your PBS script. (Do not use -nojvm option of matlab. The -nojvm option prevents usage of parpool for matlab parallel computing.) Here the file name of the matab script is myfunction.m.

module load matlab_2015b
matlab -nosplash -nodisplay -r myfunction

Matlab toolboxes on hyak:

Obtain an interactive node as shown above. Then type below commnds to get a matlab prompt.
module load matlab_2015b
matlab -nosplash -nodisplay
At the matlab prompt enter below command to find the list of toolboxes:

>>ver

We have a large number of toolboxes. Here are some popular toolboxes:

Image Processing Toolbox

Optimization Toolbox

Parallel Computing Toolbox

Signal Processing Toolbox

Statistics and Machine Learning Toolbox

Matlab parallel programming on hyak:

For interactive use:

At the matlab prompt enter below command to start the parallel pool

>> parpool

Now you can use parfor etc.

For scripting:

The file trypar.m contains below code:

parpool
parfor i=1:1000000
A(i)=i*i;
end
A
quit

You can run it in parallel using below command in a PBS script or at the prompt of an hyak interactive node:

module load matlab_2015b
matlab -nodisplay -nosplash -r trypar

  • No labels