Potential bug in the multi-core processing by utilizing "parallel computing" toolbox

3 ビュー (過去 30 日間)
Woo-Jae Cheong
Woo-Jae Cheong 2018 年 7 月 27 日
編集済み: OCDER 2018 年 7 月 27 日
I am trying to speed up my simple data-extraction Matlab (R2011b) script that includes a simple loop structure. I managed to get it working with the loop structure that allows the 'multi-core' processing:
Loop starts
  • create a 'data' filename
  • open the 'data' file
  • open the 'output' file
  • extract the line with the selected phrase until the end of the 'data' file
  • close the 'data' file
  • close the 'output' file
Loop ends
However, the output files of the duo- and quad-cores processing resulted in random omissions of the extracted lines compared to those in the output file of the single-core processing.
No# Core/Total Lines Extracted/% Line Omission
1 Core/72000/0
2 Cores/71899/0.14
4 Cores/71222/1.08
Considering the facts that (1) the 1-core processing produced the anticipated results and (2) the Matlab script is simple and short, I believe that this is the software bug in the Matlab 'parallel computing toolbox'. I am wondering whether anyone else observed the similar issues or whether it has already been acknowledged as a software bug and has already been fixed with some sort of patch.
Thank you in advance.

採用された回答

OCDER
OCDER 2018 年 7 月 27 日
編集済み: OCDER 2018 年 7 月 27 日
That's called "Race Condition". Not a Matlab-specific bug, but a bug caused by improper multithreaded codes. Read more about this here:
If you show us the actual code, we may be able to pinpoint the issue.

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by