Failed to parse the configuration file 'subrun_wrapper.fcl': Can't find key dune_tfile_metadata
It appears that DUNE configuration requires a job FHiCL file to include
sam_dune.fcl, or else the submitted job terminates with art code 90 and:
$ cat larStage0.err Failed to parse the configuration file 'subrun_wrapper.fcl' with exception ---- Parse error BEGIN Local lookup error ---- Can't find key BEGIN dune_tfile_metadata (at part "dune_tfile_metadata") ---- Can't find key END at line 9, character 29, of file "./Stage0.fcl" included from line 1 of file "./subrun_wrapper.fcl" services.TFileMetadataDUNE: @local::dune_tfile_metadata ^ ---- Parse error END
This must be seldom a problem because
sam_dune.fcl is included by
services_dune.fcl, which in turn is commonly included in user configuration files.
The reason I tripped into this problem is that my configuration is spread across some local files, and rather than copying all of them to the job, I choose to use
fhicl-dump utility to generate the configuration to submit. Since my job was not explicitly configuring the metadata, that utility removed the unused configuration that is instead required by the wrapping configuration.
A solution is to modify the wrapper to include the necessary configuration files before including user's job configuration, with a line like: