フィルターのクリア

Parallel computing with solving linear system of equations

9 ビュー (過去 30 日間)
Diab Abueidda
Diab Abueidda 2019 年 1 月 29 日
コメント済み: Diab Abueidda 2019 年 2 月 5 日
Hi MATLAB community,
I am interested in solving two very large linear systems of equations. I am using two iterative schemes, pcg and bicgstab. Is there a way to solve the two systems in a parallel fashion? I have 24 cores, and I would like to make use of them.
Thanks
Diab
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 1 月 29 日
spmd or parfeval() if you have Parallel Computing Toolbox.
But make sure to adjust maxNumCompThreads so that each of the workers can access more than one core.
Diab Abueidda
Diab Abueidda 2019 年 1 月 29 日
編集済み: Diab Abueidda 2019 年 1 月 29 日
Thanks Walter for the answer! yes, I have the parallel computing toolbox.
May you sketch the implementation? Let's say that I am interested in solving Ku=f.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2019 年 1 月 29 日
parpool(2)
spmd
maxNumCompThreads(12);
if labindex == 1
do first computation
else
do second computation
end
end
  19 件のコメント
Walter Roberson
Walter Roberson 2019 年 2 月 3 日
The fastest... sometimes that involves reducing own to fewer cores, as adding too many cores can be adding communications overhead without enough performance gain to balance. Start with a smaller array and do some timing to determine how performance changes with the number of cores.
Secondly, especially if you can get away with single precision calculations, then switching to GPU can sometimes give much much better performance. But I would not count on it for sparse arrays.
Diab Abueidda
Diab Abueidda 2019 年 2 月 5 日
Thanks, Walter

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel Computing Fundamentals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by