Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
mesmith75 committed Nov 24, 2023
1 parent 477abed commit 6265938
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ganga/GangaDirac/Lib/Splitters/OfflineGangaDiracSplitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,6 @@ def lookUpLFNReplicas(inputs, ignoremissing):
for _lfn in inputs:
LFNdict[_lfn.lfn] = _lfn

lfnset = set(allLFNs)
del_list = list(allLFNs)
for _l in lfnset:
del_list.remove(_l)
if len(del_list)>0:
raise SplitterError("Duplicate LFNs found, check your inputdata! %s" % del_list)

# Request the replicas for all LFN 'LFN_parallel_limit' at a time to not overload the
# server and give some feedback as this is going on
global LFN_parallel_limit
Expand Down Expand Up @@ -498,6 +491,15 @@ def OfflineGangaDiracSplitter(_inputs, filesPerJob, maxFiles, ignoremissing, ban
check_count = check_count + len(i)

if check_count != len(inputs) - len(bad_lfns):
#First check if there are duplicates causing this problem
allLFNs = [_lfn.lfn for _lfn in inputs]
lfnset = set(allLFNs)
del_list = list(allLFNs)
for _l in lfnset:
del_list.remove(_l)
if len(del_list)>0:
raise SplitterError("Duplicate LFNs found, check your inputdata! %s" % del_list)

logger.error("SERIOUS SPLITTING ERROR!!!!!")
logger.warning("%s != %s - %s" % (check_count, len(inputs), len(bad_lfns)))
logger.warning("inputs:\n%s" % str(inputs))
Expand Down

0 comments on commit 6265938

Please sign in to comment.