Help on Remote MATLAB
Important Notes:
The version of MATLAB on your local machine and the cluster should match.
Create a separate directory <version>-remote (e.g. R2015b) under matlab directory at your home as well as for JobStorage Location in your local machine.
The General Configuration/Profile might be different and can have mismatch in the fields, use the correct one - Generic<..version>.
Menus and location can be different for different versions of MATLAB
Follow the Guide "Configure Using the Generic Scheduler Interface" - https://www.mathworks.com/matlabcentral/fileexchange/52807-parallel-computing-toolbox-plugin-for-matlab-parallel-server-with-slurm
Older Stuffs:
General Procedure:
Copy the specific version of Generic Configuration/Profile file (e.g. SLURMGenericProfileR2015b.settings) from HPC login node at /usr/local/doc/MATLAB.
In your PC (with administrative previlage), go to <MATLABROOT> -> toolbox -> distcomp -> examples -> integration -> slurm-> nonshared and copy all the files to <MATLABROOT> -> toolbox -> local . Instead you can also set the Matlab path to the nonshared location so it can find the submit functions for the remote jobs.
addpath('$MATLAB/toolbox/distcomp/examples/integration/slurm/nonshared');
Run MATLAB in your PC.
Check whether the functions are accessible by using this MATLAB command
which independentSubmitFcn.m
Select Parallel -> Manage Cluster Profiles
Select import -> choose the Generic Profile file ->Open
Replace the existing CaseIDs with your caseID, and job location directories and Save. The directories need to be already created.
Set this Generic Profile as the default.
The cluster might not recognize your local IP address so you need to specifically point to your local hostname by typing:
pctconfig('hostname','<hostname>.cwru.edu');
also see more explanation below.
Click on Validate and all the validation stages should pass. You would be prompted for CaseID and Case Password (enter CaseID, and click on no for identify file), unless you use an authentication passkey file.
As a test run the central_theorem.m script. For better allocation of resources for your job, please modify the submit functions (as mentioned in Generic Profile) scripts at Customization Sections.
Specific Procedure - if the validation does not go through:
For the validation to go through, you may need to follow the instruction below:
[It might be unnecessary] In your PC, compare the content of the file "getSubmitString.m" at <MATLABROOT> -> toolbox -> local (that you copied) with the same file at /usr/local/doc/MATLAB. You may need to replace this one with the one at /usr/local/doc/MATLAB.
To ensure that your local hostname is always recognized by Matlab at each start, create a MATLAB startup script "startup.m" with the following content at the MATLAB path (e.g. C:\Program Files\MATLAB\R20xxb\toolbox\local) in your local machine.
pctconfig('hostname','<hostname>.cwru.edu');
Where the local machine's <hostname> can be obtained through running the "who" command after logging into HPC (e.g. hpc1) via your local machine. From the HPC login node:
who | grep <caseId>
output (example):
<caseId> pts/49 2013-01-02 16:20 (case-its.its.cwru.edu)
(So, for the example, the local machine's host name is case-its.its.cwru.edu)
Re-open the MATLAB and test the connection by using the MATLAB command:
pctconfig
References:
http://www.cac.cornell.edu/wiki/index.php?title=Running_MDCS_Jobs_on_the_ATLAS_cluster