Skip to content

Commit 56ccb8b

Browse files
committed
GPU: Add overrideNHbfPerTF option
1 parent 2ab8d92 commit 56ccb8b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

GPU/GPUTracking/Definitions/GPUSettingsList.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ BeginSubConfig(GPUSettingsO2, global, configStandalone, "O2", 0, "O2 workflow se
526526
AddOption(solenoidBzNominalGPU, float, -1e6f, "", 0, "Field strength of solenoid Bz in kGaus")
527527
AddOption(constBz, bool, false, "", 0, "force constant Bz for tests")
528528
AddOption(continuousMaxTimeBin, int32_t, 0, "", 0, "maximum time bin of continuous data, 0 for triggered events, -1 for default of 23ms")
529+
AddOption(overrideNHbfPerTF, int32_t, 0, "", 0, "Overrides the number of HBF per TF if != 0")
529530
AddOption(deviceType, std::string, "CPU", "", 0, "Device type, CPU | CUDA | HIP | OCL1 | OCL2")
530531
AddOption(forceDeviceType, bool, true, "", 0, "force device type, otherwise allows fall-back to CPU")
531532
AddOption(synchronousProcessing, bool, false, "", 0, "Apply performance shortcuts for synchronous processing, disable unneeded steps")

GPU/Workflow/src/GPUWorkflowSpec.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void GPURecoWorkflowSpec::init(InitContext& ic)
156156
mAutoSolenoidBz = mConfParam->solenoidBzNominalGPU == -1e6f;
157157
mAutoContinuousMaxTimeBin = mConfig->configGRP.continuousMaxTimeBin == -1;
158158
if (mAutoContinuousMaxTimeBin) {
159-
mConfig->configGRP.continuousMaxTimeBin = (256 * o2::constants::lhc::LHCMaxBunches + 2 * o2::tpc::constants::LHCBCPERTIMEBIN - 2) / o2::tpc::constants::LHCBCPERTIMEBIN;
159+
mConfig->configGRP.continuousMaxTimeBin = ((mConfParam->overrideNHbfPerTF ? mConfParam->overrideNHbfPerTF : 256) * o2::constants::lhc::LHCMaxBunches + 2 * o2::tpc::constants::LHCBCPERTIMEBIN - 2) / o2::tpc::constants::LHCBCPERTIMEBIN;
160160
}
161161
if (mConfig->configProcessing.deviceNum == -2) {
162162
int32_t myId = ic.services().get<const o2::framework::DeviceSpec>().inputTimesliceId;
@@ -583,7 +583,7 @@ void GPURecoWorkflowSpec::run(ProcessingContext& pc)
583583
mTFSettings->tfStartOrbit = tinfo.firstTForbit;
584584
mTFSettings->hasTfStartOrbit = 1;
585585
mTFSettings->hasNHBFPerTF = 1;
586-
mTFSettings->nHBFPerTF = GRPGeomHelper::instance().getGRPECS()->getNHBFPerTF();
586+
mTFSettings->nHBFPerTF = mConfParam->overrideNHbfPerTF ? mConfParam->overrideNHbfPerTF : GRPGeomHelper::instance().getGRPECS()->getNHBFPerTF();
587587
mTFSettings->hasRunStartOrbit = 0;
588588
if (mVerbosity) {
589589
LOG(info) << "TF firstTForbit " << mTFSettings->tfStartOrbit << " nHBF " << mTFSettings->nHBFPerTF << " runStartOrbit " << mTFSettings->runStartOrbit << " simStartOrbit " << mTFSettings->simStartOrbit;
@@ -1016,7 +1016,7 @@ void GPURecoWorkflowSpec::doCalibUpdates(o2::framework::ProcessingContext& pc, c
10161016
mConfig->configGRP.continuousMaxTimeBin = (mTFSettings->nHBFPerTF * o2::constants::lhc::LHCMaxBunches + 2 * o2::tpc::constants::LHCBCPERTIMEBIN - 2) / o2::tpc::constants::LHCBCPERTIMEBIN;
10171017
newCalibValues.newContinuousMaxTimeBin = true;
10181018
newCalibValues.continuousMaxTimeBin = mConfig->configGRP.continuousMaxTimeBin;
1019-
LOG(info) << "Updating max time bin " << newCalibValues.continuousMaxTimeBin;
1019+
LOG(info) << "Updating max time bin " << newCalibValues.continuousMaxTimeBin << " (" << mTFSettings->nHBFPerTF << " orbits)";
10201020
}
10211021

10221022
if (!mPropagatorInstanceCreated) {

0 commit comments

Comments
 (0)