11Parallel::ExecutionMode
13 using namespace Parallel;
14 const auto nonMasterOnly = std::find_if(storageModes.cbegin(), storageModes.cend(), [](
const auto &element) {
15 return element.second != StorageMode::MasterOnly;
17 if (nonMasterOnly != storageModes.cend()) {
18 throw std::runtime_error(nonMasterOnly->first +
" must have " + Parallel::toString(StorageMode::MasterOnly));
20 return getCorrespondingExecutionMode(StorageMode::MasterOnly);
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.