The purpose of this HOWTO is to enable a user who has parallel compatible code (e.g. parfor loops, spmd loops, and the like) to submit cluster jobs through the MATLAB client from the login node of one of our clusters.
- Parallelize your code according to Mathworks' documentation (links at the bottom of this page). An example script is provided later in the HOWTO.
- Establish password-less ssh access between nodes
- Create a shared data location for MATLAB jobs. We use ~/MdcsDataLocation but this also could be a directory in $SHARED_SCRATCH. If you choose to change this, you will need to edit the parallel cluster configuration as described later.
Load the Matlab environment module
You can run MATLAB graphically if you have an OS or client that can handle tunneled X Window connections, but that is beyond the scope of this document. All commands should work in the command window as well as on the command line interface.
Import a Cluster Configuration
This step only has to be performed once. Once imported, the profile will persist through multiple MATLAB runs. For each cluster the profile includes cluster settings for all available queues. The following commands, run on DAVinCI, will import the profiles and set Commons as the default:
Specifying job time (wall time) is required before submitting a job via matlab and validating a cluster parallel profile. Here are two examples, please be as accurate as possible to minimize your wait time.
Optimal use of the Cluster Configuration
For performance and file quota reasons, please have your workspace in $SHARED_SCRATCH/your-userid/. In order to do this, you must first create a workspace directory and then modify your cluster configuration to use the new workspace configuration. To change the location for your default profile you can run something like the following in MATLAB: