ExecutionMode.h 1.12 KB
Newer Older
1
2
3
4
5
6
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI,
//     NScD Oak Ridge National Laboratory, European Spallation Source
//     & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
7
#pragma once
8
9

#include "MantidParallel/DllConfig.h"
10
#include "MantidParallel/StorageMode.h"
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#include <string>

namespace Mantid {
namespace Parallel {

/** Execution mode used for an Algorithm in an MPI build.

  Invalid: Indicates a state where execution is not possible.
  Serial: Serial execution (non-MPI build or MPI build with single rank).
  Identical: Independent execution in the same way on each rank.
  Distributed: Distributed execution, may involve communication.
  MasterOnly: Execution only on the master rank.

  @author Simon Heybrock
  @date 2017
*/
enum class ExecutionMode {
  Invalid,
  Serial,
  Identical,
  Distributed,
  MasterOnly
};

36
37
38
MANTID_PARALLEL_DLL ExecutionMode
getCorrespondingExecutionMode(StorageMode storageMode);

39
40
41
42
MANTID_PARALLEL_DLL std::string toString(ExecutionMode mode);

} // namespace Parallel
} // namespace Mantid