Skip to content
Snippets Groups Projects
Commit c79d8bf6 authored by Marco Corvo's avatar Marco Corvo
Browse files

Set defaults for compression level in templates

parent 2241551a
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,7 @@ class ProductionRequest( object ):
self.specialOutputSEs = [] # a list of dictionaries - might be empty
self.outputSEsPerFileType = [] # a list of dictionaries - filled later
self.ancestorDepths = []
self.compDict = {'HIGH': 'Compression-LZMA-4', 'LOW':'Compression-ZLIB-1'}
self.compressionLvl = [''] # List: one compression level each step
self.appConfig = '$APPCONFIGOPTS/Persistency/' # Default location of the compression level configuration files
#
......@@ -147,7 +148,8 @@ class ProductionRequest( object ):
#
if len(self.compressionLvl) > count and self.compressionLvl[count] != '':
p = re.compile('Compression-[A-Z]{4}-[1-9]')
self.compressionLvl[count] = self.appConfig + self.compressionLvl[count] + '.py'
#self.compressionLvl[count] = self.appConfig + self.compressionLvl[count] + '.py'
self.compressionLvl[count] = self.appConfig + self.compDict[self.compressionLvl[count].upper()] + '.py'
if not p.search(value):
if value == '':
value = self.compressionLvl[count]
......
......@@ -35,13 +35,13 @@ def modifyCompression(dict1, dict2, lis1):
for k,v in dict1.items():
if v=='Y':
lis1[int(k)-1] = 'Compression-LZMA-4'
lis1[int(k)-1] = 'HIGH'
else:
if k in dict2.keys():
for _,v2 in dict2[k].items():
if v2=='Y':
lis1[int(k)-1] = 'Compression-LZMA-4'
lis1[int(k)-1] = 'HIGH'
return lis1
#
......@@ -110,7 +110,7 @@ extraOptions = '{{extraOptions#GENERAL: extra options as python dict stepID:opti
targets = '{{Target#PROD-1:MC: Target for MC (e.g. Tier2, ALL, LCG.CERN.cern#Tier2}}'
MCPriority = '{{MCPriority#PROD-1:MC: Production priority#0}}'
MCmulticoreFlag = '{{MCMulticoreFLag#PROD-1: multicore flag#True}}'
simulationCompressionLvl = '{{simulationCompressionLvl#PROD-1: Compression level#Compression-ZLIB-1}}'
simulationCompressionLvl = '{{simulationCompressionLvl#PROD-1: Compression level#LOW}}'
simulationOutputVisFlag = ast.literal_eval( '{{simulationOutputVisFlag#PROD-1: Simulation visibility flag dictionary (one flag per step {"step":"Y|N"}) # {} }}' )
try:
simulationOutputVisFlagSpecial = ast.literal_eval( '{{simulationOutputVisFlagSpecial#PROD-1: Special Visibility flag of output files (a dictionary {"step n":{("FType":flag)}} )#}}' )
......@@ -123,7 +123,7 @@ selectionPriority = '{{selectionPriority#PROD-2:Selection: Job Priority e.g. 8 b
selectionCPU = '{{selectionCPU#PROD-2:Selection: Max CPU time in secs#100000}}'
removeInputSelection = '{{removeInputSelection#PROD-2:Selection: remove inputs#True}}'
selmulticoreFlag = '{{selMulticoreFLag#PROD-2:Selection: multicore flag#True}}'
selectionCompressionLvl = '{{selectionCompressionLvl#PROD-2:Selection: Compression level#Compression-ZLIB-1}}'
selectionCompressionLvl = '{{selectionCompressionLvl#PROD-2:Selection: Compression level#LOW}}'
selectionOutputVisFlag = ast.literal_eval( '{{selectionOutputVisFlag#PROD-2: Selection visibility flag dictionary ({"step n": "Y|N"})# {} }}' )
try:
selectionOutputVisFlagSpecial = ast.literal_eval( '{{selectionOutputVisFlagSpecial#PROD-2: Special Visibility flag of output files (a dictionary {"step n":{"FType":flag}} )#}}' )
......@@ -137,7 +137,7 @@ mergingCPU = '{{mergingCPU#PROD-3:Merging: Max CPU time in secs#100000}}'
removeInputMerge = '{{removeInputMerge#PROD-3:Merging: remove inputs#True}}'
mergemulticoreFlag = '{{mergeMulticoreFLag#PROD-3:Merging: multicore flag#True}}'
mergeCompressionLvl = '{{mergeCompressionLvl#PROD-3:Merging: Compression level#Compression-LZMA-4}}'
mergeCompressionLvl = '{{mergeCompressionLvl#PROD-3:Merging: Compression level#HIGH}}'
mergeOutputVisFlag = ast.literal_eval( '{{mergeOutputVisFlag#PROD-3: Merge visibility flag dictionary ({"step":"Y|N"}) # {} }}')
try:
mergeOutputVisFlagSpecial = ast.literal_eval( '{{mergeOutputVisFlagSpecial#PROD-3: Special Visibility flag of output files (a dictionary {"step n":{"FType":flag}} )#}}' )
......
......@@ -80,7 +80,7 @@ recoType = '{{RecoType#PROD-1:RECO(Stripp): DataReconstruction or DataReprocessi
recoIDPolicy = '{{recoIDPolicy#PROD-1:RECO(Stripp): policy for input data access (download or protocol)#download}}'
recoMulticoreFlag = '{{recoMulticoreFLag#PROD-1: multicore flag#True}}'
recoAncestorDepth = int( '{{recoAncestorDepth#PROD-1: Ancestor Depth#0}}' )
recoCompressionLvl = '{{recoCompressionLvl#PROD-1: compression level#Compression-ZLIB-1}}'
recoCompressionLvl = '{{recoCompressionLvl#PROD-1: compression level#LOW}}'
recoOutputVisFlag = '{{recoOutputVisFlag#PROD-1: Visibility flag of output files #Y}}'
try:
recoOutputVisFlagSpecial = ast.literal_eval( '{{recoOutputVisFlagSpecial#PROD-1: Special Visibility flag of output files (dict FType:Y|N )#}}' )
......@@ -100,7 +100,7 @@ except SyntaxError:
strippIDPolicy = '{{strippIDPolicy#PROD-2:Stripping: policy for input data access (download or protocol)#download}}'
strippMulticoreFlag = '{{strippMulticoreFLag#PROD-2: multicore flag#True}}'
strippAncestorDepth = int( '{{strippAncestorDepth#PROD-2: Ancestor Depth#0}}' )
strippCompressionLvl = '{{strippCompressionLvl#PROD-2: compression level#Compression-ZLIB-1}}'
strippCompressionLvl = '{{strippCompressionLvl#PROD-2: compression level#LOW}}'
strippOutputVisFlag = '{{strippOutputVisFlag#PROD-2: Visibility flag of output files#N}}'
try:
strippOutputVisFlagSpecial = ast.literal_eval( '{{strippOutputVisFlagSpecial#PROD-2: Special Visibility flag of output files (dict FType:Y|N)#}}' )
......@@ -120,7 +120,7 @@ except SyntaxError:
mergingIDPolicy = '{{MergeIDPolicy#PROD-3:Merging: policy for input data access (download or protocol)#download}}'
mergingRemoveInputsFlag = '{{MergeRemoveFlag#PROD-3:Merging: remove input data flag True/False#True}}'
mergeMulticoreFlag = '{{mergeMulticoreFLag#PROD-3: multicore flag#True}}'
mergeCompressionLvl = '{{mergeCompressionLvl#PROD-3: compression level#Compression-LZMA-4}}'
mergeCompressionLvl = '{{mergeCompressionLvl#PROD-3: compression level#HIGH}}'
mergeOutputVisFlag = '{{mergeOutputVisFlag#PROD-3: Visibility flag of output files#Y}}'
try:
mergeOutputVisFlagSpecial = ast.literal_eval( '{{mergeOutputVisFlagSpecial#PROD-3: Special Visibility flag of output files (dict FType:Y|N)#}}' )
......
......@@ -117,7 +117,7 @@ p1outputMode = '{{P1OutputMode#PROD-P1: output mode#Local}}'
p1eventsRequested = '{{P1EventsRequested#PROD-P1: events requested (-1 = ALL)#-1}}'
p1ancestorDepth = int( '{{P1AncestorDepth#PROD-P1: ancestor depth#0}}' )
try:
p1compressionLvl = ast.literal_eval( '{{P1CompressionLevel#PROD-P1: Compression Level per step, e.g. ["Compression-ZLIB-1","Compression-LZMA-4"]#Compression-ZLIB-1}}' )
p1compressionLvl = ast.literal_eval( '{{P1CompressionLevel#PROD-P1: Compression Level per step, e.g. ["LOW","HIGH"]#LOW}}' )
except SyntaxError:
p1compressionLvl = []
p1OutputVisFlag = '{{P1OutputVisFlag#PROD-P1: Visibility flag of output files (a dict {"n step":flag})#{"1":"N"}}}'
......@@ -146,7 +146,7 @@ p2outputMode = '{{P2OutputMode#PROD-P2: output mode#Local}}'
p2eventsRequested = '{{P2EventsRequested#PROD-P2: events requested (-1 = ALL)#-1}}'
p2ancestorDepth = int( '{{P2AncestorDepth#PROD-P2: ancestor depth#0}}' )
try:
p2compressionLvl = ast.literal_eval( '{{P2CompressionLevel#PROD-P2: Compression Level per step, e.g. ["Compression-ZLIB-1","Compression-LZMA-4"]#Compression-ZLIB-1}}' )
p2compressionLvl = ast.literal_eval( '{{P2CompressionLevel#PROD-P2: Compression Level per step, e.g. ["LOW","HIGH"]#LOW}}' )
except SyntaxError:
p2compressionLvl = []
p2OutputVisFlag = '{{P2OutputVisFlag#PROD-P2: Visibility flag of output files (a dict {"n step":flag})#{"1":False}}}'
......@@ -175,7 +175,7 @@ p3outputMode = '{{P3OutputMode#PROD-P3: output mode#Any}}'
p3eventsRequested = '{{P3EventsRequested#PROD-P3: events requested (-1 = ALL)#-1}}'
p3ancestorDepth = int( '{{P3AncestorDepth#PROD-P3: ancestor depth#0}}' )
try:
p3compressionLvl = ast.literal_eval( '{{P3CompressionLevel#PROD-P3: Compression Level per step, e.g. ["Compression-ZLIB-1","Compression-LZMA-4"]#Compression-LZMA-4}}' )
p3compressionLvl = ast.literal_eval( '{{P3CompressionLevel#PROD-P3: Compression Level per step, e.g. ["LOW","HIGH"]#HIGH}}' )
except SyntaxError:
p3compressionLvl = []
p3OutputVisFlag = '{{P3OutputVisFlag#PROD-P3: Visibility flag of output files (a dict {"n step":flag})#{"1":False}}}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment