JustInTimeFcl

From Mu2eWiki
Jump to navigation Jump to search

Introduction

Example

Below is an example of using JustInTimeFcl framework for the cosmic resampling stage.

Setting Up Environment: SimJob, mu2etools and mu2egrid

source /cvmfs/mu2e.opensciencegrid.org/setupmu2e-art.sh
muse setup SimJob MDC2020aa
setup sam_web_client
setup mu2egrid

Append the content below to the file called "template.fcl"

#include "Production/JobConfig/cosmic/S2Resampler.fcl"
#include "Production/JobConfig/cosmic/S2ResamplerLow.fcl"
outputs.PrimaryOutput.fileName: "dts.owner.CosmicCORSIKALow.version.sequencer.art"

Prepare input file list - retrieve a list of files related to a given definition and append the first 10 filenames into CosmicDSStop.txt:

samweb list-definition-files sim.mu2e.CosmicDSStopsCORSIKALow.MDC2020ab.art | head -n 10 > CosmicDSStop.txt

Prepare the job definition file (tarball)

mu2ejobdef --dsconf MDC2020ab --dsowner mu2e --run-number 1203 --desc CosmicCORSIKALow --embed template.fcl --events-per-job 500000 --auxinput=1:physics.filters.CosmicResampler.fileNames:CosmicDSStop.txt --setup /cvmfs/mu2e.opensciencegrid.org/Musings/SimJob/MDC2020aa/setup.sh

Another example:

echo '#include "Offline/CRVResponse/test/wideband/wideband4modules.fcl"' >> template.fcl
echo 'source.module_type: EmptyEvent' >> template.fcl
mu2ejobdef --jobdesc=CosmicWidebandCRY --dsconf=MDC2020ae_best_v1_3 --dsowner=mu2e --run-number=103001 --events-per-job=10000 --embed template.fcl --setup /cvmfs/mu2e.opensciencegrid.org/Musings/SimJob/MDC2020ae/setup.sh --jobdesc=CosmicWidebandCRY --dsconf=MDC2020ae_best_v1_3 --dsowner=mu2e


Inspect fcl file content

mu2ejobfcl --jobdef cnf.mu2e.CosmicCORSIKALow.MDC2020ab.0.tar --index 1 --default-proto root --default-loc tape

Submit your job - mu2ejobsub submits the job. It specifies the job definition file (--jobdef), the range of job indices to submit (--firstjob, --njobs), and default protocol to access input files and output location location

mu2ejobsub --jobdef cnf.mu2e.CosmicCORSIKALow.MDC2020ab.0.tar --firstjob=0 --njobs=10 --default-protocol root --default-location tape

Extract input files:

mu2ejobiodetail --jobdef cnf.mu2e.CosmicCORSIKALow.MDC2020ab.0.tar --index 1 --inputs