Ticket #5784 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Add piece of code which controls number of threads the ConvToMD uses

Reported by: Alex Buts Owned by: Alex Buts
Priority: major Milestone: Release 2.3
Component: VATES Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description (last modified by Alex Buts) (diff)

This is part of the ticket #5552 (fully multi-thread running of the code) and is needed for testing and debugging that ticket.

Change History

comment:1 Changed 8 years ago by Alex Buts

  • Owner set to Alex Buts
  • Status changed from new to accepted

comment:2 Changed 8 years ago by Alex Buts

  • Description modified (diff)

comment:3 Changed 8 years ago by Alex Buts

refs #5784 work started and some test appears

Changeset: 07d32932ab72aa2d8e1cb552832f9c5efc6f07c5

comment:4 Changed 8 years ago by Alex Buts

refs #5784 ConvToMDBase recognizes NUM_THREAD property

Changeset: 525abb1c3a7b6dbfce56ffa60772ba20be517ebe

comment:5 Changed 8 years ago by Alex Buts

refs #5784 It should be possible to control number of threads

It should be possible to control number of threads ConvertToMD uses using NUM_THREAD property

Changeset: 9931c857bf9d9f9b0d491de726fea92f48056ead

comment:6 Changed 8 years ago by Alex Buts

refs #5784 Bug with tread pool copy constructor fixed

Thread pool is not copy constructable

Changeset: 9f741c6695d0139737043d397f05af600a343df8

comment:7 Changed 8 years ago by Alex Buts

refs #5784 modification to set up num threads as double property

as algorithm which sets log value does not set integer properties.

Changeset: f498537ea5d1d54fc72f3f70065a08e53698364d

comment:8 Changed 8 years ago by Alex Buts

refs #5784 fixing unit tests

Changeset: 5f7fd61043604a9fa4cb317a719fbe73c0267318

comment:9 Changed 8 years ago by Alex Buts

refs #5784 fixing unix warnings

Changeset: 69f2275f01a3d544556825b4329c758e22e1f75b

comment:10 Changed 8 years ago by Alex Buts

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

comment:11 Changed 8 years ago by Alex Buts

the double porperty "NUM_THREADS" now control if ConvertToMD runs single thread NUM_THREADS=0, default number of cored "NUM_THREADS" absent or NUM_THREADS<0 or specified number of threads.

NUM_THREADS=n

comment:12 Changed 8 years ago by Alex Buts

refs #5784 trying to fix unit test

-- disabling offending for the time being

Changeset: 554e1f70efe3b566e2dc0d70cb6b959872e4b237

comment:13 Changed 8 years ago by Alex Buts

refs #5784 Enabling fixed tests

which should work now

Changeset: 8ef224b40f03c4aef4571201b6e04301f1cc0f17

comment:14 Changed 8 years ago by Alex Buts

refs #5784 fixing performance tests

by temporary disabling instrument check

Changeset: 9af0254f2ede5ea92ac7fc59b357b97297b70b74

comment:15 Changed 8 years ago by Alex Buts

refs #5784 work started and some test appears

Changeset: 07d32932ab72aa2d8e1cb552832f9c5efc6f07c5

comment:16 Changed 8 years ago by Alex Buts

refs #5784 ConvToMDBase recognizes NUM_THREAD property

Changeset: 525abb1c3a7b6dbfce56ffa60772ba20be517ebe

comment:17 Changed 8 years ago by Alex Buts

refs #5784 It should be possible to control number of threads

It should be possible to control number of threads ConvertToMD uses using NUM_THREAD property

Changeset: 9931c857bf9d9f9b0d491de726fea92f48056ead

comment:18 Changed 8 years ago by Alex Buts

refs #5784 Bug with tread pool copy constructor fixed

Thread pool is not copy constructable

Changeset: 9f741c6695d0139737043d397f05af600a343df8

comment:19 Changed 8 years ago by Alex Buts

refs #5784 modification to set up num threads as double property

as algorithm which sets log value does not set integer properties.

Changeset: f498537ea5d1d54fc72f3f70065a08e53698364d

comment:20 Changed 8 years ago by Alex Buts

refs #5784 fixing unit tests

Changeset: 5f7fd61043604a9fa4cb317a719fbe73c0267318

comment:21 Changed 8 years ago by Alex Buts

refs #5784 fixing unix warnings

Changeset: 69f2275f01a3d544556825b4329c758e22e1f75b

comment:22 Changed 8 years ago by Alex Buts

refs #5784 trying to fix unit test

-- disabling offending for the time being

Changeset: 554e1f70efe3b566e2dc0d70cb6b959872e4b237

comment:23 Changed 8 years ago by Alex Buts

refs #5784 Enabling fixed tests

which should work now

Changeset: 8ef224b40f03c4aef4571201b6e04301f1cc0f17

comment:24 Changed 8 years ago by Alex Buts

refs #5784 fixing performance tests

by temporary disabling instrument check

Changeset: 9af0254f2ede5ea92ac7fc59b357b97297b70b74

comment:25 Changed 8 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:26 Changed 8 years ago by Martyn Gigg

  • Status changed from verifying to closed

Tested using this script with/without the NUM_THREADS line. The conversion does indeed only use a single core when the line is included.

bins = [-30,3,279]
fake_data = CreateSimulationWorkspace(Instrument='MERLIN',BinParams=bins,UnitX='DeltaE')
AddSampleLog(Workspace=fake_data, LogName='Ei',LogText=str(300), LogType="Number")
AddSampleLog(Workspace=fake_data, LogName='NUM_THREADS',LogText=str(1), LogType="Number")


fake_md = ConvertToMD(InputWorkspace=fake_data, QDimensions="Q3D", SplitInto=[3], SplitThreshold=100,
                      MinValues="-15,-15,-15,-30", MaxValues="25,25,25,279")

comment:27 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6630

Note: See TracTickets for help on using tickets.