diff --git a/Framework/API/CMakeLists.txt b/Framework/API/CMakeLists.txt index 2a5ad82cd64387d67ea777a541e737921aa28529..cece3adcc44470090cf6eb86b1e5ccae6355403f 100644 --- a/Framework/API/CMakeLists.txt +++ b/Framework/API/CMakeLists.txt @@ -28,6 +28,7 @@ set ( SRC_FILES src/DataProcessorAlgorithm.cpp src/DeprecatedAlgorithm.cpp src/DetectorSearcher.cpp + src/DistributedAlgorithm.cpp src/DomainCreatorFactory.cpp src/EnabledWhenWorkspaceIsType.cpp src/EqualBinSizesValidator.cpp @@ -112,7 +113,6 @@ set ( SRC_FILES src/ParamFunction.cpp src/ParameterReference.cpp src/ParameterTie.cpp - src/ParallelAlgorithm.cpp src/PeakFunctionIntegrator.cpp src/Progress.cpp src/Projection.cpp @@ -192,6 +192,7 @@ set ( INC_FILES inc/MantidAPI/DeclareUserAlg.h inc/MantidAPI/DeprecatedAlgorithm.h inc/MantidAPI/DetectorSearcher.h + inc/MantidAPI/DistributedAlgorithm.h inc/MantidAPI/DllConfig.h inc/MantidAPI/DomainCreatorFactory.h inc/MantidAPI/EnabledWhenWorkspaceIsType.h @@ -308,7 +309,6 @@ set ( INC_FILES inc/MantidAPI/ParamFunction.h inc/MantidAPI/ParameterReference.h inc/MantidAPI/ParameterTie.h - inc/MantidAPI/ParallelAlgorithm.h inc/MantidAPI/PeakFunctionIntegrator.h inc/MantidAPI/Progress.h inc/MantidAPI/Projection.h diff --git a/Framework/API/inc/MantidAPI/ParallelAlgorithm.h b/Framework/API/inc/MantidAPI/DistributedAlgorithm.h similarity index 88% rename from Framework/API/inc/MantidAPI/ParallelAlgorithm.h rename to Framework/API/inc/MantidAPI/DistributedAlgorithm.h index 98664a2e189358ee5252255e9c945a063f85fd2c..0dfebbf6ff55ec8f7468a32e4a507878c47f4f84 100644 --- a/Framework/API/inc/MantidAPI/ParallelAlgorithm.h +++ b/Framework/API/inc/MantidAPI/DistributedAlgorithm.h @@ -1,5 +1,5 @@ -#ifndef MANTID_API_PARALLELALGORITHM_H_ -#define MANTID_API_PARALLELALGORITHM_H_ +#ifndef MANTID_API_DISTRIBUTEDALGORITHM_H_ +#define MANTID_API_DISTRIBUTEDALGORITHM_H_ #include "MantidAPI/Algorithm.h" #include "MantidAPI/DllConfig.h" @@ -13,7 +13,7 @@ namespace API { propagated from input to output. When a specific algorithm is determined to be trivially parallel (this is a manual process), the only required change to add MPI support is to inherit from this class instead of Algorithm. Inheriting - from ParallelAlgorithm instead of from Algorithm provides the necessary + from DistributedAlgorithm instead of from Algorithm provides the necessary overriden method(s) to allow running an algorithm with MPI. This works under the following conditions: 1. The algorithm must have a single input and a single output workspace. @@ -22,7 +22,7 @@ namespace API { class to support MPI. For example, modifications of the instrument are handled in a identical manner on all MPI ranks, without requiring changes to the algorithm, other than setting the correct execution mode via the overloads - provided by ParallelAlgorithm. + provided by DistributedAlgorithm. @author Simon Heybrock @date 2017 @@ -48,7 +48,7 @@ namespace API { File change history is stored at: <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class MANTID_API_DLL ParallelAlgorithm : public Algorithm { +class MANTID_API_DLL DistributedAlgorithm : public Algorithm { protected: Parallel::ExecutionMode getParallelExecutionMode( const std::map<std::string, Parallel::StorageMode> &storageModes) @@ -58,4 +58,4 @@ protected: } // namespace API } // namespace Mantid -#endif /* MANTID_API_PARALLELALGORITHM_H_ */ +#endif /* MANTID_API_DISTRIBUTEDALGORITHM_H_ */ diff --git a/Framework/API/src/ParallelAlgorithm.cpp b/Framework/API/src/DistributedAlgorithm.cpp similarity index 67% rename from Framework/API/src/ParallelAlgorithm.cpp rename to Framework/API/src/DistributedAlgorithm.cpp index 1538296ca9e4a1a60f0b7fb08f109b914a4261ef..a9c0703e463f1c51675b4eaa9ff69fd724a2bf1c 100644 --- a/Framework/API/src/ParallelAlgorithm.cpp +++ b/Framework/API/src/DistributedAlgorithm.cpp @@ -1,9 +1,9 @@ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace API { -Parallel::ExecutionMode ParallelAlgorithm::getParallelExecutionMode( +Parallel::ExecutionMode DistributedAlgorithm::getParallelExecutionMode( const std::map<std::string, Parallel::StorageMode> &storageModes) const { return Parallel::getCorrespondingExecutionMode(storageModes.begin()->second); } diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h index 91d015490f031296175c2bf01bc6f5db5aa39877..d22e997dd59359ed7faecf90ec1a62eb4bf0504a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h @@ -1,7 +1,7 @@ #ifndef MANTID_ALGORITHMS_CLONEWORKSPACE_H_ #define MANTID_ALGORITHMS_CLONEWORKSPACE_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace Algorithms { @@ -40,7 +40,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 CloneWorkspace : public API::ParallelAlgorithm { +class DLLExport CloneWorkspace : public API::DistributedAlgorithm { public: /// Algorithm's name const std::string name() const override { return "CloneWorkspace"; } diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CropToComponent.h b/Framework/Algorithms/inc/MantidAlgorithms/CropToComponent.h index dcfde59a5ee7b3033d55d3d62530e1237875d6f0..d847fa91c390f3628483bdbc7f883fe77771a368 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CropToComponent.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CropToComponent.h @@ -1,7 +1,7 @@ #ifndef MANTID_ALGORITHMS_CROPTOCOMPONENT_H_ #define MANTID_ALGORITHMS_CROPTOCOMPONENT_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidAlgorithms/DllConfig.h" namespace Mantid { @@ -31,7 +31,7 @@ namespace Algorithms { Code Documentation is available at: <http://doxygen.mantidproject.org> */ class MANTID_ALGORITHMS_DLL CropToComponent final - : public API::ParallelAlgorithm { + : public API::DistributedAlgorithm { public: const std::string name() const override final; int version() const override final; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h index 23d072c16163a538d982aa05a3af705079b157c9..f4917f1b15db944956c8f01f73982562ed29c6e6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h @@ -1,7 +1,7 @@ #ifndef MANTID_ALGORITHMS_CROPWORKSPACE_H_ #define MANTID_ALGORITHMS_CROPWORKSPACE_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace Algorithms { @@ -63,7 +63,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 CropWorkspace : public API::ParallelAlgorithm { +class DLLExport CropWorkspace : public API::DistributedAlgorithm { public: /// Algorithm's name const std::string name() const override { return "CropWorkspace"; } diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h index b6778c7bb8ace85a391f470541dba22b6808c875..1395599033b26dce0b15867f0d2bd38e075d45e9 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h @@ -1,7 +1,7 @@ #ifndef MANTID_ALGORITHMS_EXTRACTMASK_H_ #define MANTID_ALGORITHMS_EXTRACTMASK_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace Algorithms { @@ -44,7 +44,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 ExtractMask : public Mantid::API::ParallelAlgorithm { +class DLLExport ExtractMask : public Mantid::API::DistributedAlgorithm { public: /// Algorithm's name const std::string name() const override { return "ExtractMask"; } diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h index cfabe98574ad05f1fea001841ba83acbe5d854d1..298ca2bf47705f6bd356f9d3fad5c5fb2f195240 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h @@ -1,7 +1,7 @@ #ifndef MANTID_ALGORITHMS_EXTRACTSINGLESPECTRUM_H_ #define MANTID_ALGORITHMS_EXTRACTSINGLESPECTRUM_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace Algorithms { @@ -40,7 +40,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 ExtractSingleSpectrum : public API::ParallelAlgorithm { +class DLLExport ExtractSingleSpectrum : public API::DistributedAlgorithm { public: /// Algorithm's name const std::string name() const override { return "ExtractSingleSpectrum"; } diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h index 6f94a82a1991816d6f14723a4f381016d9e35a18..39bf1d6753d15bdab7612b2dcafe362b2f2ea386 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h @@ -2,7 +2,7 @@ #define MANTID_ALGORITHMS_EXTRACTSPECTRA_H_ #include "MantidKernel/System.h" -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidDataObjects/EventWorkspace.h" namespace Mantid { @@ -33,7 +33,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 ExtractSpectra : public API::ParallelAlgorithm { +class DLLExport ExtractSpectra : public API::DistributedAlgorithm { public: const std::string name() const override; int version() const override; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra2.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra2.h index 208febc4d661da8d4b63a2c2e9192fe26b4915dd..987830a9498219f01fea58a1e2d1ad73d617aee8 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra2.h @@ -2,7 +2,7 @@ #define MANTID_ALGORITHMS_EXTRACTSPECTRA2_H_ #include "MantidAlgorithms/DllConfig.h" -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace Algorithms { @@ -35,7 +35,7 @@ namespace Algorithms { File change history is stored at: <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class MANTID_ALGORITHMS_DLL ExtractSpectra2 : public API::ParallelAlgorithm { +class MANTID_ALGORITHMS_DLL ExtractSpectra2 : public API::DistributedAlgorithm { public: const std::string name() const override; int version() const override; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h index 282ba9028e69f22de43dd48e402c6d73dec40456..c57eab8d1130f311f8c863d0a03b048c26c67092 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h @@ -2,7 +2,7 @@ #define MANTID_ALGORITHMS_FILTERBADPULSES_H_ #include "MantidKernel/System.h" -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidDataObjects/EventWorkspace.h" namespace Mantid { @@ -46,7 +46,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 FilterBadPulses : public API::ParallelAlgorithm { +class DLLExport FilterBadPulses : public API::DistributedAlgorithm { public: const std::string name() const override; /// Summary of algorithms purpose diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h index e55acb0d7fefeb9b1b51da8010f3b27a80be6661..0e9eb5773cee83b4d2ccdf38b5ae7635a8245cc1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h @@ -2,7 +2,7 @@ #define MANTID_ALGORITHMS_FILTERBYLOGVALUE_H_ #include "MantidKernel/System.h" -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidDataObjects/EventWorkspace.h" namespace Mantid { @@ -30,7 +30,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 FilterByLogValue : public API::ParallelAlgorithm { +class DLLExport FilterByLogValue : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override { return "FilterByLogValue"; }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h index bff38ec80313465dd7f5a2e246bbf2651752ae86..8bd8398a9e1dcefa106277551c8057e008ab5f1e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h @@ -2,7 +2,7 @@ #define MANTID_ALGORITHMS_FILTERBYTIME_H_ #include "MantidKernel/System.h" -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidDataObjects/EventWorkspace.h" namespace Mantid { @@ -37,7 +37,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 FilterByTime : public API::ParallelAlgorithm { +class DLLExport FilterByTime : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override { return "FilterByTime"; }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h index 708ee013796682e9d1118e0eda412eb80a109189..743d0a81787122f2c4cabb96a3c9b53f3051b82a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h @@ -1,7 +1,7 @@ #ifndef MANTID_ALGORITHMS_MASKBINS_H_ #define MANTID_ALGORITHMS_MASKBINS_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidDataObjects/EventList.h" #include "MantidDataObjects/EventWorkspace.h" #include "MantidIndexing/SpectrumIndexSet.h" @@ -53,7 +53,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 MaskBins : public API::ParallelAlgorithm { +class DLLExport MaskBins : public API::DistributedAlgorithm { public: /// Algorithm's name const std::string name() const override { return "MaskBins"; } diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h b/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h index e4c2fd7eb576518ae8742a203b5cf4af81061075..51240422723fff002224841577099ecf5c786564 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h @@ -1,7 +1,7 @@ #ifndef MANTID_ALGORITHMS_REBIN_H_ #define MANTID_ALGORITHMS_REBIN_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace Algorithms { @@ -50,7 +50,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 Rebin : public API::ParallelAlgorithm { +class DLLExport Rebin : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override { return "Rebin"; } diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h b/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h index c20a915bb7ea5cb957bec73a2ab950d5193fb58f..5e4e239d696912bfbd18d9c7c558d04cbcf2afd2 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h @@ -2,7 +2,7 @@ #define MANTID_ALGORITHMS_REMOVEPROMPTPULSE_H_ #include "MantidKernel/System.h" -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidAPI/Run.h" namespace Mantid { @@ -34,7 +34,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 RemovePromptPulse : public API::ParallelAlgorithm { +class DLLExport RemovePromptPulse : public API::DistributedAlgorithm { public: /// Algorithm's name for identification const std::string name() const override; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h b/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h index 86b09cc5acd0e11d67daf364b793a7e5e18ab601..9401200dad195a49a800b07a538c1dc488185eb7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h @@ -1,7 +1,7 @@ #ifndef MANTID_ALGORITHMS_SORTEVENTS_H_ #define MANTID_ALGORITHMS_SORTEVENTS_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace Algorithms { @@ -39,7 +39,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 SortEvents : public API::ParallelAlgorithm { +class DLLExport SortEvents : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override { return "SortEvents"; } diff --git a/Framework/DataHandling/inc/MantidDataHandling/CompressEvents.h b/Framework/DataHandling/inc/MantidDataHandling/CompressEvents.h index aed79f9023a03f767d8f73a7e579ae345568cabe..c3c49b795f8dd110d21e8837f6ac9e250dbc43b1 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/CompressEvents.h +++ b/Framework/DataHandling/inc/MantidDataHandling/CompressEvents.h @@ -1,7 +1,7 @@ #ifndef MANTID_DATAHANDLING_COMPRESSEVENTS_H_ #define MANTID_DATAHANDLING_COMPRESSEVENTS_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" namespace Mantid { namespace DataHandling { @@ -40,7 +40,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 CompressEvents : public API::ParallelAlgorithm { +class DLLExport CompressEvents : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override { return "CompressEvents"; }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadInstrument.h b/Framework/DataHandling/inc/MantidDataHandling/LoadInstrument.h index 1f0ff5c699caaea7af621921cb4d66b18b95c4a3..8649493fe51a914fa262794968c3530701d4b4d2 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadInstrument.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadInstrument.h @@ -2,7 +2,7 @@ #define MANTID_DATAHANDLING_LOADINSTRUMENT_H_ #include "MantidAPI/ExperimentInfo.h" -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include <mutex> @@ -69,7 +69,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. File change history is stored at: <https://github.com/mantidproject/mantid> */ -class DLLExport LoadInstrument : public API::ParallelAlgorithm { +class DLLExport LoadInstrument : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override { return "LoadInstrument"; }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusLogs.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusLogs.h index 74d28ae43ba0cd2dcb7426cf376adb4b6bf0fab3..e0bc283b8eeb8e9ca3b70dfb54ea150b67ddf51a 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusLogs.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusLogs.h @@ -1,7 +1,7 @@ #ifndef MANTID_DATAHANDLING_LOADNEXUSLOGS_H_ #define MANTID_DATAHANDLING_LOADNEXUSLOGS_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include <nexus/NeXusFile.hpp> namespace Mantid { @@ -48,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. File change history is stored at: <https://github.com/mantidproject/mantid>. Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport LoadNexusLogs : public API::ParallelAlgorithm { +class DLLExport LoadNexusLogs : public API::DistributedAlgorithm { public: /// Default constructor LoadNexusLogs(); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadParameterFile.h b/Framework/DataHandling/inc/MantidDataHandling/LoadParameterFile.h index 915986fb8a795a2a5b2951aea455ce12a3845803..698e991deebf19e04ec739982eb0d4ec4e96d6b0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadParameterFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadParameterFile.h @@ -1,7 +1,7 @@ #ifndef MANTID_DATAHANDLING_LOADPARAMETERFILE_H_ #define MANTID_DATAHANDLING_LOADPARAMETERFILE_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" /// @cond Exclude from doxygen documentation namespace Poco { @@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. File change history is stored at: <https://github.com/mantidproject/mantid> */ -class DLLExport LoadParameterFile : public API::ParallelAlgorithm { +class DLLExport LoadParameterFile : public API::DistributedAlgorithm { public: /// Algorithm's name for identification overriding a virtual method const std::string name() const override { return "LoadParameterFile"; }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/MoveInstrumentComponent.h b/Framework/DataHandling/inc/MantidDataHandling/MoveInstrumentComponent.h index 95912b08dc011237386438315f584eaf5c7e79d6..d556d560520c091c50c0d4c94884229628dc55c8 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/MoveInstrumentComponent.h +++ b/Framework/DataHandling/inc/MantidDataHandling/MoveInstrumentComponent.h @@ -1,7 +1,7 @@ #ifndef MANTID_DATAHANDLING_MOVEINSTRUMENTCOMPONENT_H_ #define MANTID_DATAHANDLING_MOVEINSTRUMENTCOMPONENT_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidGeometry/Instrument/Component.h" namespace Mantid { @@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. File change history is stored at: <https://github.com/mantidproject/mantid>. Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport MoveInstrumentComponent : public API::ParallelAlgorithm { +class DLLExport MoveInstrumentComponent : public API::DistributedAlgorithm { public: /// Default constructor MoveInstrumentComponent(); diff --git a/Framework/DataHandling/inc/MantidDataHandling/RotateInstrumentComponent.h b/Framework/DataHandling/inc/MantidDataHandling/RotateInstrumentComponent.h index c4cf6d6991dc6fef7ad5694f1e35c21360f029b6..1b6cb651bd9c7a8c486e18c90a64ec5e30e4f6fc 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/RotateInstrumentComponent.h +++ b/Framework/DataHandling/inc/MantidDataHandling/RotateInstrumentComponent.h @@ -1,7 +1,7 @@ #ifndef MANTID_DATAHANDLING_ROTATEINSTRUMENTCOMPONENT_H_ #define MANTID_DATAHANDLING_ROTATEINSTRUMENTCOMPONENT_H_ -#include "MantidAPI/ParallelAlgorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidGeometry/Instrument/Component.h" namespace Mantid { @@ -55,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. File change history is stored at: <https://github.com/mantidproject/mantid>. Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport RotateInstrumentComponent : public API::ParallelAlgorithm { +class DLLExport RotateInstrumentComponent : public API::DistributedAlgorithm { public: /// Default constructor RotateInstrumentComponent(); diff --git a/docs/source/development/AlgorithmMPISupport.rst b/docs/source/development/AlgorithmMPISupport.rst index 8858b257d5e71f8d55bf9a1c67710bdc8e134578..2c3d32d802c4fff41db7ac9ad227e8778bccc463 100644 --- a/docs/source/development/AlgorithmMPISupport.rst +++ b/docs/source/development/AlgorithmMPISupport.rst @@ -266,8 +266,8 @@ In that case the execution mode can simply be determined from the input workspac Here the helper ``Parallel::getCorrespondingExecutionMode`` is used to obtain the 'natural' execution mode from a storage mode, i.e., ``ExecutionMode::Identical`` for ``StorageMode::Cloned``, ``ExecutionMode::Distributed`` for ``StorageMode::Distributed``, and ``ExecutionMode::MasterOnly`` for ``StorageMode::MasterOnly``. More complex algorithms may require more complex decision mechanism, e.g., when there is more than one input workspace. -For many algorithms the base class ``API::ParallelAlgorithm`` provides a sufficient default implementation of ``Algorithm::getParallelExecutionMode()``. -MPI support can simply be enabled by inheriting from ``ParallelAlgorithm`` instead of from ``Algorithm``. +For many algorithms the base class ``API::DistributedAlgorithm`` provides a sufficient default implementation of ``Algorithm::getParallelExecutionMode()``. +MPI support can simply be enabled by inheriting from ``DistributedAlgorithm`` instead of from ``Algorithm``. Generally this works only for algorithms with a single input and a single output that either process only non-spectrum data or process all spectra independently. If none of the other virtual methods listed above is implemented, ``Algorithm`` will run the normal ``exec()`` method on all MPI ranks.