-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend CMSSW to a distributed application over MPI #32632
base: master
Are you sure you want to change the base?
Conversation
A new Pull Request was created by @fwyzard (Andrea Bocci) for CMSSW_11_2_X. It involves the following packages: HeterogeneousCore/MPICore @makortel, @cmsbuild, @fwyzard can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32632/20729 ERROR: Build errors found during clang-tidy run.
|
please test |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32632/20747 ERROR: Build errors found during clang-tidy run.
|
please test |
+1 Size: This PR adds an extra 40KB to repository Comparison SummarySummary:
|
Note: this is a quick workaround to let the device code use the device collection, while being able to access the actual number of pf rechits on the host side. It should replaced with a better and more general implementation, and the use of the host collection should be removed.
Let multiple CMSSW processes on the same or different machines coordinate event processing and transfer data products over MPI. The implementation is based on four CMSSW modules. Two are responsible for setting up the communication channels and coordinate the event processing: - the MPIController - the MPISource and two are responsible for the transfer of data products: - the MPISender - the MPIReceiver . The MPIController is an EDProducer running in a regular CMSSW process. After setting up the communication with an MPISource, it transmits to it all EDM run, lumi and event transitions, and instructs the MPISource to replicate them in the second process. The MPISource is a Source controlling the execution of a second CMSSW process. After setting up the communication with an MPIController, it listens for EDM run, lumi and event transitions, and replicates them in its process. Both MPIController and MPISource produce an MPIToken, a special data product that encapsulates the information about the MPI communication channel. The MPISender is an EDProducer that can read a collection of a predefined type from the Event, serialise it using its ROOT dictionary, and send it over the MPI communication channel. The MPIReceiver is an EDProducer that can receive a collection of a predefined type over the MPI communication channel, deserialise is using its ROOT dictionary, and put it in the Event. Both MPISender and MPIReceiver are templated on the type to be transmitted and de/serialised. Each MPISender and MPIReceiver is configured with an instance value that is used to match one MPISender in one process to one MPIReceiver in another process. Using different instance values allows the use of multiple MPISenders/MPIReceivers in a process. Both MPISender and MPIReceiver obtain the MPI communication channel reading an MPIToken from the event. They also produce a copy of the MPIToken, so other modules can consume it to declare a dependency on the previous modules. An automated test is available in the test/ directory.
Let MPISender and MPIReceiver consume, send/receive and produce collections of arbitrary types, as long as they have a ROOT dictionary and can be persisted. Note that any transient information is lost during the transfer, and needs to be recreated by the receiving side. The documentation and tests are updated accordingly. Warning: this approach is a work in progress! TODO: - improve framework integration - add checks between send/receive types
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32632/42857
|
Pull request #32632 was updated. @Dr15Jones, @cmsbuild, @fwyzard, @jfernan2, @makortel, @mandrenguyen, @smuzaffar can you please check and sign again. |
please test |
+1 Size: This PR adds an extra 28KB to repository Comparison SummarySummary:
|
type ngt |
PR description:
Let multiple CMSSW processes on the same or different machines coordinate event processing and transfer data products over MPI.
The implementation is based on four CMSSW modules.
Two are responsible for setting up the communication channels and coordinate the event processing:
MPIController
MPISource
and two are responsible for the transfer of data products:
MPISender
MPIReceiver
.
The
MPIController
is anEDProducer
running in a regular CMSSW process. After setting up the communication with anMPISource
, it transmits to it all EDM run, lumi and event transitions, and instructs theMPISource
to replicate them in the second process.The
MPISource
is aSource
controlling the execution of a second CMSSW process. After setting up the communication with anMPIController
, it listens for EDM run, lumi and event transitions, and replicates them in its process.Both
MPIController
andMPISource
produce anMPIToken
, a special data product that encapsulates the information about the MPI communication channel.The
MPISender
is anEDProducer
that can read one or more collections from the Event, serialise them using their ROOT dictionaries, and send them over the MPI communication channel.The
MPIReceiver
is anEDProducer
that can receive a set number of collections over the MPI communication channel, deserialise them using their ROOT dictionaries, and put them in the Event with a configurable instance label.In principle any non-transient collection with a ROOT dictionary can be transmitted. Any transient information is lost during the transfer, and needs to be recreated by the receiving side.
Each
MPISender
andMPIReceiver
is configured with an instance value that is used to match oneMPISender
in one process to oneMPIReceiver
in another process. Using different instance values allows the use of multipleMPISenders
/MPIReceivers
in a process.Both
MPISender
andMPIReceiver
obtain the MPI communication channel reading anMPIToken
from the event. They also produce a copy of theMPIToken
, so other modules can consume it to declare a dependency on the previous modules.An automated test is available in the
test/
directory.Current limitations
MPIDriver
is a "one" module that supports only a single luminosity block at a time;MPISender
andMPIReceiver
support a single compile-time type;MPISender
matches the type expected by theMPIReceiver
.Expected future developments
PortableCollection
types;MPISender
and the one expected by theMPIReceiver
match;extend theMPISender
andMPIReceiver
to send and receive multiple collections;rewrite theMPISender
andMPIReceiver
to send and receive arbitrary run-time collections;MPIController
to be aglobal
module rather than aone
module;MPISource
accept connections and events from multipleMPIController
modules in different jobs;MPIController
connect and sent events to multipleMPISource
modules in different jobs;ProcessingHistory
from theMPIController
to theMPISource
? and vice-versa ?MPIController
to theMPISource
? and vice-versa ?ProcessingHistory
as the ongoing run ?PR validation:
This PR includes an automated unit test.