Parallel execution of function with global time limit possible?

2 ビュー (過去 30 日間)
Daniel
Daniel 2014 年 4 月 10 日
編集済み: Daniel 2014 年 4 月 11 日
I want to run an algorithm I made multiple times over a weekend. Since I have access to a workstation I want to use parallel computing as each iteration is time consuming.
However calculation time can vary wildly, with the longest being more than 20 times longer than the shortest. How it varies is also not deterministic.
So I am wondering if there is a way to set a global time limit, so that I can start it on Friday around 5pm and it runs 63 hours until roughly 8am Monday morning?
Alternatively, does continue work in a parfor loop? I know break and return do not work.

採用された回答

Sean de Wolski
Sean de Wolski 2014 年 4 月 10 日
If you're running MATLAB Distributed Computing Server with the MATLAB Job Scheduler, you can set a timeout for jobs and tasks:
Otherwise, using a test against the clock and then otherwise continuing (continue does work in parfor) is probably a good approach.
  1 件のコメント
Daniel
Daniel 2014 年 4 月 11 日
編集済み: Daniel 2014 年 4 月 11 日
Once more I can say thanks a lot.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by