Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:matlab:mills [2019-08-29 14:53] – [Interactive example] anita | software:matlab:mills [2019-08-29 16:05] (current) – [Matlab script] anita | ||
---|---|---|---|
Line 4: | Line 4: | ||
On Mills, MATLAB projects should be developed using a Desktop installation of MATLAB and then copied to the cluster | On Mills, MATLAB projects should be developed using a Desktop installation of MATLAB and then copied to the cluster | ||
to be run in batch. | to be run in batch. | ||
- | consider an extended MATLAB example involving | + | consider an extended MATLAB example involving |
the first function in a loop, and to using the Parallel Toolbox. | the first function in a loop, and to using the Parallel Toolbox. | ||
Line 116: | Line 116: | ||
- | The page will using a Matlab function to illustrate using Matlab in batch and interactively. | + | The examples |
Line 137: | Line 137: | ||
quit | quit | ||
</ | </ | ||
+ | |||
+ | This is a detailed script example, which calls the maxEig function. | ||
+ | |||
+ | <note tip> | ||
+ | Several MATLAB commands could be added to the beginning of this script to set the maximum number of computational threads to the number of slots assigned to your job. If the scheduler using CGROUPS to limit your job core count, then these commands are not necessary. | ||
+ | < | ||
+ | [compThreads, | ||
+ | if count == 1 | ||
+ | warning(' | ||
+ | autoCompThreads = maxNumCompThreads(compThreads); | ||
+ | disp(sprintf(' | ||
+ | end | ||
+ | </ | ||
+ | See [[maxNumCompThreadsGridEngine|Setting maximum number of computational threads]]</ | ||
+ | |||
+ | <note tip> | ||
+ | This script ends in a **__quit__** command (equivalent to MATLAB **__exit__**). | ||
+ | terminates MATLAB when done. If you run this from the bash command line with the '' | ||
+ | |||
+ | Without the **__quit__** you will come back to the MATLAB prompt on completion for a interactive job. If this is the last line of a batch queue script, then the only difference will be the MATLAB prompt ''>>'' | ||
+ | </ | ||
==== Grid Engine script ==== | ==== Grid Engine script ==== |