Project

General

Profile

Bug #19334

GenieHelper gets stuck when no flux file is available

Added by Gianluca Petrillo almost 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Start date:
03/08/2018
Due date:
% Done:

100%

Estimated time:
Duration:

Description

See attached log. A configuration error caused no match in flux file search:

%MSG-i GENIEHelper:  GENIEGen:generator@Construction 08-Mar-2018 13:52:06 CST  ModuleConstruction
ExpandFluxFilePatternsIFDH initially found 0 files
%MSG
%MSG-d GENIEHelper:  GENIEGen:generator@Construction 08-Mar-2018 13:52:06 CST  ModuleConstruction
search paths: /pnfs/sbnd/persistent/users/zarko/bnb_gsimple_neutrino_sbnd
pattern [  0] gsimple_configB-v1_5e7POT_2018_02018.root found 0 files
%MSG
%MSG-i GENIEHelper:  GENIEGen:generator@Construction 08-Mar-2018 13:52:06 CST  ModuleConstruction

  expansion resulted in a null list for flux files
%MSG

and instead of bailing out, the job does... whatever, and looks stuck (in the attached log, the module CorsikaGen is running just before the GenieHelper-based module GENIEGen).

debug.log (16.3 KB) debug.log Debug output stream of the stuck job Gianluca Petrillo, 03/08/2018 02:28 PM

History

#1 Updated by Robert Hatcher almost 3 years ago

Which version of NuTools is this? The latest versions should encounter this:

    // no null path allowed for at least these
    if ( fFluxType.compare("numi")   == 0 ||
         fFluxType.compare("simple") == 0 ||
         fFluxType.compare("dk2nu")  == 0    ) {
      size_t nfiles = fSelectedFluxFiles.size();
      if ( nfiles == 0 ) {
        mf::LogError("GENIEHelper")
          << "For \"ntuple\" or \"simple_flux\", specification " 
          << "must resolve to at least one file" 
          << "\n  none were found user pattern(s): " 
          << patterntext.str()
          << "\n  using FW_SEARCH_PATH of: " 
          << spaths;

        throw cet::exception("NoFluxFiles")
          << "no flux files found for: " << patterntext.str();

      }
    }

https://cdcvs.fnal.gov/redmine/projects/nutools/repository/revisions/develop/entry/nutools/EventGeneratorBase/GENIE/GENIEHelper.cxx#L2495

Can you attach a fcl on can use to reproduce this; perhaps it's some odd edge-case.

#2 Updated by Robert Hatcher almost 3 years ago

Ah, never mind. Looking more carefully at the code I see this exception throw is one level too deep in a set of nested if's.

#3 Updated by Gianluca Petrillo almost 3 years ago

Note that I might be wrong on the cause of my job being stuck, since it turned out there were other problems in my test whose interactions with the reported problem are unclear to me.
The problem still remains that GenieHelper does not blink when it can't find flux files. My opinion is that when at least one pattern is specified, and no match at all is obtained, that's a configuration error.

#4 Updated by Gianluca Petrillo almost 3 years ago

Robert Hatcher wrote:

Which version of NuTools is this?

Oops! forgot to specify: v2_19_00, qualifiers e15:prof.

And the problem I mentioned was in fact that the flux type had been omitted (and it defaulted to mono?). Given the code you show, that might have walked around the exception throwing.

#5 Updated by Robert Hatcher over 2 years ago

  • Status changed from New to Resolved
  • Assignee set to Robert Hatcher
  • % Done changed from 0 to 90

For FluxType of dk2nu, gsimple and gnumi (aka ntuple_flux) cases the code properly notices when no files can be resolved from the given FluxSearchPaths and FluxFiles specified in the passed parameter set. In such cases it throws an informative exception. This should be FluxType used most of the beam related generation.

For FluxType mono (which shouldn't expect any files) it notices, but does nothing.

For FluxType atmo_* it proceeds further (past reading GENIE splines) but eventually makes note of the mismatch of listed flavors in GenFlavors and exits with an informative message.

Only for FluxType histogram does it proceed to a SEGV, though there are output messages mentioning the lack of flux files. This FluxType isn't not a "preferred" approach for event generation.

Since nothing gets "stuck" I'm going to declare this sufficiently done and "resolve" it.

#6 Updated by Robert Hatcher almost 2 years ago

  • % Done changed from 90 to 100
  • Status changed from Resolved to Closed

marking this as closed.

Also available in: Atom PDF