Hi Slava,


Yes, it's a combination of two poorly written pieces of code, both of which
are already in release and are not new to this PR
1) The TimeMemoryInfo.py code, as I have written, is replacing
process.options with a new object instead of just setting the wantSummary
to True.
2) The metUncertaintyTools checks if unscheduled mode is there by trying to
read 'process.options.allowUnscheduled' disregarding the fact that
allowUnscheduled is optional and so it might not be there (it should check
with hasattr(process,'allowUnscheduled') before)

What's happening is that:
1) cmDriver with --runUnscheduled sets process.options.allowUnscheduled to
True
2) then comes in TimeMemoryInfo.py which *erases* this information by
creating the new process.options  (bug 1)
3) the comes in metUncertaintyTools that realizes tries to look for
allowUnscheduled and fails (bug 2). However, even if metUncertaintyTools
were to be written correctly, the cfg produced by cmsDriver would stil be
broken because of bug 1 (since we had agreed that at least for now only
unscheduled execution is supported for the miniAOD)

If you want, I can update the pull requests with a commit to fix the first
bug in TimeMemoryInfo.py

For the second one, I'd leave to AnalysisTools to fix it in a separate PR,
as it's not clear to me if scheduled execution is supported for the
metUncertaintyTools or not: if yes, then the fix should be

     (not hasattr(process,'allowUnscheduled') or
process.options.allowUnscheduled == False)

but if only unscheduled is supported then the code should just throw an
exception there with a more readable error message

Ciao,

   Giovanni



On Thu, May 15, 2014 at 3:14 PM, Slava Krutelyov
<notifications@github.com>wrote:

> In Configuration/Applications/python/ConfigBuilder.py:
>
> > @@ -1591,7 +1590,14 @@ def prepare_RECO(self, sequence = "reconstruction"):
> >      def prepare_PAT(self, sequence = "miniAOD"):
> >          ''' Enrich the schedule with PAT '''
> >          self.loadDefaultOrSpecifiedCFF(sequence,self.PATDefaultCFF)
> > -	self.scheduleSequence(sequence.split('.')[-1],'pat_step')
> > +	if not self._options.runUnscheduled:	
> > +		raise Exception("MiniAOD production can only run in unscheduled mode, please run cmsDriver with --runUnscheduled")
> > +        if self._options.isData:
> > +            self._options.customisation_file.append("PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllData")
>
> I'm not sure I understand.
> The error shows up in the chain of miniAOD_customizeAllData call with
>
> /PhysicsTools/PatUtils/tools/metUncertaintyTools.py", line 1608, in toolCode
>     if addToPatDefaultSequence and process.options.allowUnscheduled == False:
> AttributeError: 'PSet' object has no attribute 'allowUnscheduled'
>
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cms-sw/cmssw/pull/3875/files#r12687761>
> .
>