EOY BnoC Spruce Bandwidth and Rate test
The snippet can be accessed without any authentication.
Authored by
Francesca Swystun
Adapted from RTA bandwidth test to run Spruce lines.
This can also be used to estimate the rate for your line, based on B2OC example (https://gitlab.cern.ch/lhcb/Moore/-/snippets/3292) for EOY re-sprucing, 2024. Uses FULL stream data samples with mu=5.2.
spruce_bnoc_bandwidth_example_eoy.py 5.64 KiB
###############################################################################
# (c) Copyright 2019-2024 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
"""BnoC options for running a set of sprucing lines -> dst to calculate BW. Also provide rate estimate. Run like any other options file:
./Moore/run gaudirun.py spruce_bnoc_bandwidth_example_eoy.py | tee spruce_bnoc_bandwidth_example_eoy.log
file_size = ls -lh --si spruce_bnoc_bandwidth_example_eoy-dummystream.dst
b/w (GB/s) = input rate (75.49 kHz for this HLT2 output file) x file_size (MB) / options.evt_max
eff = grep "LAZY_AND: SpruceBnoC_<your line name>" spruce_bnoc_bandwidth_example_eoy.log
rate (kHz) = input rate (75.49 kHz for this HLT2 output file) x eff
input rate for these files taken from https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/tests/options/bandwidth/spruce_bandwidth_input.yaml?ref_type=heads
"""
from Moore import options, run_moore
from Moore.lines import optimize_controlflow
from Moore.streams import Stream, Streams
from Moore.persistence.hlt2_tistos import list_of_full_stream_lines
from Moore.monitoring import run_default_monitoring
from RecoConf.reconstruction_objects import reconstruction
from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
from PyConf.Algorithms import VeloRetinaClusterTrackingSIMD
from RecoConf.legacy_rec_hlt1_tracking import make_VeloClusterTrackingSIMD
from RecoConf.decoders import default_VeloCluster_source
from SprucingConfig.Spruce24.fullline_config.pp_Collision24c4 import full_lines as full_lines_for_TISTOS
from DDDB.CheckDD4Hep import UseDD4Hep
from Hlt2Conf.lines.bnoc import sprucing_lines
###############################################################################
# configure input data set
###############################################################################
if not UseDD4Hep:
raise RuntimeError("These inputs samples require a DD4Hep stack to be used!")
# Configure input data from testfiledb
input_files = [
'mdf:root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp1/data/EoY-spruce-2024/307781_00090010_0105.raw',
'mdf:root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp1/data/EoY-spruce-2024/307781_00090011_0074.raw',
'mdf:root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp1/data/EoY-spruce-2024/307781_00090012_0106.raw',
'mdf:root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp1/data/EoY-spruce-2024/307781_00090015_0004.raw',
'mdf:root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp1/data/EoY-spruce-2024/307781_00090015_0073.raw',
]
options.input_files = input_files
options.input_raw_format = 0.5
options.input_type = 'RAW'
options.simulation = False
options.data_type = 'Upgrade'
options.geometry_version = 'run3/2024.Q1.2-v00.00'
options.conditions_version = 'master'
options.input_process = "Hlt2"
options.scheduler_legacy_mode = False
# Set a reasonable number of events
options.evt_max = 100000
###############################################################################
# configure output files
###############################################################################
# Write the output file
options.output_file = "spruce_bnoc_bandwidth_example_eoy-dummystream.dst"
options.output_type = 'ROOT'
options.output_manifest_file = "spruce_bnoc_bandwidth_example_eoy-dummystream.tck.json"
#lines you want tested here
test_lines = []
def make_streams():
streams = [
Stream(
"dummystream",
#lines=[builder() for builder in sprucing_lines.values()], # whole module
lines = [sprucing_lines["SpruceBnoC_"+spruce_line_name]() for spruce_line_name in test_lines],
detectors=[]) # usual case - no detector raw banks
# detectors=DETECTORS) # if persisting detector raw banks
]
return Streams(streams=streams)
if UseDD4Hep:
from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc as DD4hepSvc
dd4hepSvc = DD4hepSvc()
dd4hepSvc.ConditionsLocation = 'git:/cvmfs/lhcb.cern.ch/lib/lhcb/git-conddb/lhcb-conditions-database.git'
# This needs to happen before the public tools are instantiated,
# which means we cannot put it inside make_streams().
from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
TrackMasterExtrapolator.global_bind(
ApplyMultScattCorr=False,
ApplyEnergyLossCorr=False,
ApplyElectronEnergyLossCorr=False)
TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
default_VeloCluster_source.global_bind(bank_type="VPRetinaCluster")
make_VeloClusterTrackingSIMD.global_bind(
algorithm=VeloRetinaClusterTrackingSIMD)
public_tools = [
trackMasterExtrapolator_with_simplified_geom(),
stateProvider_with_simplified_geom()
]
with list_of_full_stream_lines.bind(
lines=full_lines_for_TISTOS), reconstruction.bind(
from_file=True, spruce=True), optimize_controlflow.bind(
optimization="default"), run_default_monitoring.bind(
run=False):
config = run_moore(options, make_streams, public_tools=public_tools)
-
Update 17/03, correct input rate of these samples according to https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/tests/options/bandwidth/spruce_bandwidth_input.yaml?ref_type=heads
45.1 kHz
->75.49
Please register or sign in to comment