Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/mantidproject/mantid.git. Pull mirroring updated .
  1. Mar 20, 2020
  2. Mar 16, 2020
    • Danny Hindson's avatar
      Further work on applying cmake GenerateExportHeader · a8c3109c
      Danny Hindson authored
      Apply change to insert export macros into class definition using cmake GenerateExportHeader
      feature to 3 more projects: API, Crystal and CurveFitting
      Have replaced DllExport with the cmake macro except in these places:
      
      a) class templates - the definitions of class template member functions need to be in the
      same unit as the declaration so dllimport gives a compilation error in the client code
      (C2491 in VS) eg SingleValueParameter, SingleValueParameterParser
      b) headers which are in a project but aren't included by any .cpp units in the project
      eg IBackgroundFunction.h, ICatalogInfoService.h. In these cases I've removed the DLLExport
      attribute completely
      
      For the API target there were a couple of special cases\extras:
      
      API has some conditional use of the extern keyword to control instantiation of template
      classes. This has been inserted into the automatically created dllconfig.h using a cmake
      switch that allows some custom content to be appended to the end of the file. Few of the
      targets require this so I've added a boolean parameter to the wrapper function to handle
      this GENERATE_MANTID_EXPORT_HEADER
      
      I also had to add explicit include directories to PythonInterfaceCore where it imports an
      API target header (in the unit ExtractWorkspace.h) without having API as a dependency
      a8c3109c
  3. Mar 13, 2020
    • David Fairbrother's avatar
      Re #26703 Replace deprecated API with tbb:global_control · fa503553
      David Fairbrother authored
      Replaces the deprecated scheduler_init with global_control. This should
      future proof us, and completely avoids all the threading issues we were
      seeing previously.
      
      The TBB_PREVIEW_GLOBAL_CONTROL macro is required until TBB 2019U4, or 11
      internally. So for simplicity we will make platforms using an older
      version of TBB (RHEL7 and Ubuntu at writing) switch to scheduler init
      fa503553
    • David Fairbrother's avatar
      Re #26703 Fix TBB Threading issue · 42793d09
      David Fairbrother authored
      Fixes the following assertion thrown by TBB:
      
      	Attempt to terminate non-local scheduler instance
      
      This took a significant amount of time to track down due to a number of
      factors. If your looking for a quick fix; set your
      tbb::task_scheduler_init to use thread local storage.
      
      This is caused by using Python multi-processing (in our case for the
      system tests). The process will spawn correctly (Windows), however
      Python will helpfully create seperate thread(s). I assume to observe. In
      this case the task_scheduler_init handle would then belong to one of
      these threads, as the act of importing our Python module would init the
      framework and TBB implicitly.
      
      When the tests run and TBBs scheduling is required it will "sign_on" in
      tbb's governor.cpp to handle scheduling. This works because the
      scheduler_init handle
      is process wide. However internally they then use thread local storage
      (TLS) for tracking the scheduler.
      
      As the main process goes to destruct it assumes that we must have
      a scheduler instance, since at process level we have done the init.
      
      But we cannot see any schedulers since they belong to a different
      thread. We have been getting away with this as the TLS returns NULL
      which effectively nops the destruction. But the assert correctly points
      out were getting this wrong.
      
      Marking each handle to the scheduler as thread local effectively ties
      the destruction of the thread to its init status. For most threads this
      effectively means we create a unique_ptr which isn't used. But for our
      main threads and weird edge case worker threads it keeps the thread
      state consistent.
      
      We've used a unique_ptr since we have an API which allows us to change
      the number of threads TBB can spin up. However, anyone else facing this
      issue would probably be fine with a thread local object allocated on the
      stack.
      42793d09
    • Hahn, Steven's avatar
      cpp-check · 9cb86f78
      Hahn, Steven authored
      
      Signed-off-by: default avatarSteven Hahn <hahnse@ornl.gov>
      9cb86f78
  4. Mar 11, 2020
  5. Mar 10, 2020
  6. Mar 06, 2020
  7. Mar 05, 2020
    • Danny Hindson's avatar
      Fix problems with setting YErr columns on table workspace · 77b9c037
      Danny Hindson authored
      This change fixes a problem in Workbench when setting columns to YErr
      Previously this only worked if all Y columns had an associated YErr column. If that
      wasn't the case then the associations between Y and YErr cols got mixed up
      I have saved the link between the YErr and Y column into the C++ table workspace
      object via changes to ITableWorkspace and the Column class
      I've also modified the model\view\presenter for the table workspace to set and get
      the link via the ITableWorkspace interface
      The code in marked_columns.py has been modified to remove the _add function because
      the logic required for adding x, y and yerr was sufficiently different that trying
      to push them through a common _add function was obscuring the code
      Finally I've removed the labelindex from the ErrorColumn object in the python code
      because it can be worked out on the fly (and I didn't want to have to save this also
      into the C++ table workspace in addition to the linked column index)
      
      As part of the test updates I have removed the test
      TableWorkspaceDisplayModelTest.test_initialise_marked_columns_yerr_before_y_doesnt_mark_yerr
      because we do require the ability to add a yerr column before the corresponding y column
      The model gets refreshed whenever the C++ table workspace is updated (eg when the type of a column
      is updated) as part of a replace_workspace call. The model __init__ function builds up the column
      set left to right and a user may have set up a Y err column which is to the left of the corresponding
      Y column.
      77b9c037
  8. Feb 28, 2020
    • David Fairbrother's avatar
      Re #28119 Append bad index to out of range exception · 4e871df4
      David Fairbrother authored
      Updates the IndexType to have a new method to convert to a string, this
      reduction in strict type safety could mean developers could abuse
      SpectrumIndex -> String conversions. However, it enables us to print a
      string representation of an index, such as if we need to say index x is
      out of range.
      
      Previously, the at() access on the IndexProperty map would throw with an
      invalid key message. This is useless for anyone who is trying to Mask a
      range of specra (such as 500), as you have to guess if the min / max or
      a middle value was bad.
      4e871df4
  9. Jan 31, 2020
    • Nick Draper's avatar
      clang formatting for this pr · d4dc5ed9
      Nick Draper authored
      d4dc5ed9
    • Nick Draper's avatar
      Algorithm Progress details fills with all algorithms on creation · 570c00d9
      Nick Draper authored
      Previously an algorithm only appeared when a progress message came in
      re #27077
      570c00d9
    • Nick Draper's avatar
      Reslove MonitorData not showing in the workbench algorithm details box · 55ad2798
      Nick Draper authored
      This was due to:
      1. Too long a default UpdateEvery default
      2. Too infrequest progress updates from MonitorLiveData
      3. The Algorithm Details box not adding an algorithm until it sends a progress update
      4. The StartLiveData custom Dialog not showing the default for UpdateEvery
      
      Fixes:
      1. Decreased the default UpdateEvery from 60 to 30 seconds
      2. Change the default timeout for FakeISISHistongramDAE from 30 to 60s
      3. improved the progress logging for MonitorLivedata to update more frequently with an idle counter as well.
      4. Changed the tie function used in custom algorithm dialogs to set the placeholder text for line edits
      5. Changed the log level for user cancelling of algorithms from Error to warning so it does not trigger the notification service
      6. Changed the log message for user cancellation from Terminated to cancelled to reduce confusion
      
      re #27077
      55ad2798
    • Phil Colebrooke's avatar
  10. Jan 30, 2020
  11. Jan 23, 2020
  12. Jan 21, 2020
  13. Jan 16, 2020
  14. Jan 09, 2020
  15. Dec 12, 2019
  16. Nov 28, 2019
    • Martyn Gigg's avatar
      Accept OrientedLattice by unique_ptr · 424fc625
      Martyn Gigg authored
      The overwhelming use case for this method is to
      take ownership of a lattice object into Sample.
      Using unique_ptr clarifies that this is happening
      at the call site and forces a caller to make copy
      if that is truly the desired behaviour. The old code
      make a copy internally but this was not obvious
      from the method call.
      424fc625
  17. Nov 25, 2019
  18. Nov 24, 2019
  19. Nov 21, 2019
  20. Nov 20, 2019
  21. Nov 18, 2019
  22. Nov 08, 2019
  23. Oct 31, 2019
    • Danny Hindson's avatar
      Incorporate review comments · 393d47be
      Danny Hindson authored
      Main change is to add an overload of registerFeatureUsage that accepts a
      simple string in addition to the existing method that takes a vector of strings
      
      Update some further calls to registerFeatureUsage that had appeared in master
      Also change trimming behaviour so trimming of feature names is done on copy
      rather than in place
      393d47be
    • Danny Hindson's avatar
      Modify registerFeatureUsage in Usage Service to reduce misuse · 1af6118d
      Danny Hindson authored
      Now accepts:
      - an enum for feature type rather than a string eg Algorithm
      - a vector of strings for the feature name instead of string (eg class1->method1)
      
      Also updated pre-existing calls to registerFeatureUsage in C++ and Python
      1af6118d
Loading