Running old DaVinci with Ganga 8 on lxplus
If you are doing LHCb Run 2 analysis right now (in 2026, say), you will at some point need to run an old DaVinci version ( v42r, v45r, etc.) through the current Ganga 8.x installation on lxplus. The tooling has moved on since those versions were the default, and a few things no longer work the way the old documentation says they should. This post collects the real issues you will hit and how to fix them.
The short version
What you might try
What you should do instead
j.application = DaVinci()
j.application = GaudiExec()
j.application.optsfile =
j.application.options =
j.application.extraopts = "..."
Put those settings in an extra options file
os.path.dirname(file) in options
Hardcode the absolute AFS path
ganga -c "someCommand()"
Write a one-line script and run ganga script.py
The long version with more explanation follows below.
1. Use GaudiExec, not DaVinci()
Ganga 8 removed the legacy DaVinci() application type. It relied on SetupProject.sh, which is long gone. The modern equivalent is GaudiExec, which uses a local CMake-built environment.
One-time setup: create the DaVinci dev environment
prepare_davinci.py — run once with: ganga prepare_davinci.py
prepareGaudiExec ( ' DaVinci ', ' v42r8p3 ', myPath = ' /ganga ' )
This creates DaVinciDev_v42r8p3/ inside myPath. It only needs to be done once per version. Don't delete that directory - it is tarballed and sent to the grid workers with every job.
Per-job setup: in your submission script, point GaudiExec at the prepared directory:
J. application = GaudiExec ( )
J. application. directory = ' /ganga/DaVinciDev_v42r8p3 '
J. application. platform = ' x86_64-centos7-gcc62-opt '
J. application. options = [ ' MyOptions.py ', ' conditions_2016MagUp.py ' ]
2. Find the right platform
Old DaVinci versions were not compiled for x86_64-centos7-gcc8-opt (the current lxplus default). Check what is available:
lb-run --list-platforms DaVinci/v42r8p3
For anything in the v42–v45 range compi…