adapting pattersearch algorithm to use with distributed computing server.
이전 댓글 표시
I use a pattern search algorithm in the simulink toolbox to estimate a set of parameters.
Let's say I have a matlab file that opens a matlabpool and calls pattern search algorithm:
- main.m {
%main calls pattern search
matlabpool open
options = psoptimset('UseParallel', 'always')
X0 = [0.5 0.5]; % Starting point
[x,fval] = patternsearch(@simple_objective(x),X0)
}
I send it to the hpc cluster using the pbs file as follows:
% PBS file
#PBS -l nodes=12
#PBS -l walltime=240:00:00
#PBS -j oe
#PBS -l pmem=5gb
#PBS -q starxf
cd ..
matlab -nosplash -nodisplay -r main.m
How can I change this file to use the distributed computing toolbox.
I guess I could not just change the last line to dmatlab ? i.e.
cd ....
dmatlab main.m
I understand how simple examples work when a parfor loop is transformed using createTask and then an *.m file is called with dmatlab. But I am new to parallel computing and cannot really wrap my mind about how to do it using the distributed matlab server.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Parallel Server에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!