Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:matlab:farber [2019-08-29 14:40] – [Matlab on Farber] anita | software:matlab:farber [2021-04-27 16:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
For use on Farber, MATLAB projects should be developed using a Desktop installation of MATLAB and then copied to Farber | For use on Farber, MATLAB projects should be developed using a Desktop installation of MATLAB and then copied to Farber | ||
- | to be run in batch. | + | to be run in batch. |
Details on how to run these two scripts in batch are given with the resulting output files. | Details on how to run these two scripts in batch are given with the resulting output files. | ||
Line 12: | Line 12: | ||
second example shows an interactive session, which starts multiple MATLAB pool of workers to execute the function as a parallel toolbox loop, **'' | second example shows an interactive session, which starts multiple MATLAB pool of workers to execute the function as a parallel toolbox loop, **'' | ||
- | You can run [[#desktop |MATLAB as a desktop (GUI)]] application on Farber. | + | You can run [[#desktop |MATLAB as a desktop (GUI)]] application on Farber, but is not recommended as the graphics is slow to display especially with a slower network connection. |
Many MATLAB research projects fall in the the "high throughput computing" | Many MATLAB research projects fall in the the "high throughput computing" | ||
Line 165: | Line 165: | ||
end | end | ||
</ | </ | ||
- | See [[maxNumCompThreads|Setting maximum number of computational threads]]</ | + | See [[maxNumCompThreadsGridEngine|Setting maximum number of computational threads]]</ |
<note tip> | <note tip> | ||
Line 206: | Line 206: | ||
===== Create a job script file ===== | ===== Create a job script file ===== | ||
- | You should create a job script file to submit a batch job. Start by modifying a job template file (''/ | + | You should create a job script file to submit a batch job. Start by modifying a job template file (''/ |
In your copy change the commented '' | In your copy change the commented '' | ||
require MATLAB, and then add your shell commands to the end of the file. Your copy may contain the lines: | require MATLAB, and then add your shell commands to the end of the file. Your copy may contain the lines: | ||
Line 318: | Line 318: | ||
===== Compiling your MATLAB ===== | ===== Compiling your MATLAB ===== | ||
- | There is an example MCR project in the ''/ | + | There is an example MCR project in the ''/ |
==== Copy dev-projects template ==== | ==== Copy dev-projects template ==== | ||
Line 324: | Line 324: | ||
On the head node | On the head node | ||
< | < | ||
- | cp -r / | + | cp -r /opt/shared/ |
cd MCR | cd MCR | ||
</ | </ | ||
Line 376: | Line 376: | ||
< | < | ||
- | cp / | + | cp /opt/shared/ |
vi matlab-mcr.qs | vi matlab-mcr.qs | ||
- | diff / | + | diff /opt/shared/ |
</ | </ | ||
The '' | The '' | ||
Line 522: | Line 522: | ||
</ | </ | ||
- | ==== Grid Engine script | + | ====== Batch job serial example ====== |
Second, write a shell script file to set the Matlab environment and start Matlab running your script file. The following script file will set the Matlab environment and run the command in the [[# | Second, write a shell script file to set the Matlab environment and start Matlab running your script file. The following script file will set the Matlab environment and run the command in the [[# | ||
Line 547: | Line 547: | ||
If everyone in your group carefully set these values, multiply jobs can run concurrently on the node. | If everyone in your group carefully set these values, multiply jobs can run concurrently on the node. | ||
- | See [[maxNumCompThreads|Setting maximum number of computational threads]] | + | See [[maxNumCompThreadsGridEngine|Setting maximum number of computational threads]] |
</ | </ | ||
Line 585: | Line 585: | ||
</ | </ | ||
- | <note warning> | + | <note warning> |
In this example you will only need a license for the base Matlab, and the parallel toolbox needs one license. | In this example you will only need a license for the base Matlab, and the parallel toolbox needs one license. | ||
Line 747: | Line 747: | ||
- | ===== Batch parallel example ===== | + | ====== Batch parallel example |
The Matlab parallel toolbox uses JVM to manage the workers and communicate while you are running. | The Matlab parallel toolbox uses JVM to manage the workers and communicate while you are running. | ||
Line 815: | Line 815: | ||
- | ===== Interactive example ===== | + | ====== Interactive example |
The basic steps to running a [[: | The basic steps to running a [[: | ||
Line 953: | Line 953: | ||
- | ===== MCR array job example ===== | + | ====== MCR array job example |
Most Matlab functions can be compiled using the Matlab Compiler (MCC) and then deployed to run on the compute nodes in the MATLAB Compiler Runtime (MCR). | Most Matlab functions can be compiled using the Matlab Compiler (MCC) and then deployed to run on the compute nodes in the MATLAB Compiler Runtime (MCR). | ||
Line 1034: | Line 1034: | ||
The '' | The '' | ||
- | / | + | /opt/shared/ |
or modify this simple example: | or modify this simple example: | ||
< | < |