Ticket #2366 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Implement ThreadPool and manager in Mantid

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: critical Milestone: Iteration 28
Component: Mantid Keywords:
Cc: Blocked By: #2518
Blocking: #2400, #2452 Tester: Owen Arnold

Description

... to perform more sophisticated parallelization operations by using a ThreadPool to optimize allocation of CPU time.

A simple OpenMP parallel for directive will be inefficient if the time in each operation is not approximately equal; a thread pool will allocate work more efficiently.

Poco has threadpool support and seems like the right library to use (it is already a dependency; boost::threadpool seems less documented and uses the dozens of template parameters that make boost so ugly.)

This will be necessary e.g. in MDEvent processing.

Change History

comment:1 Changed 10 years ago by Janik Zikovsky

  • Status changed from new to accepted

... boost looks like it has better support for scheduling (custom scheduling), so it may be better suited for this purpose.

comment:2 Changed 10 years ago by Janik Zikovsky

(In [9285]) Refs #2366: Stubs for a ThreadPool implementation.

comment:3 Changed 10 years ago by Janik Zikovsky

(In [9286]) Refs #2366: test output line confused build server. Adding a Task object.

comment:4 Changed 10 years ago by Janik Zikovsky

(In [9291]) Refs #2366: Added a FunctionTask object and removed lines to the not-yet-in-win64 boost thread library.

comment:5 Changed 10 years ago by Russell Taylor

(In [9305]) Remove boost thread search from CMake build for now. Re #2366.

comment:6 Changed 10 years ago by Janik Zikovsky

(In [9311]) Refs #2366: Added windows DLLExport clause; more tests in ThreadPool. Simplistic serial implementation for now.

comment:7 Changed 10 years ago by Janik Zikovsky

(In [9312]) Refs #2366: missing file.

comment:8 Changed 10 years ago by Janik Zikovsky

(In [9382]) Refs #2366: ThreadScheduler implementation.

comment:9 Changed 10 years ago by Janik Zikovsky

  • Blocking 2400 added

comment:10 Changed 10 years ago by Janik Zikovsky

  • Milestone changed from Iteration 27 to Iteration 28

comment:11 Changed 10 years ago by Janik Zikovsky

  • Blocking 2452 added

comment:12 Changed 10 years ago by Janik Zikovsky

  • Blocked By 2518 added

comment:13 Changed 10 years ago by Janik Zikovsky

(In [9621]) Refs #2366: Added a TaskTest.

comment:14 Changed 10 years ago by Janik Zikovsky

(In [9641]) Refs #2366: ThreadPool implementation with actual threads.

comment:15 Changed 10 years ago by Janik Zikovsky

(In [9643]) Refs #2366: Stress test on the thread scheduler

comment:16 Changed 10 years ago by Janik Zikovsky

(In [9645]) Refs #2366: Extra ThreadPool test with tasks that recursively creates more tasks.

comment:17 Changed 10 years ago by Janik Zikovsky

(In [9648]) Refs #2366: Forgot DLLExport on my classes.

comment:18 Changed 10 years ago by Janik Zikovsky

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:19 Changed 9 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:20 Changed 9 years ago by Owen Arnold

  • Status changed from verifying to closed

Series of Kernel unit tests look robust and run to completion. ThreadPools have also been successfully incorporated in MDEvent rebinning code.

comment:21 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3213

Note: See TracTickets for help on using tickets.