diff --git a/FWCore/Framework/src/EventProcessor.cc b/FWCore/Framework/src/EventProcessor.cc index 67fc7d6317743..b3522a55e52d8 100644 --- a/FWCore/Framework/src/EventProcessor.cc +++ b/FWCore/Framework/src/EventProcessor.cc @@ -209,20 +209,14 @@ namespace edm { std::shared_ptr fillLooper(eventsetup::EventSetupsController& esController, eventsetup::EventSetupProvider& cp, - ParameterSet& params) { + ParameterSet& params, + std::vector const& loopers) { std::shared_ptr vLooper; - std::vector loopers = params.getParameter>("@all_loopers"); - - if (loopers.empty()) { - return vLooper; - } - assert(1 == loopers.size()); - for (std::vector::iterator itName = loopers.begin(), itNameEnd = loopers.end(); itName != itNameEnd; - ++itName) { - ParameterSet* providerPSet = params.getPSetForUpdate(*itName); + for (auto const& looperName : loopers) { + ParameterSet* providerPSet = params.getPSetForUpdate(looperName); validateLooper(*providerPSet); providerPSet->registerIt(); vLooper = eventsetup::LooperFactory::get()->addTo(esController, cp, *providerPSet); @@ -386,9 +380,6 @@ namespace edm { if (nStreams == 0) { nStreams = nThreads; } - if (nThreads > 1 or nStreams > 1) { - edm::LogInfo("ThreadStreamSetup") << "setting # threads " << nThreads << "\nsetting # streams " << nStreams; - } unsigned int nConcurrentRuns = optionsPset.getUntrackedParameter("numberOfConcurrentRuns"); if (nConcurrentRuns != 1) { throw Exception(errors::Configuration, "Illegal value nConcurrentRuns : ") @@ -397,8 +388,35 @@ namespace edm { unsigned int nConcurrentLumis = optionsPset.getUntrackedParameter("numberOfConcurrentLuminosityBlocks"); if (nConcurrentLumis == 0) { - nConcurrentLumis = nConcurrentRuns; + nConcurrentLumis = 2; } + if (nConcurrentLumis > nStreams) { + nConcurrentLumis = nStreams; + } + std::vector loopers = parameterSet->getParameter>("@all_loopers"); + if (!loopers.empty()) { + //For now loopers make us run only 1 transition at a time + if (nStreams != 1 || nConcurrentLumis != 1 || nConcurrentRuns != 1) { + edm::LogWarning("ThreadStreamSetup") << "There is a looper, so the number of streams, the number " + "of concurrent runs, and the number of concurrent lumis " + "are all being reset to 1. Loopers cannot currently support " + "values greater than 1."; + nStreams = 1; + nConcurrentLumis = 1; + nConcurrentRuns = 1; + } + } + bool dumpOptions = optionsPset.getUntrackedParameter("dumpOptions"); + if (dumpOptions) { + dumpOptionsToLogFile(nThreads, nStreams, nConcurrentLumis, nConcurrentRuns); + } else { + if (nThreads > 1 or nStreams > 1) { + edm::LogInfo("ThreadStreamSetup") << "setting # threads " << nThreads << "\nsetting # streams " << nStreams; + } + } + // The number of concurrent IOVs is configured individually for each record in + // the class NumberOfConcurrentIOVs to values less than or equal to this. + unsigned int maxConcurrentIOVs = nConcurrentLumis; //Check that relationships between threading parameters makes sense /* @@ -439,22 +457,18 @@ namespace edm { // intialize the event setup provider ParameterSet const& eventSetupPset(optionsPset.getUntrackedParameterSet("eventSetup")); - esp_ = espController_->makeProvider(*parameterSet, items.actReg_.get(), &eventSetupPset); + esp_ = espController_->makeProvider( + *parameterSet, items.actReg_.get(), &eventSetupPset, maxConcurrentIOVs, dumpOptions); // initialize the looper, if any - looper_ = fillLooper(*espController_, *esp_, *parameterSet); - if (looper_) { + if (!loopers.empty()) { + looper_ = fillLooper(*espController_, *esp_, *parameterSet, loopers); looper_->setActionTable(items.act_table_.get()); looper_->attachTo(*items.actReg_); - //For now loopers make us run only 1 transition at a time - nStreams = 1; - nConcurrentLumis = 1; - nConcurrentRuns = 1; // in presence of looper do not delete modules deleteNonConsumedUnscheduledModules_ = false; } - espController_->setMaxConcurrentIOVs(nStreams, nConcurrentLumis); preallocations_ = PreallocationConfiguration{nThreads, nStreams, nConcurrentLumis, nConcurrentRuns}; diff --git a/FWCore/Framework/src/EventSetupsController.cc b/FWCore/Framework/src/EventSetupsController.cc index 90649f33cce42..254d5c17782da 100644 --- a/FWCore/Framework/src/EventSetupsController.cc +++ b/FWCore/Framework/src/EventSetupsController.cc @@ -41,7 +41,9 @@ namespace edm { std::shared_ptr EventSetupsController::makeProvider(ParameterSet& iPSet, ActivityRegistry* activityRegistry, - ParameterSet const* eventSetupPset) { + ParameterSet const* eventSetupPset, + unsigned int maxConcurrentIOVs, + bool dumpOptions) { // Makes an EventSetupProvider // Also parses the prefer information from ParameterSets and puts // it in a map that is stored in the EventSetupProvider @@ -53,16 +55,12 @@ namespace edm { // EventSetupsController and in the EventSetupProvider fillEventSetupProvider(*this, *returnValue, iPSet); - numberOfConcurrentIOVs_.readConfigurationParameters(eventSetupPset); + numberOfConcurrentIOVs_.readConfigurationParameters(eventSetupPset, maxConcurrentIOVs, dumpOptions); providers_.push_back(returnValue); return returnValue; } - void EventSetupsController::setMaxConcurrentIOVs(unsigned int nStreams, unsigned int nConcurrentLumis) { - numberOfConcurrentIOVs_.setMaxConcurrentIOVs(nStreams, nConcurrentLumis); - } - void EventSetupsController::finishConfiguration() { if (mustFinishConfiguration_) { for (auto& eventSetupProvider : providers_) { diff --git a/FWCore/Framework/src/EventSetupsController.h b/FWCore/Framework/src/EventSetupsController.h index 149fce98865b7..6eb88662ab4a1 100644 --- a/FWCore/Framework/src/EventSetupsController.h +++ b/FWCore/Framework/src/EventSetupsController.h @@ -88,9 +88,9 @@ namespace edm { std::shared_ptr makeProvider(ParameterSet&, ActivityRegistry*, - ParameterSet const* eventSetupPset = nullptr); - - void setMaxConcurrentIOVs(unsigned int nStreams, unsigned int nConcurrentLumis); + ParameterSet const* eventSetupPset = nullptr, + unsigned int maxConcurrentIOVs = 0, + bool dumpOptions = false); // Pass in an IOVSyncValue to let the EventSetup system know which run and lumi // need to be processed and prepare IOVs for it (also could be a time or only a run). diff --git a/FWCore/Framework/src/NumberOfConcurrentIOVs.cc b/FWCore/Framework/src/NumberOfConcurrentIOVs.cc index f7364cc0d99e2..c61b37d1de0a4 100644 --- a/FWCore/Framework/src/NumberOfConcurrentIOVs.cc +++ b/FWCore/Framework/src/NumberOfConcurrentIOVs.cc @@ -16,11 +16,17 @@ namespace edm { NumberOfConcurrentIOVs::NumberOfConcurrentIOVs() : numberConcurrentIOVs_(1) {} - void NumberOfConcurrentIOVs::readConfigurationParameters(ParameterSet const* eventSetupPset) { + void NumberOfConcurrentIOVs::readConfigurationParameters(ParameterSet const* eventSetupPset, + unsigned int maxConcurrentIOVs, + bool dumpOptions) { if (eventSetupPset) { // this condition is false for SubProcesses + maxConcurrentIOVs_ = maxConcurrentIOVs; numberConcurrentIOVs_ = eventSetupPset->getUntrackedParameter("numberOfConcurrentIOVs"); - if (numberConcurrentIOVs_ == 0) { - numberConcurrentIOVs_ = 1; + if (numberConcurrentIOVs_ == 0 || numberConcurrentIOVs_ > maxConcurrentIOVs) { + numberConcurrentIOVs_ = maxConcurrentIOVs; + } + if (dumpOptions) { + LogAbsolute("Options") << "Number of Concurrent IOVs = " << numberConcurrentIOVs_; } ParameterSet const& pset(eventSetupPset->getUntrackedParameterSet("forceNumberOfConcurrentIOVs")); @@ -36,10 +42,6 @@ namespace edm { } } - void NumberOfConcurrentIOVs::setMaxConcurrentIOVs(unsigned int nStreams, unsigned int nConcurrentLumis) { - maxConcurrentIOVs_ = std::min(nStreams, nConcurrentLumis); - } - void NumberOfConcurrentIOVs::fillRecordsNotAllowingConcurrentIOVs(EventSetupProvider const& eventSetupProvider) { eventSetupProvider.fillRecordsNotAllowingConcurrentIOVs(recordsNotAllowingConcurrentIOVs_); } @@ -69,7 +71,7 @@ namespace edm { << "But you cannot have more concurrent IOVs than lumis or streams.\n" << "There will not be more than " << maxConcurrentIOVs_ << " concurrent IOVs.\n"; } - return std::min(numberConcurrentIOVs_, maxConcurrentIOVs_); + return numberConcurrentIOVs_; } void NumberOfConcurrentIOVs::clear() { diff --git a/FWCore/Framework/src/NumberOfConcurrentIOVs.h b/FWCore/Framework/src/NumberOfConcurrentIOVs.h index 15ac493eab05f..2081de9961243 100644 --- a/FWCore/Framework/src/NumberOfConcurrentIOVs.h +++ b/FWCore/Framework/src/NumberOfConcurrentIOVs.h @@ -36,10 +36,9 @@ namespace edm { public: NumberOfConcurrentIOVs(); - void readConfigurationParameters(ParameterSet const* eventSetupPset); - - // Can't have more concurrent IOVs than streams or concurrent lumis - void setMaxConcurrentIOVs(unsigned int nStreams, unsigned int nConcurrentLumis); + void readConfigurationParameters(ParameterSet const* eventSetupPset, + unsigned int maxConcurrentIOVs, + bool dumpOptions); // This depends on bool's hard coded in the EventSetupRecord C++ classes void fillRecordsNotAllowingConcurrentIOVs(EventSetupProvider const&); diff --git a/FWCore/Framework/test/BuildFile.xml b/FWCore/Framework/test/BuildFile.xml index 3db71c8809aa7..f6ed0840fc9bc 100644 --- a/FWCore/Framework/test/BuildFile.xml +++ b/FWCore/Framework/test/BuildFile.xml @@ -36,6 +36,8 @@ + + diff --git a/FWCore/Framework/test/run_concurrent_lumis.sh b/FWCore/Framework/test/run_concurrent_lumis.sh index c42dbb7714ff9..f3be7a9120dbf 100755 --- a/FWCore/Framework/test/run_concurrent_lumis.sh +++ b/FWCore/Framework/test/run_concurrent_lumis.sh @@ -12,4 +12,4 @@ touch empty_file (cmsRun ${LOCAL_TEST_DIR}/test_2_concurrent_lumis_cfg.py 2>&1) | tail -n 1 | grep -v ' 0 ' | grep -v 'e-' | diff - empty_file && die "Failure using test_2_concurrent_lumis_cfg.py" $? -exit 0 \ No newline at end of file +exit 0 diff --git a/FWCore/Framework/test/run_testOptions.sh b/FWCore/Framework/test/run_testOptions.sh new file mode 100755 index 0000000000000..67de84b298b73 --- /dev/null +++ b/FWCore/Framework/test/run_testOptions.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Capable of running 5 tests, this bash script expects a command line +# argument from 0 to 4 specifying which test to run + +LOCAL_TEST_DIR=${CMSSW_BASE}/src/FWCore/Framework/test +LOCAL_TMP_DIR=${CMSSW_BASE}/tmp/${SCRAM_ARCH} + +function die { echo Failure $1: status $2 ; exit $2 ; } + +pushd ${LOCAL_TMP_DIR} + +echo "Running run_testOptions.sh $1" + +# Configuration files and expected outputs for the 5 tests +configFiles=("testOptions0_cfg.py" "testOptions1_cfg.py" "testOptions2_cfg.py" "testOptions3_cfg.py" "testOptions4_cfg.py") +expectedStreams=(1 4 4 4 1) +expectedConcurrentLumis=(1 3 2 4 1) +expectedConcurrentIOVs=(1 2 2 4 1) + +cmsRun -p ${LOCAL_TEST_DIR}/${configFiles[$1]} >& ${configFiles[$1]}.log || die "cmsRun ${configFiles[$1]}" $? +grep "Number of Streams = ${expectedStreams[$1]}" ${configFiles[$1]}.log || die "Failed number of streams test" $? +grep "Number of Concurrent Lumis = ${expectedConcurrentLumis[$1]}" ${configFiles[$1]}.log || die "Failed number of concurrent lumis test" $? +grep "Number of Concurrent IOVs = ${expectedConcurrentIOVs[$1]}" ${configFiles[$1]}.log || die "Failed number of concurrent IOVs test" $? + +rm ${configFiles[$1]}.log + +popd + +exit 0 diff --git a/FWCore/Framework/test/testOptions0_cfg.py b/FWCore/Framework/test/testOptions0_cfg.py new file mode 100644 index 0000000000000..6e58c47e7375a --- /dev/null +++ b/FWCore/Framework/test/testOptions0_cfg.py @@ -0,0 +1,8 @@ +# Test of options when all parameters taken from Config.py +import FWCore.ParameterSet.Config as cms +process = cms.Process("TEST") +process.source = cms.Source("EmptySource") +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(1) +) +process.options.dumpOptions = True diff --git a/FWCore/Framework/test/testOptions1_cfg.py b/FWCore/Framework/test/testOptions1_cfg.py new file mode 100644 index 0000000000000..3f6afb732b272 --- /dev/null +++ b/FWCore/Framework/test/testOptions1_cfg.py @@ -0,0 +1,17 @@ +# Test of options when all parameters explicitly set +import FWCore.ParameterSet.Config as cms +process = cms.Process("TEST") +process.source = cms.Source("EmptySource") +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(1) +) + +process.options = dict( + dumpOptions = True, + numberOfThreads = 4, + numberOfStreams = 4, + numberOfConcurrentLuminosityBlocks = 3, + eventSetup = dict( + numberOfConcurrentIOVs = 2 + ) +) diff --git a/FWCore/Framework/test/testOptions2_cfg.py b/FWCore/Framework/test/testOptions2_cfg.py new file mode 100644 index 0000000000000..f9e63e827f757 --- /dev/null +++ b/FWCore/Framework/test/testOptions2_cfg.py @@ -0,0 +1,17 @@ +# Test of options when parameters are zero +import FWCore.ParameterSet.Config as cms +process = cms.Process("TEST") +process.source = cms.Source("EmptySource") +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(1) +) + +process.options = dict( + dumpOptions = True, + numberOfThreads = 4, + numberOfStreams = 0, + numberOfConcurrentLuminosityBlocks = 0, + eventSetup = dict( + numberOfConcurrentIOVs = 0 + ) +) diff --git a/FWCore/Framework/test/testOptions3_cfg.py b/FWCore/Framework/test/testOptions3_cfg.py new file mode 100644 index 0000000000000..be486f36b89d0 --- /dev/null +++ b/FWCore/Framework/test/testOptions3_cfg.py @@ -0,0 +1,17 @@ +# Test of options when concurrentIOVs and concurrentLumis are too big +import FWCore.ParameterSet.Config as cms +process = cms.Process("TEST") +process.source = cms.Source("EmptySource") +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(1) +) + +process.options = dict( + dumpOptions = True, + numberOfThreads = 4, + numberOfStreams = 4, + numberOfConcurrentLuminosityBlocks = 5, + eventSetup = dict( + numberOfConcurrentIOVs = 5 + ) +) diff --git a/FWCore/Framework/test/testOptions4_cfg.py b/FWCore/Framework/test/testOptions4_cfg.py new file mode 100644 index 0000000000000..33a2a86578753 --- /dev/null +++ b/FWCore/Framework/test/testOptions4_cfg.py @@ -0,0 +1,21 @@ +# Test of options when a looper is in the job +import FWCore.ParameterSet.Config as cms +process = cms.Process("TEST") +process.source = cms.Source("EmptySource") +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(1) +) + +process.options = dict( + dumpOptions = True, + numberOfThreads = 4, + numberOfStreams = 4, + numberOfConcurrentLuminosityBlocks = 7, + eventSetup = dict( + numberOfConcurrentIOVs = 7 + ) +) + +process.looper = cms.Looper("DummyLooper", + value = cms.untracked.int32(4) +) diff --git a/FWCore/Framework/test/test_global_modules_cfg.py b/FWCore/Framework/test/test_global_modules_cfg.py index a3c13335b8e1f..f7127453fe4f7 100644 --- a/FWCore/Framework/test/test_global_modules_cfg.py +++ b/FWCore/Framework/test/test_global_modules_cfg.py @@ -12,7 +12,8 @@ process.options = cms.untracked.PSet( numberOfStreams = cms.untracked.uint32(nStreams), - numberOfThreads = cms.untracked.uint32(nStreams) + numberOfThreads = cms.untracked.uint32(nStreams), + numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1) ) process.maxEvents = cms.untracked.PSet( diff --git a/FWCore/Framework/test/test_limited_modules_cfg.py b/FWCore/Framework/test/test_limited_modules_cfg.py index c4bc68fbcb3ec..5212373f9446e 100644 --- a/FWCore/Framework/test/test_limited_modules_cfg.py +++ b/FWCore/Framework/test/test_limited_modules_cfg.py @@ -12,7 +12,8 @@ process.options = cms.untracked.PSet( numberOfStreams = cms.untracked.uint32(nStreams), - numberOfThreads = cms.untracked.uint32(nStreams) + numberOfThreads = cms.untracked.uint32(nStreams), + numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1) ) diff --git a/FWCore/Framework/test/test_stream_modules_cfg.py b/FWCore/Framework/test/test_stream_modules_cfg.py index d0bce0d9afe0e..62304bd79868f 100644 --- a/FWCore/Framework/test/test_stream_modules_cfg.py +++ b/FWCore/Framework/test/test_stream_modules_cfg.py @@ -11,7 +11,8 @@ import FWCore.Framework.test.cmsExceptionsFatalOption_cff process.options = cms.untracked.PSet( numberOfStreams = cms.untracked.uint32(nStreams), - numberOfThreads = cms.untracked.uint32(nStreams) + numberOfThreads = cms.untracked.uint32(nStreams), + numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1) ) diff --git a/FWCore/ParameterSet/interface/validateTopLevelParameterSets.h b/FWCore/ParameterSet/interface/validateTopLevelParameterSets.h index 25b1b4c2621ae..e64ee1f2f9cd5 100644 --- a/FWCore/ParameterSet/interface/validateTopLevelParameterSets.h +++ b/FWCore/ParameterSet/interface/validateTopLevelParameterSets.h @@ -11,5 +11,9 @@ namespace edm { void fillMaxEventsDescription(ParameterSetDescription& description); void fillMaxLuminosityBlocksDescription(ParameterSetDescription& description); void fillMaxSecondsUntilRampdownDescription(ParameterSetDescription& description); + void dumpOptionsToLogFile(unsigned int nThreads, + unsigned int nStreams, + unsigned int nConcurrentLumis, + unsigned int nConcurrentRuns); } // namespace edm #endif diff --git a/FWCore/ParameterSet/python/Config.py b/FWCore/ParameterSet/python/Config.py index 13f78bbab98f2..22c7d7f463939 100644 --- a/FWCore/ParameterSet/python/Config.py +++ b/FWCore/ParameterSet/python/Config.py @@ -215,9 +215,9 @@ def defaultOptions_(): return untracked.PSet(numberOfThreads = untracked.uint32(1), numberOfStreams = untracked.uint32(0), numberOfConcurrentRuns = untracked.uint32(1), - numberOfConcurrentLuminosityBlocks = untracked.uint32(1), + numberOfConcurrentLuminosityBlocks = untracked.uint32(0), eventSetup = untracked.PSet( - numberOfConcurrentIOVs = untracked.uint32(1), + numberOfConcurrentIOVs = untracked.uint32(0), forceNumberOfConcurrentIOVs = untracked.PSet( allowAnyLabel_ = required.untracked.uint32 ) @@ -234,6 +234,7 @@ def defaultOptions_(): FailPath = untracked.vstring(), IgnoreCompletely = untracked.vstring(), canDeleteEarly = untracked.vstring(), + dumpOptions = untracked.bool(False), allowUnscheduled = obsolete.untracked.bool, emptyRunLumiMode = obsolete.untracked.string, makeTriggerResults = obsolete.untracked.bool @@ -2015,17 +2016,18 @@ def testProcessDumpPython(self): allowUnscheduled = cms.obsolete.untracked.bool, canDeleteEarly = cms.untracked.vstring(), deleteNonConsumedUnscheduledModules = cms.untracked.bool(True), + dumpOptions = cms.untracked.bool(False), emptyRunLumiMode = cms.obsolete.untracked.string, eventSetup = cms.untracked.PSet( forceNumberOfConcurrentIOVs = cms.untracked.PSet( allowAnyLabel_=cms.required.untracked.uint32 ), - numberOfConcurrentIOVs = cms.untracked.uint32(1) + numberOfConcurrentIOVs = cms.untracked.uint32(0) ), fileMode = cms.untracked.string('FULLMERGE'), forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False), makeTriggerResults = cms.obsolete.untracked.bool, - numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1), + numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(0), numberOfConcurrentRuns = cms.untracked.uint32(1), numberOfStreams = cms.untracked.uint32(0), numberOfThreads = cms.untracked.uint32(1), diff --git a/FWCore/ParameterSet/src/validateTopLevelParameterSets.cc b/FWCore/ParameterSet/src/validateTopLevelParameterSets.cc index f59e4d6a55680..3576021e6fcbf 100644 --- a/FWCore/ParameterSet/src/validateTopLevelParameterSets.cc +++ b/FWCore/ParameterSet/src/validateTopLevelParameterSets.cc @@ -1,5 +1,7 @@ #include "FWCore/ParameterSet/interface/validateTopLevelParameterSets.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/ParameterSet/interface/ThreadsInfo.h" @@ -12,20 +14,35 @@ namespace edm { + // NOTE: The defaults given here are not actually used when running cmsRun + // Those come from hard coded values in the Python code in Config.py + // The defaults here are used when running the edmPluginHelp utility so + // it is important the defaults in both places are consistent. + void fillOptionsDescription(ParameterSetDescription& description) { description.addUntracked("numberOfThreads", s_defaultNumberOfThreads) ->setComment("If zero, let TBB use its default which is normally the number of CPUs on the machine"); description.addUntracked("numberOfStreams", 0) - ->setComment("If zero, then set the number of streams to be the same as the number of threads"); + ->setComment( + "If zero, then set the number of streams to be the same as the number of " + "Threads (except always 1 if there is a looper)"); + description.addUntracked("numberOfConcurrentLuminosityBlocks", 0) + ->setComment( + "If zero, use Framework default (currently 2 when the number of streams >= 2, otherwise 1). " + "In all cases, the number of concurrent luminosity blocks will be reset to " + "be the same as the number of streams if it is greater than the " + "numbers of streams."); description.addUntracked("numberOfConcurrentRuns", 1); - description.addUntracked("numberOfConcurrentLuminosityBlocks", 1) - ->setComment("If zero, then set the same as the number of runs"); edm::ParameterSetDescription eventSetupDescription; - eventSetupDescription.addUntracked("numberOfConcurrentIOVs", 1) + eventSetupDescription.addUntracked("numberOfConcurrentIOVs", 0) ->setComment( - "If zero, set to 1. Can be overridden by hard coded static in record C++ definition or by " - "forceNumberOfConcurrentIOVs"); + "If zero, use the Framework default which currently means the same as the " + "number of concurrent luminosity blocks. Can be overridden by a hard coded " + "static in a record C++ definition or by forceNumberOfConcurrentIOVs. " + "In all cases, the number of concurrent IOVs will be reset to be the " + "same as the number of concurrent luminosity blocks if greater than the " + "number of concurrent luminosity blocks."); edm::ParameterSetDescription nestedDescription; nestedDescription.addWildcardUntracked("*")->setComment( "Parameter names should be record names and the values are the number of concurrent IOVS for each record." @@ -61,6 +78,11 @@ namespace edm { description.addUntracked>("canDeleteEarly", emptyVector) ->setComment("Branch names of products that the Framework can try to delete before the end of the Event"); + description.addUntracked("dumpOptions", false) + ->setComment( + "Print values of selected Framework parameters. The Framework might modify the values " + "in the options parameter set and this prints the values after that modification."); + description.addOptionalUntracked("allowUnscheduled") ->setComment( "Obsolete. Has no effect. Allowed only for backward compatibility for old Python configuration files."); @@ -131,4 +153,12 @@ namespace edm { } } + void dumpOptionsToLogFile(unsigned int nThreads, + unsigned int nStreams, + unsigned int nConcurrentLumis, + unsigned int nConcurrentRuns) { + LogAbsolute("Options") << "Number of Threads = " << nThreads << "\nNumber of Streams = " << nStreams + << "\nNumber of Concurrent Lumis = " << nConcurrentLumis + << "\nNumber of Concurrent Runs = " << nConcurrentRuns; + } } // namespace edm diff --git a/FWCore/TestProcessor/src/TestProcessor.cc b/FWCore/TestProcessor/src/TestProcessor.cc index 9b870bad14cd7..4864e53f94df4 100644 --- a/FWCore/TestProcessor/src/TestProcessor.cc +++ b/FWCore/TestProcessor/src/TestProcessor.cc @@ -119,7 +119,6 @@ namespace edm { auto nConcurrentRuns = 1U; preallocations_ = PreallocationConfiguration{nThreads, nStreams, nConcurrentLumis, nConcurrentRuns}; - espController_->setMaxConcurrentIOVs(nStreams, nConcurrentLumis); if (not iConfig.esProduceEntries().empty()) { esHelper_ = std::make_unique(iConfig.esProduceEntries()); esp_->add(std::dynamic_pointer_cast(esHelper_)); diff --git a/IOMC/RandomEngine/test/testMultiStream_cfg.py b/IOMC/RandomEngine/test/testMultiStream_cfg.py index 583d46a2ae2c6..96bc97da9486f 100644 --- a/IOMC/RandomEngine/test/testMultiStream_cfg.py +++ b/IOMC/RandomEngine/test/testMultiStream_cfg.py @@ -4,7 +4,8 @@ process = cms.Process("PROD") process.options = cms.untracked.PSet( - numberOfStreams = cms.untracked.uint32(3) + numberOfStreams = cms.untracked.uint32(3), + numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1) ) process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",