Improving Processor Usage In InterpolateSolution from the PDE Toolbox Via Parallel Computing?

1 回表示 (過去 30 日間)
ADSW121365
ADSW121365 2020 年 11 月 30 日
編集済み: ADSW121365 2020 年 12 月 10 日
I have a set of ~50 saved results structures from the PDE Toolbox, at roughly 7GB each, on which I need to interpolate to different coordinates. Keeping the code simple, this looks something like:
for index = 1:50
filename=([f1(index),f2,'.mat']);
presaved_results = load(filename,'results');
A = interpolateSolution(presaved_results.results,X,Y,Z,[1,2,3]);
A = reshape(A,size(X,1),size(X,2),3);
end
The aim is to integrate this into an optimisation proceedure using MATLAB's GA, meaning this interpolation step is called many times.
This function seems to just use just 1/4 cores available on my processer, sitting at roughly 30% cpu usage for around 60 seconds per file, so I wondered if it's possible to use the Parallel Computing Toolbox, or anything similar to use more of my processor to speed this up? If not, I assume hardware improvements maybe my only option?
Happy to look into undocumentated solutions, this is currently the biggest bottleneck in my code by some significant margin, it's only a factor of 2 slower to solve the whole FEM model from scatch vs just interpolating to the points of interest because the actual solver utilises my CPU(s) better.

回答 (0 件)

カテゴリ

Help Center および File ExchangeEigenvalue Problems についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by