LHCb Progress & Regression is a web based client designed to provide a means of easily comparing different builds of LHCb software. As part of the contribution made by Birmingham, we are responsible for maintaining some of the benchmark tests used to monitor the variation in Geant4 and Gauss simulations. At time of writing, use of the option
--nightly-cvmfs is now deprecated, nightlies no longer existing on CMFS.
Development
Using lb-dev to Develop LHCb Software
LbLogin -c <any platform the nightly was built on>
lb-dev --nightly <nightly name> [day] Gauss/<name of version in nightly> [--name]
git lb-use Gauss
git lb-checkout Gauss/<name of Git branch> <package>
# Make Changes to Package
make -j8
# Test changes! If they work and you're happy with them
git add /all/the/files/I/worked/on
git commit -m "Updated blah..."
git lb-push <package> <JIRAID>.<Description>
Note: Do not use '*' when adding files to a commit! This results in other files you did not develop also being added. As an example case let's say we would like to make changes to the
master version of
Sim/SimChecks package within Gauss, and we would like to work with the nightly
lhcb-gauss-dev that has built
Gauss/HEAD using
x86_64-slc6-gcc7-opt:
LbLogin -c x86_64-slc6-gcc7-opt
lb-dev --nightly lhcb-gauss-dev Gauss/HEAD
cd GaussDev_HEAD
git lb-use Gauss
git lb-checkout Gauss/master Sim/SimChecks
# code, code, code...
git add Sim/SimChecks/a/file
git commit -m "Updated file"
git lb-push LHCBGAUSS-XXYY.FileUpdate
Building a Full Package
Sometimes development will require compiling a whole package, for example some changes to C++ code require a full compilation, in order to obtain a full version of Gauss you will need to use the
lbn-install command specifying the nightly slot you require from
https://lhcb-nightlies.cern.ch/nightly/summary/ to fetch a local approporiate version of GEANT4 to build from. Note also that if a special unreleased version of other packages is used you will need to include this in the list of projects also. For example, at the time of writing
lhcb-sim09-cmake slot required
LHCb/sim09-patches, as the name suggests this is a special build for testing.
mkdir Gauss_Sandbox
cd Gauss_Sandbox
lbn-install --nodeps --projects=GEANT4[,other-projects-required] --platform=x86_64-slc6-gcc62-opt lhcb-g4r103 Today
cd lhcb-g4r103/Today
Now we need to obtain a copy of Gauss from
GitLab? , it is important to know which version you are developing (at the time of writing Sim09 and HEAD were the two main builds):
git clone ssh://git@gitlab.cern.ch:7999/lhcb/Gauss.git GAUSS/GAUSS_HEAD
cd GAUSS/GAUSS_HEAD
Now we merge in any merge requests we want to include or if you want to merge in changes from another build e.g. changes in the sim09 branch into master) you should cherry-pick these changes to avoid conflicts:
git config --add remote.origin.fetch +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*
git fetch --all
git merge --no-ff origin/merge-requests/request-ID
git cherry-pick commit-ID
Now we initialise the project to create a makefile:
lb-project-init
In order for the build to use the correct versions of required packages we need to edit the
CMakeLists? .txt file, the information on which versions were used in the nightly can be found in Gauss Nightly Build Configurations
https://gitlab.cern.ch/lhcb-core/LHCbNightlyConf/blob/master/Gauss.py, the version of GEANT4 to be used should match the local one you obtained earlier:
-gaudi_project(Gauss v52r0
+gaudi_project(Gauss HEAD
FORTRAN
- USE LHCb v42r6p2
- Geant4 96r4p7
+ USE LHCb v43r1
+ Geant4 HEAD
in the same location you will find the environment variable information, you will need to set these correctly also:
unset VERBOSE
export CMAKEFLAGS="-DCMAKE_USE_CCACHE=ON"
export CCACHE_DIR="$PWD/.ccache"
export CMTPROJECTPATH = /path/to/workdir/Today:/afs/cern.ch/lhcb/software/DEV/nightlies:/cvmfs/lhcbdev.cern.ch/lib/lcg/releases:/cvmfs/lhcb.cern.ch/lib/lcg/releases:/cvmfs/sft.cern.ch/lcg/releases:${CMAKE_PREFIX_PATH}:/afs/cern.ch/sw/lcg/releases:$CMTPROJECTPATH
Now we can build Gauss:
make -j4 && make unsafe-install && make post-install
Now you can edit the software and simply rebuild once you are happy with the changes.
Running a test manually
You might want to schedule your test to run to see if the whole chain (test -> handler -> lhcbpr) works without having to wait for whenever your test is scheduled to run in the week. To do this you will need to navigate to
https://lhcb-nightlies.cern.ch/periodic/summary/ and ensure you are logged in. You can then click the
orange button on the right which says
Start new periodic test.
You will then see a drop down menu:
- Slot: Refers to the nightly slot you would like to run the test on, you can find the nightlies slots at https://lhcb-nightlies.cern.ch/nightly/summary/
- Build: This a number which designates which day's nightly build to use, can also be found at the above address
- The Rest: The rest of the information can be found in https://gitlab.cern.ch/lhcb-core/LHCbNightlyConf/blob/master/test_schedule2.xml for example (for the muon test here)
From this I can tell:
- The project is Gauss
- The platform is x86_64-slc6-gcc62-opt
- The group is GAUSS-MuonMSc
- The enviroment is lb-run (You only take the part before the pipe)
- The runner is lhcbpr
- The os label is perf
Once all the fields have been filled in you can click
start test.
There may be some delay in starting as you will need to wait for a machine to become available but it should be much quicker than having to wait for your scheduled time each week. You can monitor the progress from
https://lhcb-nightlies.cern.ch/periodic/summary/ , in progress jobs are highlighted in blue, yellow means test success but handler failure, red means test failed, green means test was successful and handler worked.
Simulation Links
Gauss Nightly Build Configurations (Environment Information)
https://gitlab.cern.ch/lhcb-core/LHCbNightlyConf/blob/master/Gauss.pyLHCb Progress & Regression (
LHCbPR2? )
https://lblhcbpr.cern.chScheduling of the tests in
LHCbPR:
https://gitlab.cern.ch/lhcb-core/LHCbNightlyConf/blob/master/test_schedule2.xmlLHCb Nightlies
https://lbnightlies.cern.ch/-- Main.Kristian Alexander Zarebski - 16 Feb 2018