I >>>> development of TDAQ software with TDAQ-7.0.0 local installation ====================================================================== Setting up environment for developing: source /project/atlas/tdaq/setup/setupdev7.sh cmake_config can now be used without further setup This is what the script contains: export TDAQ_LOCAL_PATH=/project/atlas/tdaq/tdaq7 export CMTCONFIG=x86_64-slc6-gcc62-opt source $TDAQ_LOCAL_PATH/tdaq/tdaq-07-00-00/installed/setup.sh export MAKEFLAGS="-j12 QUICK=1" export TDAQ_VERSION=tdaq-07-00-00 export GITROOT=https://:@gitlab.cern.ch:8443/atlas-tdaq-software # cmake export PATH=/project/atlas/tdaq/cmake/bin:$PATH export LD_LIBRARY_PATH=/project/atlas/tdaq/cmake/lib:$LD_LIBRARY_PATH export MANPATH=/project/atlas/tdaq/cmake/man:$MANPATH export CMAKE_PREFIX_PATH=$TDAQ_LOCAL_PATH:$TDAQ_LOCAL_PATH/tdaq-common/tdaq-common-02-01-00/installed/share/cmake export PATH=$TDAQ_LOCAL_PATH/tdaq-common/tdaq-common-02-01-00/installed/share/cmake_tdaq/bin:$PATH # gdb export PATH=/project/atlas/tdaq/gdb/bin:$PATH export LD_LIBRARY_PATH=/project/atlas/tdaq/gdb/lib:$LD_LIBRARY_PATH export MANPATH=/project/atlas/tdaq/gdb/share/man:$MANPATH # gcc 6.2.0 local source $TDAQ_LOCAL_PATH/gcc/6.2.0/x86_64-slc6/setup.sh export MANPATH=$TDAQ_LOCAL_PATH/gcc/6.2.0/x86_64-slc6/share/man:$MANPATH # python export PATH=$TDAQ_LOCAL_PATH/LCG_87/Python/2.7.10/x86_64-slc6-gcc62-opt/bin:$PATH On some machines gcc6.2 and cmake are also available in /localstore/usr, then this can be used: source /localstore/usr/setupdev7.sh IIA >>>> FELIX software with local installation of LCG software (LCG_84, gcc4.9.3): =================================================================================== 1. In the software directory: export LCG_BASE=/project/atlas/tdaq/lcg84 source cmake_tdaq/bin/setup.sh cmake_config cd x86_64-slc6-gcc49-opt make -j12 NB: make - j12: use 12 threads to buid in parallel. 2. lcg84 contains the contents of the lcg directory in: https://atlas-project-felix.web.cern.ch/atlas-project-felix/dev/cvmfs/cvmfs-felix-84-1.tar.gz IIB >>>> FELIX software with local installation of LCG software (LCG_87, gcc4.6.0): =================================================================================== 1. In the software directory: export LCG_BASE=/project/atlas/tdaq/lcg87 source cmake_tdaq/bin/setup.sh x86_64-slc6-gcc62-opt cmake_config x86_64-slc6-gcc62-opt cd x86_64-slc6-gcc62-opt make -j12 NB: make - j12: use 12 threads to buid in parallel. 2. lcg87 contains the contents of the lcg directory in: https://atlas-project-felix.web.cern.ch/atlas-project-felix/dev/cvmfs/cvmfs-felix-87-0.tar.gz IIC >>>> FELIX software with local installation of TDAQ-7-0-0 / LCG_87 software: ================================================================================ 1. In the directory with the local installation of the TDAQ /LCG software (/project/atlas/tdaq/tdaq7) add these links: ln -s . contrib ln -s . releases cd gcc ln -s 6.2.0 6.2 This has been done 2. The TDAQ / LCG software does not (yet)contain CMake, the standerd version is too old, an up-to-date version is installed in /project/atlas/tdaq/cmake. For setting this up and for setting LCG_BASE: source /project/atlas/tdaq/setup/setupflx.sh source cmake_tdaq/bin/setup.sh x86_64-slc6-gcc62-opt cmake_config x86_64-slc6-gcc62-opt cd x86_64-slc6-gcc62-opt make -j12 3. Building single package, e.g. elinkconfig: - cd x86_64-slc6-gcc49-opt/elinkconfig - make 4. For interactive debugging: add -g to set(CMAKE_CXX_FLAGS in CMakeLists.txt file, e.g. for fel: set(CMAKE_CXX_FLAGS "-Wall -g") 5. For information: the cmake_tdaq/bin/setup.sh script basically does this: export BINARY_TAG=x86_64-slc6-gcc62-opt mkdir $BINARY_TAG cd $BINARY_TAG cmake -DBUILDNAME=$BINARY_TAG -DCMAKE_MODULE_PATH=$PWD/../cmake_tdaq/cmake/modules -DLCG_VERSION=87 -DCMAKE_BUILD_TYPE=Release $PWD/.. CMAKE_MODULE_PATH is a standard cmake variable, the .cmake files in cmake_tdaq/cmake/modules define the contents of the Makefiles III >>>> Using qtcreator ======================== Using qtcreator with program, e.g. with pepo: - start qtcreator from command line, after having setup the environment - File -> New File or Project -> Import Project -> Import Existing Project - select the directory pepo (in software) as Location and type a suitable name as Project name (e.g. pepoproject) - click Next, a dialog box opens with all source files marked as belonging to the project - click Next, and select for "Add to version control" (it could be possible to use git from qtcreator, but this has not been tested) - click Finish - the source code can now be browsed, for compilation in qtcreator it is necessary to set up a "kit" and to specify the build directory - click Projects at the left of the window of qtcreator - click "Manage Kits .." at the top left, a new window opens ins which "Build & Run" is selected - click Add at the right, an entry will be added with the name "Unnamed" and choices for compiler, debugger, Qt and CMake. Set the appropriate versions. Under the "Qt versions", "Compilers", "Debuggers" and "CMake" tabs the possible choices are defined. Therefore first check these and add the missing choices here. Choices: C++: /project/atlas/tdaq/tdaq700/sw/lcg/contrib/gg/6.2/x86_64-slc6/bin gdb: /project/atlas/tdaq/gdb/bin/gdb Qt: /project/atlas/tdaq/qt57/5.7/gcc_64/bin/qmake CMake: /project/atlas/tdaq/cmake/bin/cmake - after setting up the kit close the window and specify the build directory, this should be the directory in the x86_64-slc6-gcc62-opt directory with the name of the program to be built (pepo in our example) - the program can now be built by clicking the hammer at the bottom left or by using the build menu. The output of the compiler is available under the tab "4 Compile Output" at the bottom of the window. After double clciking an issues or error the file associated is opened and teh cursor is positioned at the line with the error - interactive symbolic debugging with stepping through the code, inspection of variables and setting of breakpoints is possible, using the debug menu or after clicking the green arrow with the bug at the bottom left of the qtcreator window. qtcreator version that works with gcc6.2.0 and gdb7.12 (launch it from the command line after setting up environment, e.g. after "source /project/atlas/tdaq/setup/setupflx.sh"): /project/atlas/tdaq/qtcreator42/bin/qtcreator On some machines qtcreator is also available in /localstore/usr, then this can be used: /localstore/usr/qtcreator42/bin/qtcreator IV >>>> Information concerning use of cmake for developing TDAQ software ======================================================================== https://twiki.cern.ch/twiki/bin/viewauth/Atlas/DaqHltCMake V >>>> Information concerning installing the TDAQ and LCG software locally (using ayum) ======================================================================================= https://twiki.cern.ch/twiki/bin/view/Atlas/DaqHltCMake#Installing_the_RPMs For installation in e.g. /project/atlas/tdaq/tdaq7: mkdir /project/atlas/tdaq/tdaq7 cd /project/atlas/tdaq/tdaq7 git clone https://:@gitlab.cern.ch:8443/rhauser/ayum.git bash >> edit ayum.conf [main] exactarch=0 gpgcheck=0 plugins=1 tolerant=1 # List of repositories reposdir=/project/atlas/tdaq/tdaq7/ayum/etc/yum.repos.d # YUM internal area persistdir=/project/atlas/tdaq/tdaq7/ayum/var/lib/yum # Private plugin path, avoid system plugins pluginpath=/project/atlas/tdaq/tdaq7/ayum/src/yum-plugins pluginconfpath=/project/atlas/tdaq/tdaq7/ayum/etc/yum/pluginconf.d # Path to private RPM repository (--dbpath option to RPM) dbpath=/project/atlas/tdaq/tdaq7/.rpmdb # Path to software install area (--prefix option to RPM) prefix=/project/atlas/tdaq/tdaq7 # Path to AYUM specific cache directory cachedir=/project/atlas/tdaq/tdaq7/.yumcache >>> ayum can now be setup and the necessary software can be installed source ayum/setup.sh ayum install ayum_slc6.noarch ayum update ayum install tdaq-07-00-00_x86_64-slc6-gcc62-opt.noarch tdaq-07-00-00_src ayum install LCG_87_zlib_1.2.8_x86_64_slc6_gcc62_opt.noarch >> for the FELIX software also Qt5 is needed: ayum install LCG_87_Qt5_5.6.0_x86_64_slc6_gcc62_opt.noarch VI >>>> TDAQ-7.0.0 AFS INSTALLATION: ==================================== source /afs/cern.ch/atlas/project/tdaq/inst/tdaq/tdaq-07-00-00/installed/setup.sh VII >>>> gcc6.2 via /afs: ========================= source /afs/cern.ch/sw/lcg/contrib/gcc/6.2/x86_64-slc6/setup.sh VIII >>>> LCG software via /afs: ================================ /afs/cern.ch/sw/lcg/releases/LCG_87 NB: setup of latest version of assembler (not for TDAQ or FELIX software): ------------------------------------------------------------------------- # —-> assembler (may be needed for recent version of tbb) export PATH=/project/atlas/tdaq/binutils/bin:$PATH export LD_LIBRARY_PATH=/project/atlas/tdaq/binutils/lib:$LD_LIBRARY_PATH export MANPATH=/project/atlas/tdaq/binutils/share/man:$MANPATH