Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --jobId argument to CMSRunAnalysis.py #1572

Closed
4 tasks
belforte opened this issue Jan 8, 2025 · 1 comment
Closed
4 tasks

add --jobId argument to CMSRunAnalysis.py #1572

belforte opened this issue Jan 8, 2025 · 1 comment

Comments

@belforte
Copy link
Member

belforte commented Jan 8, 2025

Get rid of the awful long arg list in Job.submit (ref. dmwm/CRABClient#5288 (comment))
Arguments = "-a $(CRAB_Archive) --sourceURL=$(CRAB_ISB) --jobNumber=$(CRAB_Id) --cmsswVersion=$(CRAB_JobSW) --scramArch=$(CRAB_JobArch) '--inputFile=$(inputFiles)' '--runAndLumis=$(runAndLumiMask)' --lheInputFiles=$(lheInputFiles) --firstEvent=$(firstEvent) --firstLumi=$(firstLumi) --lastEvent=$(lastEvent) --firstRun=$(firstRun) --seeding=$(seeding) --scriptExe=$(scriptExe) --eventsPerLumi=$(eventsPerLumi) --maxRuntime=$(maxRuntime) '--scriptArgs=$(scriptArgs)' -o $(CRAB_AdditionalOutputFiles)"
and make it possible to use instead simply --jobId=$(CRAB_Id)

Now every task has input_args.json in its spool dir, so add it to list of transfer_input_files in Job.submit and add the new arg to CMSRunAnalysis.py

This will also allow to simplify the RunJobs.dag file where all those env.vars. are defined
VARS Job1 count="1" runAndLumiMask="job_lumis_1.json" lheInputFiles="False" firstEvent="None" firstLumi="None" lastEvent="None" firstRun="None" maxRuntime="-60" eventsPerLumi="None" seeding="AutomaticSeeding" inputFiles="job_input_file_list_1.txt" scriptExe="None" scriptArgs="[]" +CRAB_localOutputFiles="\"kk.root=kk_1.root\"" +CRAB_DataBlock="\"/GenericTTbar/HC-CMSSW_9_2_6_91X_mcRun1_realistic_v2-v2/AODSIM#3517e1b6-76e3-11e7-a0c8-02163e00d7b3\"" +CRAB_Destination="\"davs://eoscms.cern.ch:443/eos/cms/store/user/belforte/GenericTTbar/crab_20241216_165508/241218_101115/0000/log/cmsRun_1.log.tar.gz, davs://eoscms.cern.ch:443/eos/cms/store/user/belforte/GenericTTbar/crab_20241216_165508/241218_101115/0000/kk_1.root\""

Since everything is in input_args.json !

  • start by adding the new jobId arg so can test along current code
    • modify CMSRunAnalysis.py and test with preparelocal
    • modify Job.submit in DagmanCreator to transfer input_args.json (circa line 570) and replace args list with --jobId
  • eventually remove old code and possibly rename --jobId to --jobNumber
@belforte
Copy link
Member Author

belforte commented Jan 8, 2025

oopss. wrong repo

@belforte belforte closed this as completed Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant