Repository navigation
Reuse same instances in hybrid generator - #15983
jackal1-66 wants to merge 1 commit into
Conversation
99baa59 to
41ee248
Compare
|
Thanks @jackal1-66. This is a good step forward and should work fine. However, the reuse is implicit, which can be dangerous: it relies on two serialised configs matching exactly, so {
"mode": "sequential",
"generators": [
{ "name": "pythia8", "label": "mb",
"config": { "config": "$O2_ROOT/share/Generators/egconfig/pythia8_inel.cfg" } },
{ "cocktail": [
{ "ref": "mb" },
{ "name": "external",
"config": { "fileName": "${O2DPG_ROOT}/MC/config/PWGDQ/external/generator/GeneratorParamPromptJpsiToElectronEvtGen_pp13TeV.C",
"funcName": "GeneratorParamPromptJpsiToElectronEvtGen_pp13TeV()" } } ] }
],
"fractions": [3, 1]
}A whole cocktail can be labelled and referenced in the same way: "generators": [
{ "label": "jpsi", "cocktail": [ { "ref": "mb" }, { "name": "external", "config": { ... } } ] },
{ "ref": "mb" },
{ "ref": "jpsi" }
],
"fractions": [1, 3, 1]
I would recommend that a referenced entry reports the sub-generator ID of the entry it points to. I can propose an implementation on top of your branch, together with a small tool in O2DPG next to |
Launch single instances of generators which share the same exact configuration. This reduces configuration times and reduces memory usage as well. This is enabled by default, but it is configurable with a new parameter. In addition it is disabled by default when more than a single worker is set (per user decision)