Skip to content

Commit

Permalink
Merge pull request #37064 from makortel/simplfyEnsureAccelerator
Browse files Browse the repository at this point in the history
Small simplification in ensureAvailableAccelerators()
  • Loading branch information
cmsbuild committed Feb 25, 2022
2 parents 141b02e + 0ba0c9f commit 79b7fbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FWCore/Framework/src/ensureAvailableAccelerators.cc
Expand Up @@ -8,11 +8,11 @@ namespace edm {
void ensureAvailableAccelerators(edm::ParameterSet const& parameterSet) {
auto const& selectedAccelerators =
parameterSet.getUntrackedParameter<std::vector<std::string>>("@selected_accelerators");
ParameterSet const& optionsPset(parameterSet.getUntrackedParameterSet("options"));
if (selectedAccelerators.empty()) {
Exception ex(errors::UnavailableAccelerator);
ex << "The system has no compute accelerators that match the patterns specified in "
"process.options.accelerators:\n";
ParameterSet const& optionsPset(parameterSet.getUntrackedParameterSet("options"));
auto const& patterns = optionsPset.getUntrackedParameter<std::vector<std::string>>("accelerators");
for (auto const& pat : patterns) {
ex << " " << pat << "\n";
Expand Down

0 comments on commit 79b7fbf

Please sign in to comment.