In some cases, it may be necessary for you to use the MATLAB Parallel Computing Toolbox to remotely connect to OSC resources, whether to run parallel jobs in MATLAB or to use toolboxes for which you own your own licenses. This guide will explain the basics for how to configure your MATLAB installation in order to connect remotely to Oakley using MATLAB 2013a.
Download the configuration files
The first step is to download the necessary configuration files. Click the link below to download the files. Be sure to save the files in a convenient location that you can easily remember.
Importing the Cluster Profile
When you open MATLAB, click the "Parallel" dropdown menu from the "Environment" menu and select "Manage Cluster Profiles". At this time, a new window should open displaying the Cluster Profile Manager.
In the Cluster Profile Manager window, click the "Import" button and locate the directory containing your configuration files using the file browser.
Select the file: "genericNonSharedOakleyIntel.settings" and click "Open".
Then, in the Cluster Profile Manager window, you will need to modify some of the properties of the Cluster Profile that you just imported. Select "generic NonSharedOakleyIntel" from the list of cluster profiles, and click the "Edit" button in the lower right-hand corner of this window to enable editing.
In the editing window under "Submit Functions", you should see two entries -- IndependentSubmitFcn and CommunicatingSubmitFcn. In these entries, you will need to change the directory path provided to a directory of your choice within your home directory on OSC systems. This will be the destination for log files and intermediate data created as a result of submitting a job using the Parallel Computing Toolbox. These locations are not intended to be the destination for your results. Once these have been changed, click "Done" and close the Cluster Profile Manager window.
Running your first batch job
In the directory of configuration files, the file called "testremote.m" is the entry point for job submission using the Parallel Computing Toolbox. In this file, you will need to modify the "batch" command in order to run your particular MATLAB program. How this command is modified depends largely on whether you want to run a serial or parallel job. At the very least, you will need to provide a function or script name to be executed. For more information about the "batch" command and its various forms and arguments, see the Mathworks documentation for "batch".
Obtaining your results
Your results will not automatically be offloaded from the cluster when your job completes. In order to obtain the results of your calculations, you will need to save the relevant variables from your workspace in a .mat file using the "save" command in MATLAB. For more information about the "save" command and its various forms and arguments, see the Mathworks documentation for "save".