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

complete transitioning preparelocal to args via JSON #5288

Open
2 tasks done
belforte opened this issue Jan 30, 2024 · 3 comments
Open
2 tasks done

complete transitioning preparelocal to args via JSON #5288

belforte opened this issue Jan 30, 2024 · 3 comments

Comments

@belforte
Copy link
Member

belforte commented Jan 30, 2024

bulding up on #5276 and #5287 two things are needed in order to fully deprecated old code and remove it

@belforte
Copy link
Member Author

belforte commented Nov 7, 2024

better do this now that I am fresh of "tarballs and preparelocal refactoring"
as per dmwm/CRABServer#6544 (comment)

@belforte
Copy link
Member Author

belforte commented Jan 8, 2025

the single JSON file with all arguments is now prepared by DagmanCreator https://github.com/dmwm/CRABServer/blob/97e7e253fe35a2b0c2c02e88babd188737a39ece/src/python/TaskWorker/Actions/DagmanCreator.py#L704-L712
and is part of the InputFiles.tar.gz tarball which is prepared for every task and put in S3.

So the first step will be to use that file in CMSRunAnalysis.py passing to the script simple the jobId as argument instead of the current
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)"
dmwm/CRABServer#8869

@belforte
Copy link
Member Author

belforte commented Jan 10, 2025

a new version of preparelocal is now in my branch https://github.com/belforte/CRABClient/tree/use-json-file-for-job-args-5288 and works. But it requires the modified CMSRunAnalysis.py.
I do not see any easy way to make this backward compatible, would need to somehow detect the version of CMSRunAnalyis.py inside preparelocal.py, doable but very ugly and possibly fragile.

So this change can only be pushed to Client once TW has been changed in production and all old tasks completed.
It is instead very easy to keep supporting --json argument to CMSRunAnalyisis.py, i.e. have the new TW backward compatible with current client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant