Local installation of the SCT ROD DAQ software - a step by step GUIDE

[ Just assuming that you bought a new machine, and planning to set it up on linux and planning to run the SCT ROD DAQ software remotely ]

There are three steps

  • Installation of Scientific Linux (SLC6)
  • Installation of TDAQ
  • Installation of SCT ROD DAQ

1) Installation of Scientific Linux (SLC6)

(No fancy stuff here just installed the latest SLC6 version, follow the instructions from here )

But you might need few external software packages before proceeding further e.g. install the following

  • Install git $yum install git-core

  • install ayum $git clone git://github.com/rhauser/ayum.git

  • install gcc $yum install gcc

  • install g++ $yum install g++

  • install svn $yum install svn

  • install emacs (only if you are a fan of emacs) $yum install emacs

  • install Java $ayum install javasdk_1_7_0_amd64

  • install libxml2 $yum install libxml2-devel

  • install openmotif (required for oks_editor to work) $yum install openmotif

  • install zlib $yum install zlib*

2) Installation of TDAQ (latest version: tdaq-05-03-00 as on March, 2013)

I have prepared these instructions based on my experience with tdaq-05-03-00 version

  • First of all, configure your 'ayum' installation
    • $cd ayum; $./configure.ayum

(The script will ask for two directory locations: first, where to put your private RPM database, and second, where to install the (TDAQ) software. The answers will be written into yum.conf which you can edit afterwards if you want to change the values. Alternatively, just edit yum.conf according to the comments with a text editor of your choice. ( I installed at /home/nitesh/ )

  • You should setup an alias to the executable in the ayum directory, or put the directory into your PATH, whatever you prefer:
    • $alias ayum=`pwd`/ayum or
    • export PATH=`pwd`:$PATH assuming that you are currently in the 'ayum' top level directory.

  • All the usual yum commands are available with ayum.
    • $ayum list available;
    • $ayum list installed;
    • $ayum list *DAQRelease*;

  • Install the version of the TDAQ software you want:
    • $ayum install tdaq-05-03-00_DAQRelease_x86_64-slc6-gcc47-opt
    • $ayum install tdaq-05-03-00_databases

You probably have to adapt the [sw/install/area/]/tdaq/tdaq-05-03-00/installed/databases files for your local installation.

  • If you are doing local development, you probably also want the compiler and CMT:
    • $ayum install gcc_4.7.2_x86_64-slc6.noarch;
    • $ayum install CMTv1r25Linux-i686

  • Finally, do the source [sw/install/area/]/tdaq/tdaq-05-03-00/installed/setup.sh x86_64-slc6-gcc47-opt

(if no problem up to here that means the tdaq-05-03-00 version has been installed successfully.)

3) Checking out the SCT ROD DAQ (latest version)

  • $svn co svn+ssh://[username]@svn.cern.ch/reps/sctroddaq/trunk/SctDaq/trunk SctRodDaq
  • $cd SctRodDaq
  • now before building the SctRodDaq Package, you need to set the correct environment (this is where the real pain starts); you should start setting these by following the exampleSetup.sh

I am putting everything here which I have setup for my machine

+++++++++++++++++++++ modified exampleSetup.sh starts from here+++++++++++++++

# 1. First decide what machine you're running on and which version of gcc

export CMTCONFIG=x86_64-slc6-gcc47-opt

# 2. Setup gcc

source /home/nitesh/sw/lcg/contrib/gcc/4.7.2/${CMTCONFIG}/setup.sh

# 2a. Check gcc (cvmfs doesn't automatically change $PATH)

gcc --version

# 3. Initialise the software from tdaq

TARGET_TDAQ_VERSION=05-03-00

source /home/nitesh/tdaq/tdaq-$TARGET_TDAQ_VERSION/installed/setup.sh

# 4. Setup ROOTSYS

ROOT_VERSION=5.34.13

export ROOTSYS=${LCG_INST_PATH}/app/releases/ROOT/${ROOT_VERSION}/${CMTCONFIG}/root

# 5. Which BOOST to use (for 05-03-00)

export BOOST_HOME=${LCG_INST_PATH}/external/Boost/1.53.0_python2.7

export BOOSTDIR=${BOOST_HOME}/${CMTCONFIG}/include/boost-1_53

# 6. We expect various things to be on the PATH that aren't there by default

export TDAQ_JAVA_HOME=/home/nitesh/sw/lcg/external/Java/JDK/1.7.0/amd64

export PATH=${TDAQ_JAVA_HOME}/bin:${PATH}

###########

export PYTHONPATH=${TDAQ_INST_PATH}/${CMTCONFIG}/lib

export PATH=${ROOTSYS}/bin:${PATH}

export LD_LIBRARY_PATH=${ROOTSYS}/lib:${LD_LIBRARY_PATH}

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BOOST_HOME}/${LCGCONFIG}/lib

# 7. Where to find the java jar files etc. from docs/build.html#install

#the directory /daq/ext created by the Nitesh

export SCT_DAQ_EXT=/home/nitesh/SctRodDaq/ext

#export NAGDIR=${SCT_DAQ_EXT}/Nag_C

######## Our Software #########

# 8. Tell everything else where you've put SCT ROD DAQ

export SCT_DAQ_ROOT=/home/nitesh/SctRodDaq

# set up TDAQ_DB_DATA (check if it is setup correctly

export TDAQ_DB_DATA=${SCT_DAQ_ROOT}/config/databases/SctPartition.data.xml

export TDAQ_DB_PATH=${TDAQ_DB_PATH}:${SCT_DAQ_ROOT}/config/databases

# X. Other (possibly obsolete) variables

# Used by the old (xml) configuration (where do I get the realRod.xml file)

export SCTDAQ_ROD_CONFIGURATION_PATH=${SCT_DAQ_ROOT}/config/databases/realRod.xml

# Don't do this unless you know what you're doing!

# export TDAQ_IPC_INIT_REF=file:${SCT_DAQ_ROOT}/ipc.ref.file

# Directory to put IS proxy files

export SCT_SCRATCH_DIR=${SCT_DAQ_ROOT}/scratch

# Directory to permanently save data

export SCT_PERSISTENT_DIR=${SCT_DAQ_ROOT}/saved_data

################################ #Required variables for building ################################

#Add junit.jar to CLASSPATH.  You can get junit.jar from www.junit.org

export CLASSPATH=${SCT_DAQ_EXT}/junit.jar:$CLASSPATH

export SCTPIXEL_DAQ_ROOT=$SCT_DAQ_ROOT/RodDaq

##################################### #And finally, source the setup script #####################################

cd ${SCT_DAQ_ROOT}

source ${SCT_DAQ_ROOT}/setup.sh

########################################### # SETUP SCRIPT ENDS HERE ############################################ +++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++

  • There are few directories which might not exist with checked out SctRodDaq package, but you can create these e.g.
    • $mkdir /home/nitesh/SctRodDaq/ext
    • $mkdir /home/nitesh/SctRodDaq/ext/NAG_C
    • $mkdir /home/nitesh/SctRodDaq/scratch
    • $mkdir /home/nitesh/SctRodDaq/saved_data

  • Now copy the files (mostly java files) from point-1 machine

  • now source the setUpExample.sh
    • $source setupExample.sh

<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>

Few warning messages might appear but you can ignore them

[nitesh@HEPAdelaide1 SctRodDaq]$ source setUpNitesh.sh

gcc (GCC) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions.  There is NO warranty; 
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Setting up TDAQ Common SW release ="tdaq-common-01-26-00"
Setting up DQM Common SW release ="dqm-common-00-26-01"
Setting up DAQ SW release ="tdaq-05-03-00"
Testing environment against =OKS= database...
< OKS  ENV >
1,14c1,4
< 
< Caught 2014-Mar-07 17:29:42,306 ERROR [ConfigurationImpl* _oksconfig_creator_(...) at oksconfig/src/OksConfiguration.cpp:40] oksconfig initialization error
:
:

<    was caused by: 2014-Mar-07 17:29:42,305 ERROR [virtual void OksConfiguration::open_db(...) at oksconfig/src/OksConfiguration.cpp:68] cannot load file
'/home/nitesh/SctRodDaq/config/databases/SctPartition.data.xml':
<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>

  • now start building the package
    • $make (or $make SKIP_32=yes [if you want to skip the 32 version])

If the SctRodDaq compile here successfully, then you are luckiest person on this planet, if not then start solving the errors step by step

Some of the errors you might come across and their solution


make -C ../MiniUtils all
make[3]: Entering directory `/home/nitesh/SctRodDaq/MiniUtils'
g++ hex2dec.o   -L/home/nitesh/SctRodDaq/installed/x86_64-slc6-gcc47-opt/lib -L/home/nitesh/sw/lcg/external/Boost/1.53.0_python2.7//include/boost-1_53/../../lib -L/home/nitesh/tdaq/tdaq-05-03-00/installed/x86_64-slc6-gcc47-opt/lib -L/home/nitesh/tdaq/tdaq-05-03-00/installed/x86_64-slc6-gcc47-opt/lib -lowl -lipc -lis -lomniORB4 -lomnithread -lpthread -lpmgsync -lcmdline -ldl -L/home/nitesh/tdaq-common/tdaq-common-01-26-00/installed/x86_64-slc6-gcc47-opt/lib -lers `gcc -print-libgcc-file-name` -lz -L/home/nitesh/tdaq/tdaq-05-03-00/installed/x86_64-slc6-gcc47-opt/lib -o hex2dec && echo -n
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make[3]: *** [hex2dec] Error 1
make[3]: Leaving directory `/home/nitesh/SctRodDaq/MiniUtils'
Solution
$yum install zlib
$yum install zlib.x86_64
If this doesn't solve the problem then do
 $yum install zlib* 
and rebuild
Problem with libXm.so.4
[nitesh@HEPAdelaide1 SctRodDaq]$ oks_data_editor 
oks_data_editor: error while loading shared libraries: libXm.so.4: cannot open shared object file: No such file or directory
Solution
$yum install openmotif
(remember you need to login as su)

if you want to skip the 32-bit version of compilation
$make SKIP_32=yes

Killing series of processes
 
ps -ef | grep pmg  | awk '{print $2}' | xargs kill


"hostname" error e.g.
[nitesh@HEPAdelaideRCE PartitionMaker]$ . ./make8Crates.sh 
hostname: Unknown host
Traceback (most recent call last):
......

Edit the following file

$ vim /etc/hosts

and add the line related to the hostname, e.g.

129.127.103.1  HEPAdelaide1



(A) Running the test partition

Make a test partition and run it. It is required to test if the whole setup is working fine.

1) $cd config/PartitionMaker
2) $. ./make8Crates.sh
3) $TDAQ_DB_DATA=$PWD/SctTest8CratesPartition.data.xml
4) $setup_daq SctTest8CratesPartition
5) $rungui& (this might not show everything as it also needs to configured according to local installation, unless you desperately need it, better to skip this part)

(B) Perform SystemTest and AnalysisTest

$cd SystemTests/AnalysisTests
$. ./run_setup_daq.sh
$TDAQ_DB_DATA=/home/nitesh/NiteshSCTRODDAQ/new_2oct14/SctRodDaq/SystemTests/scratch/SctSystemAnalysisTests.data.xml 
$setup_daq SctSystemAnalysisTests
Now start and run the partition as follows

- Click on the "initial" then "config" and then "start"

- Click on "SCT" tab on the "Run Control" and by clicking the right button of the mouse, exclude the "SctTestCrate0" and "SctHighLevelTest" tabs, The SCT should be green and running.

Basically, analysis partition is up and running up to this point.

Start the Analysis Test now

Let's begin by doing TrimRangeTests

$cd TrimRangeTests/TrimRangeAnalyse/
$. ./run.sh

- Click on the "IS" (information Service) on the partition window, and wait for the pop-up window

- Click on "Select the Partition" and then select the "SctSystemAnalysisTests" partition

- Click on "SCT_AnalysisData_TestCrate", another pop-up window will appear, and this is where we are publishing the results e.g. TrimRangeTest Results

Ideally, we should be able to view the results on "runGui" but at the moment it is not configured properly at Adelaide. There are some technically issues with it

Alternatively, we can view the data histogram as

$DataDisplayer -isonly SCT_AnalysisData_TestCrate.SctData::TrimRangeTestResult.1362.11.20220130000000

Similarly, we can do the other tests e.g. ShaperCurrentTest

$cd ShaperCurrentTest/
$. ./run.sh
Check the parition and it should be publishing the results there
$DataDisplayer -isonly SCT_AnalysisData_TestCrate.SctData::ShaperCurrentTestResult.1279192616.0.20220250000080



Some Important Commands

List and kill the partition

$ipc_ls -P
$ipc_ls -p SctSystemAnalysisTests
$pmg_kill_partition -p SctSystemAnalysisTests

or

$pmg_kill_partition -p $TDAQ_PARTITION

If some the "resources" are busy while running on the partition then we can remove them as

$rm_get_resource_info -p SctTest8CratesPartition
$rm_free_resource -p SctTest8CratesPartition

or

$rm_free_resource -p SctTest8CratesPartition -t UserControl

Look into the xml file

$oks_dump SctTest8CratesPartition.data.xml | less

Something else to try independently

ipc_server &
pmgserver &
ipc_ls


INSTRUCTIONS to Login into SR1 Machines
$ssh -X sctroddq@pc-sct-mon-41 (or 42 or 43)
password: (Ask some expert for the password)

$cd /work/pc-sct-mon-41/sctdaq/tdaq-05-03-00/installations/
$mkdir nitesh
$cd nitesh
$svn co svn+ssh://[username]@svn.cern.ch/reps/sctroddaq/trunk/SctDaq/trunk SctRodDaq
(replace the [username] with yours cern username)

$source exampleSetup.sh (you needs to update this script)
OR
$source /work/pc-sct-mon-41/sctdaq/tdaq-05-03-00/setups/setup_common.sh

$cd SctRodDaq/build/

$make


** Linux related Errors
- HDD USB driver can't mounted on the SLC6
Solution: Download the ntfs-3g rpm file (ntfs-3g-2011.1.15-1.el6.x86_64.rpm)
and then install as
$rpm -i ntfs-3g*

- SLC6 on the Dell Server
boot from CD by pressing the F11 key botton rather than F12 key botton

-- NiteshSoni - 04 Mar 2014
Edit | Attach | Watch | Print version | History: r21 < r20 < r19 < r18 < r17 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r21 - 2014-11-06 - NiteshSoni
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback