Skip to content
Snippets Groups Projects
Commit 3be4205b authored by Simon Heybrock's avatar Simon Heybrock
Browse files

Re #21631. Parallel MPI for LoadCalFile, LoadDiffCal, ConvertDiffCall.

parent 30604ed6
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define MANTID_ALGORITHMS_CONVERTDIFFCAL_H_ #define MANTID_ALGORITHMS_CONVERTDIFFCAL_H_
#include "MantidKernel/System.h" #include "MantidKernel/System.h"
#include "MantidAPI/Algorithm.h" #include "MantidAPI/ParallelAlgorithm.h"
namespace Mantid { namespace Mantid {
namespace Algorithms { namespace Algorithms {
...@@ -29,7 +29,7 @@ namespace Algorithms { ...@@ -29,7 +29,7 @@ namespace Algorithms {
File change history is stored at: <https://github.com/mantidproject/mantid> File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org> Code Documentation is available at: <http://doxygen.mantidproject.org>
*/ */
class DLLExport ConvertDiffCal : public API::Algorithm { class DLLExport ConvertDiffCal : public API::ParallelAlgorithm {
public: public:
const std::string name() const override; const std::string name() const override;
int version() const override; int version() const override;
...@@ -44,4 +44,4 @@ private: ...@@ -44,4 +44,4 @@ private:
} // namespace Algorithms } // namespace Algorithms
} // namespace Mantid } // namespace Mantid
#endif /* MANTID_ALGORITHMS_CONVERTDIFFCAL_H_ */ #endif /* MANTID_ALGORITHMS_CONVERTDIFFCAL_H_ */
\ No newline at end of file
...@@ -47,6 +47,11 @@ public: ...@@ -47,6 +47,11 @@ public:
Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS, Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS,
Mantid::DataObjects::MaskWorkspace_sptr maskWS); Mantid::DataObjects::MaskWorkspace_sptr maskWS);
protected:
Parallel::ExecutionMode getParallelExecutionMode(
const std::map<std::string, Parallel::StorageMode> &storageModes)
const override;
private: private:
/// Initialise the properties /// Initialise the properties
void init() override; void init() override;
......
...@@ -43,6 +43,11 @@ public: ...@@ -43,6 +43,11 @@ public:
const std::string category() const override; const std::string category() const override;
const std::string summary() const override; const std::string summary() const override;
protected:
Parallel::ExecutionMode getParallelExecutionMode(
const std::map<std::string, Parallel::StorageMode> &storageModes)
const override;
private: private:
void init() override; void init() override;
void exec() override; void exec() override;
......
...@@ -359,5 +359,15 @@ bool LoadCalFile::idIsMonitor(Instrument_const_sptr inst, int detID) { ...@@ -359,5 +359,15 @@ bool LoadCalFile::idIsMonitor(Instrument_const_sptr inst, int detID) {
return (it != monitorList.end()); return (it != monitorList.end());
} }
Parallel::ExecutionMode LoadCalFile::getParallelExecutionMode(
const std::map<std::string, Parallel::StorageMode> &storageModes) const {
// There is an optional input workspace which may have
// StorageMode::Distributed but it is merely used for passing an instrument.
// Output should always have StorageMode::Cloned, so we run with
// ExecutionMode::Identical.
static_cast<void>(storageModes);
return Parallel::ExecutionMode::Identical;
}
} // namespace Mantid } // namespace Mantid
} // namespace DataHandling } // namespace DataHandling
...@@ -458,5 +458,15 @@ void LoadDiffCal::exec() { ...@@ -458,5 +458,15 @@ void LoadDiffCal::exec() {
makeCalWorkspace(detids, difc, difa, tzero, dasids, offset, use); makeCalWorkspace(detids, difc, difa, tzero, dasids, offset, use);
} }
Parallel::ExecutionMode LoadDiffCal::getParallelExecutionMode(
const std::map<std::string, Parallel::StorageMode> &storageModes) const {
// There is an optional input workspace which may have
// StorageMode::Distributed but it is merely used for passing an instrument.
// Output should always have StorageMode::Cloned, so we run with
// ExecutionMode::Identical.
static_cast<void>(storageModes);
return Parallel::ExecutionMode::Identical;
}
} // namespace DataHandling } // namespace DataHandling
} // namespace Mantid } // namespace Mantid
...@@ -500,6 +500,7 @@ CloneWorkspace all ...@@ -500,6 +500,7 @@ CloneWorkspace all
Comment all Comment all
CompareWorkspace MasterOnly, Identical if one input has ``StorageMode::Cloned`` and the other has ``StorageMode::MasterOnly`` then ``ExecutionMode::MasterOnly`` is used, with ``ExecutionMode::MasterOnly`` the workspaces always compare equal on non-master ranks CompareWorkspace MasterOnly, Identical if one input has ``StorageMode::Cloned`` and the other has ``StorageMode::MasterOnly`` then ``ExecutionMode::MasterOnly`` is used, with ``ExecutionMode::MasterOnly`` the workspaces always compare equal on non-master ranks
CompressEvents all CompressEvents all
ConvertDiffCal MasterOnly, Identical
ConvertToHistogram all ConvertToHistogram all
ConvertToPointData all ConvertToPointData all
ConvertUnits all ``AlignBins`` not supported; for indirect energy mode the number of resulting bins is in general inconsistent across MPI ranks ConvertUnits all ``AlignBins`` not supported; for indirect energy mode the number of resulting bins is in general inconsistent across MPI ranks
...@@ -529,8 +530,10 @@ Load all actual supported ...@@ -529,8 +530,10 @@ Load all actual supported
LoadAscii2 Identical see ``IFileLoader`` LoadAscii2 Identical see ``IFileLoader``
LoadAscii Identical see ``IFileLoader`` LoadAscii Identical see ``IFileLoader``
LoadBBY Identical see ``IFileLoader`` LoadBBY Identical see ``IFileLoader``
LoadCalFile Identical
LoadCanSAS1D Identical see ``IFileLoader`` LoadCanSAS1D Identical see ``IFileLoader``
LoadDaveGrp Identical see ``IFileLoader`` LoadDaveGrp Identical see ``IFileLoader``
LoadDiffCal Identical
LoadEmptyInstrument Identical see ``IFileLoader`` LoadEmptyInstrument Identical see ``IFileLoader``
LoadEventNexus Distributed storage mode of output cannot be changed via a parameter currently, min and max bin boundary are not globally the same LoadEventNexus Distributed storage mode of output cannot be changed via a parameter currently, min and max bin boundary are not globally the same
LoadEventPreNexus2 Identical see ``IFileLoader`` LoadEventPreNexus2 Identical see ``IFileLoader``
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment