Why is a multithreaded mex function slower when I used a parallel pool?

When I run a multithreaded mex function after having used a parallel pool, my function runs a lot slower (10-20x slowdown). Also, the more threads, the slower the function becomes.
Shutting down the pool does not help.
Rebooting Matlab restores the original speed (and scalability) of the mex Function.

4 件のコメント

Walter Roberson
Walter Roberson 2015 年 11 月 27 日
Have you closed the parallel pool by the time you are running the mex, or is it still open?
Bart Vermeulen
Bart Vermeulen 2016 年 1 月 15 日
Even after shutting down the parallel pool, the mex file runs much slower
Walter Roberson
Walter Roberson 2016 年 1 月 15 日
I have a vague memory that someone else might have reported something like this a few years ago, but I am not sure I could find the posting. This is something I would recommend creating a support case for.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeWrite C Functions Callable from MATLAB (MEX Files) についてさらに検索

質問済み:

2015 年 11 月 27 日

コメント済み:

2016 年 1 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by