Ticket #5040 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

EventWorkspace MRU might not be thread-safe when using thread pool

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: major Milestone: Release 2.1
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Peter Peterson

Description (last modified by Janik Zikovsky) (diff)

... because it uses the "THREAD_NUMBER" from openMP to isolate several MRUs.

Re-work the system to use only one MRU and make it thread-safe. There are already critical blocks that I think are equivalent to a mutex on the whole MRU.

This issue might be responsible for a thread-safety issue in ConvertToDiffractionMDWorkspaceTest.

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

  • Status changed from new to accepted
  • Description modified (diff)

comment:2 Changed 9 years ago by Janik Zikovsky

Refs #5040: Make MRUList thread-safe

Changeset: b1809cc4e43dafa7ec505cbe42ab10e9d4f7140a

comment:3 Changed 9 years ago by Janik Zikovsky

Refs #5040: Simplified EventWorkspaceMRU by using only one MRU

with mutexes, instead of a MRU per thread. Should be thread safe even when using a thread pool.

Changeset: 415e44097c52815e575f91597f1908cbb9a749e2

comment:4 Changed 9 years ago by Janik Zikovsky

Refs #5040 locking mechanism to avoid data in use dropping off MRU

from EventLists

Changeset: d2fbe69541cb66a505e6cb797bc8ac8afe2ab51a

comment:5 Changed 9 years ago by Janik Zikovsky

Refs #5040 better threadsafety in MRU

Changeset: 83b4aef9e408f3e4a253ce734ffa5a4ebff5d14f

comment:6 Changed 9 years ago by Janik Zikovsky

Refs #5040 better thread-safety in AnvredCorrection

Changeset: a108d2e325eb1e9031e2c27da10f50892b618723

comment:7 Changed 9 years ago by Janik Zikovsky

Refs #5040 thread safety for ConvertToDiffractionMD, hopefully

Changeset: 90da9f17c38db617eedc6cc320d8dbc1ec6cbf88

comment:8 Changed 9 years ago by Janik Zikovsky

Refs #5040 SmoothNeighbours thread safety

Changeset: 0a9805091ed9b813387a39f77574c43380528042

comment:9 Changed 9 years ago by Janik Zikovsky

Refs #5040 going back to multiple MRU lists

Because this is more thread safe without having to modify all existing code.

Changeset: 8e449592c46998bf27282a19e8f59954932f594e

comment:10 Changed 9 years ago by Janik Zikovsky

Refs #5040 more thread safety for MRU

Changeset: 547be5982ecc23bc84c9487dc05947aa13ed9fbc

comment:11 Changed 9 years ago by Janik Zikovsky

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

I believe this is now thread safe for both ThreadPools and PARALLEL_FOR. Tester: an example is ConvertToDiffractionMDWorkspace

comment:12 Changed 9 years ago by Vickie Lynch

Last edited 9 years ago by Vickie Lynch (previous) (diff)

comment:13 Changed 8 years ago by Peter Peterson

  • Status changed from verify to verifying
  • Tester set to Peter Peterson

comment:14 Changed 8 years ago by Peter Peterson

  • Status changed from verifying to closed

This was (entertainingly) done correctly.

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5886

Note: See TracTickets for help on using tickets.