This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
matlab_on_cluster [2016/06/03 09:28] – [Managing parallel configurations] lenocil | matlab_on_cluster [2021/06/24 07:19] (current) – [Matlab on multi-processor machines] lenocil | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Matlab on multi-processor machines ====== | ====== Matlab on multi-processor machines ====== | ||
- | The aim of this short guide is to get you started with using matlab in a multi-processor environment. The goal is to instruct matlab to use a `pool' of '' | ||
- | :!: Before trying | + | The aim of this short guide is to get you started with using matlab in a multi-processor |
- | :!: matlab versions prior to 2007 do not have the features discussed here. | + | |matlab is available on all Lorentz Institute and Sterrewacht cluster machines.| |
+ | |Before trying to parallelize any codes, please make sure your code works as expected on one processor.| | ||
+ | |matlab versions prior to 2007 do not have the features discussed here.| | ||
===== Parallel Computing Toolbox aka matlabpool ===== | ===== Parallel Computing Toolbox aka matlabpool ===== | ||
Line 10: | Line 11: | ||
matlabpool can be used to parallelize your m script across multiple cores in a single machine. | matlabpool can be used to parallelize your m script across multiple cores in a single machine. | ||
- | Open matlab and initialize the parallel environment | + | Open matlab |
< | < | ||
Line 27: | Line 28: | ||
| | ||
| | ||
- | DataLocation : /home/lenocil/ | + | DataLocation : /home/xxxxx/ |
| | ||
Line 57: | Line 58: | ||
In matlab2010 the max number of workers is set to 8 where as that limit ip brought to 12 in matlab R2011b. | In matlab2010 the max number of workers is set to 8 where as that limit ip brought to 12 in matlab R2011b. | ||
- | If you wanted to use 64 workers (for instance on one of the maris nodes), you will need a 64-node MDCS licence | + | If you wanted to use 64 workers (for instance on one of the maris nodes), you will need a 64-node MDCS licence ((Leiden University has an unlimited access license for everybody, see https:// |
- | (you can buy it through our procurement office) and you will also need to create a `scheduler' | + | and you will also need to create a `scheduler' |
To modify the local configuration | To modify the local configuration | ||
Line 66: | Line 67: | ||
jm.ClusterSize=6 | jm.ClusterSize=6 | ||
jm.DataLocation="/ | jm.DataLocation="/ | ||
+ | </ | ||
+ | |||
+ | To check what configurations are available and which one is loaded use | ||
+ | < | ||
+ | [conf, allConf] = defaultParallelConfig | ||
+ | conf = | ||
+ | |||
+ | test | ||
+ | |||
+ | |||
+ | allConf = | ||
+ | |||
+ | ' | ||
+ | |||
</ | </ | ||
===== Gotchas ===== | ===== Gotchas ===== |