multi-level parallelism in Matlab (2013a)?
이전 댓글 표시
Hello,
I am trying to solve a problem of efficient calculation of optical spectra (of some structures). The calculation process itself is represented by tens or hundred independent calculations (according to number of points in the optical spectra, number of wavelengths). The spectral interval is just a vector.
Until now I used parfor loop. I took the interval, split it to several subintervals (according to number of workers in matlabpool) and send it to workers by parfor loop. So, the subintervals were calculated in parallel. Finally I just glued partial results together. I choose "divide et impera" approach to reduce communication between nodes at cluster. If all subintervals have the same length and all nodes are free, the computation time of each subinterval problem is the same(almost).
But now, my problem increases in one dimension. I would like to compute several spectral problem in parallel. For exaple: 4 problems, each for the spectra with 1000points. What I would like to implement is code, which starts with 4 parallels workers (each for one problem). Than each worker solve its partial problem in parallel (lets say on 8 cpus). So finally I will use 1(initial master) + 4(submasters) + 4*8 = 37cpus (strange number, but it is just example).
So, my question is: Is it possible to implement such a parallelism in Matlab? Which construction should I use. Till now I have been working with parfor loops, but there is no way how to put one parfor inside another.
Thanks, Lukas Halagacka
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!