Skip to content

Commit

Permalink
add example for parallel event gen
Browse files Browse the repository at this point in the history
  • Loading branch information
sawenzel committed Dec 10, 2024
1 parent ca5b99c commit d02acbb
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
9 changes: 9 additions & 0 deletions run/SimExamples/Hybrid_parallel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- doxy
\page refrunSimExamplesHybrid Example Hybrid_parallel
/doxy -->

Demonstrating how the Hybrid generator can be setup with multiple clones of the same
generator to speedup event generation (for a single timeframe).

- **run_parallel.sh** main example shell script
- **hybridconfig_parallel.json** &rarr; example JSON file for the hybrid generator configuration
53 changes: 53 additions & 0 deletions run/SimExamples/Hybrid_parallel/hybridconfig_parallel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"mode" : "parallel",
"generators": [
{
"name": "pythia8",
"config": {
"config": "$O2_ROOT/share/Generators/egconfig/pythia8_inel.cfg",
"hooksFileName": "",
"hooksFuncName": "",
"includePartonEvent": false,
"particleFilter": "",
"verbose": 0
}
},
{
"name": "pythia8",
"config": {
"config": "$O2_ROOT/share/Generators/egconfig/pythia8_inel.cfg",
"hooksFileName": "",
"hooksFuncName": "",
"includePartonEvent": false,
"particleFilter": "",
"verbose": 0
}
},
{
"name": "pythia8",
"config": {
"config": "$O2_ROOT/share/Generators/egconfig/pythia8_inel.cfg",
"hooksFileName": "",
"hooksFuncName": "",
"includePartonEvent": false,
"particleFilter": "",
"verbose": 0
}
},
{
"name": "pythia8",
"config": {
"config": "$O2_ROOT/share/Generators/egconfig/pythia8_inel.cfg",
"hooksFileName": "",
"hooksFuncName": "",
"includePartonEvent": false,
"particleFilter": "",
"verbose": 0
}
}
],
"fractions": [
1,
1
]
}
11 changes: 11 additions & 0 deletions run/SimExamples/Hybrid_parallel/run_parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
#
# Hybrid generator simulation example in which multiple clones of the same generator
# are listed in a JSON file (hybridconfig_parallel.json in this folder). These multiple
# clones are running in parallel to produce events faster.

$NEV=100
$WORKERS=8

# Starting simulation with Hybrid generator in parallel mode
${O2_ROOT}/bin/o2-sim --noGeant -j 1 --field ccdb --vertexMode kCCDB --run 300000 --configKeyValues "GeneratorHybrid.configFile=$PWD/hybridconfig_parallel.json;GeneratorHybrid.randomize=false;GeneratorHybrid.num_workers=${WORKERS}" -g hybrid -o genevents_parallel --timestamp 1546300800000 --seed 836302859 -n $NEV
1 change: 1 addition & 0 deletions run/SimExamples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* \subpage refrunSimExamplesHepMC_STARlight
* \subpage refrunSimExamplesHepMC_EPOS4
* \subpage refrunSimExamplesHybrid
* \subpage refrunSimExamplesHybrid_parallel
* \subpage refrunSimExamplesJet_Embedding_Pythia8
* \subpage refrunSimExamplesMcTracksToAOD
* \subpage refrunSimExamplesMcTracksToAOD
Expand Down

0 comments on commit d02acbb

Please sign in to comment.