wiki:Matlab-SlurmOnCypress

MATLAB client on Cypress

With this method, you can submit MATLAB jobs from MATLAB running on an interactive session. See how to run MATLAB interactively here.

https://docs.google.com/drawings/d/e/2PACX-1vQOfTErIgP29J7ZXKSIj3JbaxJeWm5xHjOXoDUQbN_qfpD95CycAvPGgXbkGw8rQ74XiXMENLr8YKD4/pub

Configuration

Login to Cypress and start an interactive session and then start MATLAB (see here) Configure MATLAB to run parallel jobs on your cluster by calling configCluster, which only needs to be called once per version of MATLAB. Please be aware that running configCluster more than once per version will reset your cluster profile back to default settings and erase any saved modifications to the profile.

>> configCluster

Jobs will now default to the cluster rather than submit to the current node.

When you encounter an error Unrecognized function or variable 'configCluster'. , try

>> rehash toolboxcache

INTERACTIVE JOBS - MATLAB client on Cypress

Note this is for MATLAB client on Cypress.

To run an interactive pool job on the cluster, continue to use parpool as you’ve done before.

>> % Get a handle to the cluster
>> c = parcluster;
>> % Open a pool of 4 workers on the cluster (works up to 12?)
>> p = c.parpool(4);

Rather than running local on the local machine, the pool can now run across multiple nodes on the cluster.

>> % Run a parfor over 1000 iterations
>> parfor idx = 1:1000
      a(idx) = idx
   end

Once we’re done with the pool, delete it.

>> % Delete the pool
>> p.delete

* If you get a pop-up window 'Use identity file to login to cypress.tulane.edu', press 'NO' *

Last modified 22 months ago Last modified on 01/24/23 15:25:43
Note: See TracWiki for help on using the wiki.