Index of /examples/matlab/GettingStarted

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[DIR]Archived/ 2021-04-16 09:23 -  
[   ]simpleFunc.m 2020-09-02 14:21 43  
[   ]greedy.m 2020-09-02 14:26 246  
[   ]simple.m 2021-06-11 11:26 272  
[TXT]greedy.qsub 2021-04-16 09:22 281  
[   ]OOM.m 2021-04-16 09:24 288  
[TXT]simple.qsub 2021-08-25 15:30 447  

RCS sample MATLAB code

This directory contains a simple program (simple.m) and sample scripts to submit MATLAB jobs on the SCC. It also contains a couple of illustrative example scripts that demonstrate other SCC-specific issues.

Interactive execution:

Select the version of MATLAB:
scc1% module avail matlab
scc1% module load matlab/version

Start a MATLAB interactive session:
Start an OnDemand MATLAB Desktop session, for additional info refer to the SCC OnDemand Help page. In the OnDemand menu bar select Interactive Apps, then MATLAB. In MATLAB: Program Editor window open simple.m program: File -: Open. To execute the program, select Run command in the menu and add the folder to the path if prompted. The output will be printed to the MATLAB console.

Interactive command line execution:

Start a MATLAB command line interactive session.
scc1% matlab -nodesktop -nodisplay
Type in the following commands at the MATLAB prompt:
>> disp("Hello, World!");

To exit MATLAB, type exit into the console:
>> exit

Submit MATLAB job:

This directory contains a simple.qsub script that, when submitted to the batch system, will execute the simple.m script. To submit the job, type the following command at the SCC prompt:
% qsub simple.qsub
Be sure to change the project listed after the -P option in the simple.qsub file to a project that you belong to and wish to run the script under.
The simple.qsub script also has an alternate method for submitting a MATLAB job that is called via a function, like in the MATLAB script simpleFunc.qsub script.

Helpful Links:

RCS: MATLAB Basics
Running Jobs on the SCC