Review of CMSSW Provenance/Metadata for Thread Safety Issues

Complete: 4

Purpose of Page

This is meant to describe all registries used in cmsRun and evaluate their ability to work in the proposed threaded framework. In the 7_0_X release cycle, there are five such registries, the parameter set registry (pset::Registry), the parentage registry (ParentageRegistry), the process history registry (ProcessHistoryRegistry), the product registry (ProductRegistry), and the HLT configuration data registry (HLTConfigDataRegistry). This documents where data contained in these registries is modified during the run/lumi/event loop. The line numbers and code are current as of CMSSW_7_0_0_pre3.

parameter set registry (class pset::registry)

The parameter set registry is a singleton inheriting from the ThreadSafeRegistry template. It is a large registry, so having multiple parameter set registries is undesirable.

Modification potentially every event

  • L1Trigger/GlobalTrigger/src/ConvertObjectMapRecord.cc, line 205 -- namesPset.registerIt();

Modification when a new input file (primary or secondary) is opened

  • IOPool/Input/src/RootFile.cc, line 325 -- psetRegistry.insertMapped(pset);
  • IOPool/Streamer/src/StreamerInputSource.cc, line 187 -- psetRegistry.insertMapped(pset);

Modification when a new input file in a certain old format is opened

  • FWCore/ParameterSet/src/ParameterSetConverter.cc, line 90 -- pset.registerIt();
  • FWCore/ParameterSet/src/ParameterSetConverter.cc, line 108 -- pset::Registry::instance()->insertMapped(pset);
  • FWCore/ParameterSet/src/ParameterSetConverter.cc, line 140 -- pset.registerIt();
  • FWCore/Sources/src/DaqProvenanceHelper.cc, line 71 -- processParameterSet_.registerIt();

Modification when a user calls triggerNames() or triggerResultsByName() for certain old format files

  • FWCore/Common/src/EventBase.cc, line 89 -- fakePset.registerIt();

Modification when s_dummyPSet() is called (just inserts an empty parameter set) This should be removable

  • HLTrigger/HLTcore/src/HLTConfigData.cc, line 20 -- dummyPSet.registerIt();

parentage registry (class ParentageRegistry)

The parentage registry is a singleton inheriting from the ThreadSafeRegistry template. It may be a large registry, so having multiple parameter set registries may be undesirable.

Modification potentially every event

  • DataFormats/Provenance/src/ProductProvenance.cc, line 48 -- ParentageRegistry::instance()->insertMapped(*pPtr);
  • DataFormats/Provenance/src/ProductProvenance.cc, line 59 -- ParentageRegistry::instance()->insertMapped(*parentagePtr());

Modification when a new input file (primary or secondary) is opened

  • IOPool/Input/src/RootFile.cc, line 514 -- registry.insertMapped(parents);
  • IOPool/Input/src/RootFile.cc, line 552 -- registry.insertMapped(parents);

Resolution

The internal data structure used by ParentageRegistry was changed to a tbb::concurrent_unordered_map which allows thread-safe insertion and tranversal of the structure.

process history registry (class ProcessHistoryRegistry)

Each input source (primary and secondary) has its own independent process history registry. Each EDM/Root output file written by a PoolOutputModule also has its own process history registry, which is not discussed further here, as it is not a thread safety issue.

Modification potentially every event

  • FWCore/Framework/src/HistoryAppender.cc, line 40 -- processHistoryRegistry.registerProcessHistory(newProcessHistory);
  • IOPool/Streamer/src/StreamerInputSource.cc, line 244 -- processHistoryRegistryUpdate().registerProcessHistory(sendEvent_->processHistory());

Modification when a new input file (primary or secondary) is opened

  • DQMServices/FwkIO/plugins/DQMRootSource.cc, line 832 -- phr->registerProcessHistory(ph);
  • DQMServices/FwkIO/plugins/DQMRootSource.cc, line 844 -- phr->registerProcessHistory(ph);
  • IOPool/Input/src/RootFile.cc, line 399 -- processHistoryRegistry.registerProcessHistory(history);

Resolution

The HistoryAppender no longer modifies the ProcessHistoryRegistry. The SubProcess no longer shares the ProcessHistoryRegistry with the Source and instead has its own per concurrent transition copy of both the ProcessHistoryRegistry and the HistoryAppender.

product registry (class ProductRegistry)

There is one product registry accessible globally through a service. There are also other product registries local to single input or output files. These local registries are not a thread safety issue. Only the global registry is addressed here.

Modification potentially every event

  • None

Modification when a new input file (primary only) is opened

  • IOPool/Input/src/RootInputFileSequence.cc, line 307 -- std::string mergeInfo = productRegistryUpdate().merge(*rootFile_->productRegistry(), ...
  • IOPool/Input/src/RootInputFileSequence.cc, line 331 -- std::string mergeInfo = productRegistryUpdate().merge(*rootFile_->productRegistry(), ...
  • IOPool/Streamer/src/StreamerInputSource.cc, line 173 -- mergeIntoRegistry(*sd, productRegistryUpdate(), *branchIDListHelper(), subsequent);

HLT configuration data registry (class HLTConfigDataRegistry)

This registry is a singleton inheriting from the ThreadSafeRegistry template. This registry is not part of the framework, so it was not investigated for thread safety issues.
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2013-09-27 - ChrisDJones
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback