Enhance ACDC job creation logic to handle empty lumis and derive Firs…#12503
Open
hassan11196 wants to merge 1 commit into
Open
Enhance ACDC job creation logic to handle empty lumis and derive Firs…#12503hassan11196 wants to merge 1 commit into
hassan11196 wants to merge 1 commit into
Conversation
hassan11196
force-pushed
the
fix-acdc-mc-firstevent
branch
from
July 20, 2026 18:59
0a24092 to
f888501
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Derive ACDC MCFakeFile FirstEvent from lumis so pLHE ACDCs number events correctly
Fixes #12502
Status
ready
Description
For MC (
MCFakeFile) workflows, all failed-job ACDC documents of a task share a single LFN, soDataCollectionService.mergeFilesInfocollapses them into one entry that keeps thefirst_eventof anarbitrary failed job (whichever the CouchDB view returns first) while unioning the lumi lists.
EventBased.createACDCJobsthen stepped each job'sFirstEventsequentially from that merged base(
FirstEvent = merged_first_event + k * events_per_job), fully decoupled from the lumis the job wasactually assigned. Since each failed ACDC job re-uploads its (wrong) mask
FirstEventinto the nextround's ACDC doc (
CouchFileset.add), the error compounds on every ACDC round. ForlheInputFilesworkflows this
FirstEventbecomesLHESource skipEventsat runtime, so round 2+ seek past the end ofthe LHE file and the recovery deadlocks.
Changes in
src/python/WMCore/JobSplitting/EventBased.py(createACDCJobs):FirstEvent = (currentLumi - 1) * events_per_lumi + 1, and re-set the event mask with it (job eventcount is unchanged). This makes the mask self-consistent and ACDC-of-ACDC idempotent — a job
recovering a given set of lumis is numbered identically in every round, so the writeback loop can no
longer drift.
stop creating jobs instead of raising
IndexError(this also covers the overrun that fix: JobSubmitter lumi list index out of range #12497 guardsagainst).
The real-input ACDC path (distinct real-file LFNs, where
first_eventis a genuine skip into a realfile and
mergeFilesInfodoes not cross-contaminate) is untouched.Added unit tests in
test/python/WMCore_t/JobSplitting_t/EventBased_t.pyfor the previously-untestedcreateACDCJobsMC path: correct FirstEvent↔lumi mapping from a scrambled mergedfirst_event,non-contiguous lumis, and the events-exceed-lumis overrun guard.
Validated by replaying the real 198-doc ACDC collection of an affected pLHE workflow
(
cmsunified_task_SMP-RunIISummer20UL17pLHEGEN-00061__v1_T_260701_190821_3994) through the patchedsplitter: 198 jobs,
FirstEvent = (FirstLumi-1)*1000+1for 198/198, exact lumi coverage, eventsconserved, max
LastEvent = 992000within the 1,000,000-event LHE file (the old code would have endedat 1,194,000, past EOF).
Is it backward compatible (if not, which system it affects?)
YES
Only the event-range numbering of MCFakeFile ACDC job masks changes, and only to make it consistent
with the lumis being recovered (matching how the original
EventBasedMC splitting numbered them).Non-ACDC splitting and real-input ACDC splitting are unchanged. No schema, API, or ACDC-document format
change (the
acdc_version=2documents are read as-is).Related PRs
merged-doc inconsistency; the overrun guard in this PR covers the same case at the splitting stage.
Superseded by / overlaps with this change.
External dependencies / deployment changes
None.