Changes between Version 8 and Version 9 of Matlab-Slurm
- Timestamp:
- 01/24/23 15:25:58 (22 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Matlab-Slurm
v8 v9 5 5 There 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']. 6 6 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 >> configCluster19 }}}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'. '', try24 25 {{{26 >> rehash toolboxcache27 }}}28 29 7 30 8 == MATLAB client on your local computer == … … 34 12 35 13 === 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. 37 16 * 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. 38 17 * Make sure you have an account on Cypress and can ''ssh'' to Cypress from your local laptop/desktop. … … 52 31 53 32 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 supported58 > release = ['R' version('-release')];59 > release = 'R2020a' # force to r2020a60 > }}}61 33 62 34 ==== Run the configCluster.m Script to Create a Cluster Profile ==== … … 78 50 }}} 79 51 52 If 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 80 58 === Optional === 81 59 {{{ … … 101 79 {{{ 102 80 >> % Specify Quality of Service 103 >> c.AdditionalProperties.QoS = ' qos-value';81 >> c.AdditionalProperties.QoS = 'long'; 104 82 }}} 105 83 The default is ''normal''. See [https://wiki.hpc.tulane.edu/trac/wiki/cypress/about#SLURMresourcemanager here] for other options. … … 137 115 >> c.saveProfile 138 116 }}} 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 cluster147 >> 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 iterations156 >> parfor idx = 1:1000157 a(idx) = idx158 end159 }}}160 Once we’re done with the pool, delete it.161 {{{162 >> % Delete the pool163 >> p.delete164 }}}165 166 *** If you get a pop-up window 'Use identity file to login to cypress.tulane.edu', press 'NO' ***167 117 168 118