TWiki> LHCb Web>LHCbPR (29 Mar 2019, _2fDC_3dch_2fDC_3dcern_2fOU_3dOrganic_20Units_2fOU_3dUsers_2fCN_3dkzarebsk_2fCN_3d763242_2fCN_3dKristian_20Alexander_20Zarebski? ) EditAttach

LHCbPR & Test Development

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.

Test Handlers

In order for LHCbPR to be able to identify what outputs from the performed tests are required to be uploaded to the server for displaying the plots/important data are selected and the packaged via python scripts called Handler files. These exist within the LHCbPR2HD GitLab repository. Each test has its own handler file containing an instance of the core handler class. Instructions and information are available on the page for the repository found here.

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.

starttest.png

You will then see a drop down menu:

testform.png

  • 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)
testsched.png

From this I can tell:

  1. The project is Gauss
  2. The platform is x86_64-slc6-gcc62-opt
  3. The group is GAUSS-MuonMSc
  4. The enviroment is lb-run (You only take the part before the pipe)
  5. The runner is lhcbpr
  6. 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


Handlers for LHCbPR https://gitlab.cern.ch/lhcb-core/LHCbPR2HD

Gauss Nightly Build Configurations (Environment Information) https://gitlab.cern.ch/lhcb-core/LHCbNightlyConf/blob/master/Gauss.py

LHCb Progress & Regression (LHCbPR2? ) https://lblhcbpr.cern.ch

Scheduling of the tests in LHCbPR: https://gitlab.cern.ch/lhcb-core/LHCbNightlyConf/blob/master/test_schedule2.xml

LHCb Nightlies https://lbnightlies.cern.ch/

-- Main.Kristian Alexander Zarebski - 16 Feb 2018
Topic attachments
I Attachment History Action Size Date Who Comment
Pngpng starttest.png r2 r1 manage 108.2 K 28 Feb 2018 - 13:06 UnknownUser  
Pngpng testform.png r3 r2 r1 manage 61.2 K 28 Feb 2018 - 13:10 UnknownUser  
Pngpng testsched.png r1 manage 44.3 K 28 Feb 2018 - 12:33 UnknownUser  
Edit | Attach | Watch | Print version | History: r15 < r14 < r13 < r12 < r11 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r15 - 29 Mar 2019 - _2fDC_3dch_2fDC_3dcern_2fOU_3dOrganic_20Units_2fOU_3dUsers_2fCN_3dkzarebsk_2fCN_3d763242_2fCN_3dKristian_20Alexander_20Zarebski?
 
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback