Changes between Version 8 and Version 9 of Matlab-Slurm


Ignore:
Timestamp:
01/24/23 15:25:58 (22 months ago)
Author:
fuji
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Matlab-Slurm

    v8 v9  
    55There are two ways to do this, one is [https://wiki.hpc.tulane.edu/trac/wiki/Matlab-SlurmOnCypress 'submitting MATLAB jobs from MATLAB running on Cypress'], another is [https://wiki.hpc.tulane.edu/trac/wiki/Matlab-Slurm#MATLABclientonyourlocalcomputer 'submitting MATLAB jobs from your laptop/desktop'].
    66
    7 == MATLAB client on Cypress ==
    8 With this method, you can submit MATLAB jobs from MATLAB running on an interactive session. See how to run MATLAB interactively [https://wiki.hpc.tulane.edu/trac/wiki/cypress/Matlab#RunningMATLABinteractively here].
    9 
    10 [[Image(https://docs.google.com/drawings/d/e/2PACX-1vQOfTErIgP29J7ZXKSIj3JbaxJeWm5xHjOXoDUQbN_qfpD95CycAvPGgXbkGw8rQ74XiXMENLr8YKD4/pub?w=755&h=200)]]
    11 
    12 === Configuration ===
    13 Login to Cypress and start an interactive session and then start MATLAB (see [https://wiki.hpc.tulane.edu/trac/wiki/cypress/Matlab#RunningMATLABinteractively here])
    14 Configure MATLAB to run parallel jobs on your cluster by calling '''configCluster''', which only needs to be called once per version of MATLAB. 
    15 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. 
    16 
    17 {{{
    18 >> configCluster
    19 }}}
    20 
    21 Jobs will now default to the cluster rather than submit to the current node.
    22 
    23 When you encounter an error ''Unrecognized function or variable 'configCluster'. '', try
    24 
    25 {{{
    26 >> rehash toolboxcache
    27 }}}
    28 
    297
    308== MATLAB client on your local computer ==
     
    3412
    3513=== Prerequisites ===
    36 * You need to have MATLAB installed on your laptop/desktop which must be the same version of MATLAB on Cypress (r2020a or later).
     14* You need to have MATLAB installed on your laptop/desktop which must be the same version of MATLAB on Cypress.
     15* Currently R2020a and R2022b are available on Cypress.
    3716* You must have the Matlab '''Parallel Computing Toolbox''' installed.  To see what toolboxes are installed, type the '''ver''' command in the Matlab command window.  You should see '''Parallel Computing Toolbox''' listed.
    3817* Make sure you have an account on Cypress and can ''ssh'' to Cypress from your local laptop/desktop.
     
    5231
    5332
    54 > ***If your local Matlab version is newer than 2020a, you need to modify 'configCluster.m' file.***
    55 >
    56 > {{{
    57 > % The version of MATLAB being supported
    58 > release = ['R' version('-release')];
    59 > release = 'R2020a' # force to r2020a
    60 > }}}
    6133
    6234==== Run the configCluster.m Script to Create a Cluster Profile ====
     
    7850}}}
    7951
     52If you are using R2022b or later, you must set '''QueueName''' to '''centos7'''.
     53{{{
     54>> % Set partition to centos7
     55>> c.AdditionalProperties.QueueName='centos7';
     56}}}
     57
    8058=== Optional ===
    8159{{{
     
    10179{{{
    10280>> % Specify Quality of Service
    103 >> c.AdditionalProperties.QoS = 'qos-value';
     81>> c.AdditionalProperties.QoS = 'long';
    10482}}}
    10583The default is ''normal''. See [https://wiki.hpc.tulane.edu/trac/wiki/cypress/about#SLURMresourcemanager here] for other options.
     
    137115>> c.saveProfile
    138116}}}
    139 
    140 
    141 == INTERACTIVE JOBS - MATLAB client on Cypress ==
    142  Note this is for '''MATLAB client on Cypress'''.
    143 
    144 To run an interactive pool job on the cluster, continue to use parpool as you’ve done before.
    145 {{{
    146 >> % Get a handle to the cluster
    147 >> c = parcluster;
    148 }}}
    149 {{{
    150 >> % Open a pool of 4 workers on the cluster (works up to 12?)
    151 >> p = c.parpool(4);
    152 }}}
    153 Rather than running local on the local machine, the pool can now run across multiple nodes on the cluster.
    154 {{{
    155 >> % Run a parfor over 1000 iterations
    156 >> parfor idx = 1:1000
    157       a(idx) = idx
    158    end
    159 }}}
    160 Once we’re done with the pool, delete it.
    161 {{{
    162 >> % Delete the pool
    163 >> p.delete
    164 }}}
    165  
    166 *** If you get a pop-up window 'Use identity file to login to cypress.tulane.edu', press 'NO' ***
    167117
    168118