From 2f234b45d118e94eea74df8623bd5d7ad8442a25 Mon Sep 17 00:00:00 2001 From: Simon Heybrock <simon.heybrock@esss.se> Date: Thu, 25 Jan 2018 16:00:19 +0100 Subject: [PATCH] Re #21631. Even more trivial MPI support. --- .../MultipleScatteringCylinderAbsorption.h | 8 +++----- .../inc/MantidAlgorithms/NormaliseByCurrent.h | 7 ++----- .../Algorithms/inc/MantidAlgorithms/RenameWorkspace.h | 7 ++----- .../inc/MantidDataHandling/SaveFocusedXYE.h | 11 +++-------- .../DataHandling/inc/MantidDataHandling/SaveGSS.h | 9 ++------- .../inc/MantidDataHandling/SetSampleMaterial.h | 7 ++----- Framework/DataHandling/src/SaveFocusedXYE.cpp | 2 -- Framework/DataHandling/src/SaveGSS.cpp | 3 --- dev-docs/source/AlgorithmMPISupport.rst | 6 ++++++ 9 files changed, 20 insertions(+), 40 deletions(-) diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h index 68a30583a36..ab2190f5bf9 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h @@ -1,10 +1,7 @@ #ifndef MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_ #define MANTID_ALGORITHM_MULTIPLE_SCATTERING_ABSORPTION_H_ -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#include "MantidAPI/Algorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include <vector> namespace Mantid { @@ -44,7 +41,8 @@ namespace Algorithms { <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport MultipleScatteringCylinderAbsorption : public API::Algorithm { +class DLLExport MultipleScatteringCylinderAbsorption + : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h index 6bb98e6ed6d..c41872d84f0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h @@ -1,10 +1,7 @@ #ifndef MANTID_ALGORITHMS_NORMALISEBYCURRENT_H_ #define MANTID_ALGORITHMS_NORMALISEBYCURRENT_H_ -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#include "MantidAPI/Algorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include <boost/shared_ptr.hpp> namespace Mantid { namespace API { @@ -50,7 +47,7 @@ namespace Algorithms { File change history is stored at: <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport NormaliseByCurrent : public API::Algorithm { +class DLLExport NormaliseByCurrent : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override { return "NormaliseByCurrent"; } diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h index 2f6d4fa95e5..fcde2879ca7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h @@ -1,10 +1,7 @@ #ifndef MANTID_ALGORITHMS_RENAMEWORKSPACE_H_ #define MANTID_ALGORITHMS_RENAMEWORKSPACE_H_ -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#include "MantidAPI/Algorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace Algorithms { @@ -41,7 +38,7 @@ namespace Algorithms { Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport RenameWorkspace : public API::Algorithm { +class DLLExport RenameWorkspace : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override { return "RenameWorkspace"; } diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveFocusedXYE.h b/Framework/DataHandling/inc/MantidDataHandling/SaveFocusedXYE.h index b980b8be166..7da884dc5cc 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveFocusedXYE.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveFocusedXYE.h @@ -1,10 +1,7 @@ #ifndef DATAHANDING_SAVEFOCUSEDXYE_H_ #define DATAHANDING_SAVEFOCUSEDXYE_H_ -//--------------------------------------------------- -// Includes -//--------------------------------------------------- -#include "MantidAPI/Algorithm.h" +#include "MantidAPI/SerialAlgorithm.h" namespace Mantid { namespace DataHandling { @@ -58,11 +55,9 @@ namespace DataHandling { File change history is stored at: <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport SaveFocusedXYE : public API::Algorithm { +class DLLExport SaveFocusedXYE : public API::SerialAlgorithm { public: enum HeaderType { XYE, MAUD, TOPAS }; - /// Constructor - SaveFocusedXYE(); /// Algorithm's name const std::string name() const override { return "SaveFocusedXYE"; } /// Summary of algorithms purpose @@ -116,7 +111,7 @@ private: int perioidNum) override; /// Header type - HeaderType m_headerType; + HeaderType m_headerType{XYE}; /// Comment character std::string m_comment; }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveGSS.h b/Framework/DataHandling/inc/MantidDataHandling/SaveGSS.h index 712f64c0bcd..adb8cdd17c6 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveGSS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveGSS.h @@ -1,10 +1,7 @@ #ifndef DATAHANDING_SAVEGSS_H_ #define DATAHANDING_SAVEGSS_H_ -//--------------------------------------------------- -// Includes -//--------------------------------------------------- -#include "MantidAPI/Algorithm.h" +#include "MantidAPI/SerialAlgorithm.h" #include "MantidAPI/SpectrumInfo.h" #include "MantidAPI/Run.h" #include "MantidKernel/System.h" @@ -71,10 +68,8 @@ namespace DataHandling { File change history is stored at: <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport SaveGSS : public Mantid::API::Algorithm { +class DLLExport SaveGSS : public Mantid::API::SerialAlgorithm { public: - /// Constructor - SaveGSS(); /// Algorithm's name const std::string name() const override { return "SaveGSS"; } /// Summary of algorithms purpose diff --git a/Framework/DataHandling/inc/MantidDataHandling/SetSampleMaterial.h b/Framework/DataHandling/inc/MantidDataHandling/SetSampleMaterial.h index cc9a5006a3a..a4e0461fdbe 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SetSampleMaterial.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SetSampleMaterial.h @@ -1,10 +1,7 @@ #ifndef MANTID_DATAHANDLING_SetSampleMaterial_H_ #define MANTID_DATAHANDLING_SetSampleMaterial_H_ -//-------------------------------- -// Includes -//-------------------------------- -#include "MantidAPI/Algorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidKernel/NeutronAtom.h" namespace Mantid { @@ -39,7 +36,7 @@ namespace DataHandling { File change history is stored at: <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport SetSampleMaterial : public Mantid::API::Algorithm { +class DLLExport SetSampleMaterial : public Mantid::API::DistributedAlgorithm { public: /// Algorithm's name const std::string name() const override; diff --git a/Framework/DataHandling/src/SaveFocusedXYE.cpp b/Framework/DataHandling/src/SaveFocusedXYE.cpp index 2375ad13216..cd63e346239 100644 --- a/Framework/DataHandling/src/SaveFocusedXYE.cpp +++ b/Framework/DataHandling/src/SaveFocusedXYE.cpp @@ -18,8 +18,6 @@ using namespace Mantid::DataHandling; // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(SaveFocusedXYE) -SaveFocusedXYE::SaveFocusedXYE() : API::Algorithm(), m_headerType(XYE) {} - /** * Initialise the algorithm */ diff --git a/Framework/DataHandling/src/SaveGSS.cpp b/Framework/DataHandling/src/SaveGSS.cpp index 66a5ec500d2..8ae01d013e1 100644 --- a/Framework/DataHandling/src/SaveGSS.cpp +++ b/Framework/DataHandling/src/SaveGSS.cpp @@ -96,9 +96,6 @@ void writeBankHeader(std::stringstream &out, const std::string &bintype, } } // End of anonymous namespace -// Constructor -SaveGSS::SaveGSS() : Mantid::API::Algorithm() {} - // Initialise the algorithm void SaveGSS::init() { declareProperty(Kernel::make_unique<API::WorkspaceProperty<>>( diff --git a/dev-docs/source/AlgorithmMPISupport.rst b/dev-docs/source/AlgorithmMPISupport.rst index 2ec9ed259c9..f057f08c116 100644 --- a/dev-docs/source/AlgorithmMPISupport.rst +++ b/dev-docs/source/AlgorithmMPISupport.rst @@ -589,7 +589,9 @@ MaskDetectorsInShape all MaskSpectra all Minus all see ``BinaryOperation`` MoveInstrumentComponent all +MultipleScatteringCylinderAbsorption all Multiply all see ``BinaryOperation`` +NormaliseByCurrent all OneMinusExponentialCor all see ``UnaryOperation`` PDDetermineCharacterizations all PDLoadCharacterizations Identical @@ -603,6 +605,7 @@ RealFFT MasterOnly, Identical Rebin all RebinToWorkspace all ``WorkspaceToMatch`` must have ``StorageMode::Cloned`` RemovePromptPulse all +RenameWorkspace all ReplaceSpecialValues all see ``UnaryOperation`` RotateInstrumentComponent all SANSCalculateTransmission MasterOnly, Identical @@ -622,9 +625,12 @@ SANSScale all SANSSingleReduction all SANSSliceEvent all SANSStitch MasterOnly, Identical +SaveFocusedXYE MasterOnly +SaveGSS MasterOnly SaveNexus MasterOnly SaveNexusProcessed MasterOnly Scale all +SetSampleMaterial all SetUncertainties MasterOnly, Identical SignalOverError all see ``UnaryOperation`` SNSPowderReduction Distributed -- GitLab