13Parallel::ExecutionMode
15 using namespace Parallel;
16 if (std::any_of(storageModes.begin(), storageModes.end(),
17 [](
const std::pair<std::string, Parallel::StorageMode> &item) {
18 return item.second == StorageMode::Distributed;
20 if (std::any_of(storageModes.begin(), storageModes.end(),
21 [](
const std::pair<std::string, Parallel::StorageMode> &item) {
22 return item.second == StorageMode::MasterOnly;
24 return ExecutionMode::Invalid;
25 return ExecutionMode::Distributed;
27 if (std::any_of(storageModes.begin(), storageModes.end(),
28 [](
const std::pair<std::string, Parallel::StorageMode> &item) {
29 return item.second == StorageMode::MasterOnly;
31 return ExecutionMode::MasterOnly;
32 return ExecutionMode::Identical;
Parallel::ExecutionMode getParallelExecutionMode(const std::map< std::string, Parallel::StorageMode > &storageModes) const override
Get correct execution mode based on input storage modes for an MPI run.