LHCb/CBPF web page >> Tutorials >> What I did to install a LHCb software locally  

What I did to install the LHCb software locally

Author: Fernando Rodrigues
Last main update: November 11, 2015
 

It is not an official LHCb experiment webpage. The main propose of this page is register what I did in the last time that installed a LHCb software. Most of the instructions contained on this webpage were extracted from the sites:
  * LHCb software installation
  * LHCb specific manual for Ganga v504p1
  * LHCbDirac client distribution and environment
  * Installing the LHCb Software on Ubuntu (and Debian)
plus some e-mails exchanged in the LHCb distributed list.

Note: For Panoramix installation change the name Ganga per Panoramix in the commands of the topic 1 and 3 (we don't need the topic 2 since no Grid is required).

 
 
 

The commands below are related to Scientific Linux machines.
 
 

0) Preparing the enviroment to install a LHCb software

Comment for FOCUS machines: The difference between FOCUS100 and FOCUS101 is that the first run the Scientific Linux CERN (SLC) 5 and the second the SLC6.

mkdir /usr/local/lhcb_software

uname -a
gcc --version
Possibilities CMTCONFIG (based in the results of "uname" and "gcc" commands listed above)

 Kernel   Processor   GCC      CMTCONFIG    
slc6 x86_64 > 4.9  x86_64-slc6-gcc49-opt
slc6 x86_64 > 4.6  x86_64-slc6-gcc46-opt
slc5 x86_64 > 4.6  x86_64-slc5-gcc46-opt
slc5 x86_64 > 4.3  x86_64-slc5-gcc43-opt
slc4 amd64 > 3.4  slc4_amd64_gcc34
slc4 ia32 > 3.4  slc4_ia32_gcc34
Windows win32 -  win32_vc71_dbg

0.1) Define enviroment variables:

Insert in the .bashrc file the following lines:
if [ $(hostname) == "focus101.cat.cbpf.br" ]; then
export MYSITEROOT=/usr/local/lhcb_software ;
export CMTCONFIG=x86_64-slc6-gcc49-opt
fi

 
 
 

1) Installing a LHCb software

There is a Twiki page dedicated to inform about plataforms and compilers supported by LHCb production software and the webpage LHCb distribution page with the complet list of all LHCb projects distributions.  
 
A list of recommended LHCb project to install locally is presented bellow. It is better to install the LHCb softwares that use the same LBSCRIPT. To check the correspond version of COMPAT and LBSCRIPT that will be installed in each project versions before install it you can use the following lines

ssh lxplus.cern.ch
SetupProject <Project>
$COMPATSYSROOT
$LBSCRIPTSSYSROOT

 Machine    Project    Version    COMPAT    LBSCRIPT    Installed at:  
 FOCUS101 (SLC6)  LHCbDIRAC  v8r2p29  v1r19  v8r5p3  28-Mar-2016
 FOCUS101 (SLC6)  Ganga  v601r14  v1r19  v8r5p3  28-Mar-2016
 FOCUS101 (SLC6)  DaVinci  v38r1p1  v1r19  v8r5p3  28-Mar-2016
 FOCUS101 (SLC6)  LHCbDIRAC  v7r14p29  v1r15  v7r9p2  25-Nov-2013
 FOCUS100 (SLC5)    LHCbDIRAC    v7r13p29  v1r15  v7r8p2  16-Aug-2013
 FOCUS101 (SLC6)  LHCbDIRAC  v7r13p29  v1r15  v7r8p2  13-Aug-2013
 FOCUS100 (SLC5)  LHCbDIRAC  v7r13p27  v1r15  v7r13p27  15-Jul-2013
 FOCUS100 (SLC5)  LHCbDIRAC  v7r11p5  v1r12  v7r5  21-Jan-2013
 FOCUS100 (SLC5)  Ganga  v600r17  v1r15  v7r8p2  16-Aug-2013
 FOCUS101 (SLC6)  Ganga  v600r17  v1r15  v7r8p2  13-Aug-2013
 FOCUS100 (SLC5)  Ganga  v508r19  v1r12  v7r5  21-Jan-2013
 FOCUS100 (SLC5)  DaVinci  v33r1  v1r12  v7r5  21-Jan-2013
 FOCUS100 (SLC5)  Panoramix  v21r5  v1r12  v7r5  21-Jan-2013

In the case that you will install a new version of LBSCRIPT, you need first to copy the old version to a different name (cp LbLogin.sh LbLogin.sh_<old version>). This will allow you to access the older version latter. Then you intall the project using the install_project.py (python install_project.py -d -b <Project> <version>).
For example, to install the Ganga v600r17:

cd $MYSITEROOT
cp LbLogin.sh LbLogin.sh_v7r13p27
python install_project.py -d -b Ganga v600r17

1.1.a) What I did in the last installation at FOCUS100(SLC 5, GCC 4.1): (May 11, 2015)

ssh root@focus100.cat.cbpf.br
export MYSITEROOT=/data1/lhcb_software
export CMTCONFIG=x86_64-slc5-gcc43-opt
$CMTCONFIG
cd $MYSITEROOT
wget http://lhcbproject.web.cern.ch/lhcbproject/dist/install_project.py
cp LbLogin.sh LbLogin.sh__v7r8p2
python install_project.py -b DaVinci v36r1p1


Observation: The Ganga v600r44 installation include the LHCbDirac vXrYYpZZ package.

1.1.b) What I did in the last installation at FOCUS101(SLC 6, GCC 4.9): (March 28, 2016)


=======PRIMEIRO TEMOS DE INSTALAR A VERSAO MAIS NOVA DO GCC(4.9)========
------Seguem os passos realizados pelo João Medeiros para o GCC4.9------
ssh root@focus101.cat.cbpf.br
yum install gmp gmp-devel mpfr mpfr-devel libmpc libmpc-devel
wget http://mirrors-usa.go-parts.com/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.gz
tar -xvf gcc-4.9.3.tar.gz
cd gcc-4.9.3
./configure --disable-multilib (Demora muito)
make
make install
------Feito isso é necessário reiniciar o host--------------------------
------Ao voltar, verifique a versão com o comando-----------------------
gcc -dumpversion

==============SEGUNDO TEMOS DE ATUALIZAR O GLIBCXX======================
ssh root@focus101.cat.cbpf.br
strings /usr/lib64/libstdc++.so.6 | grep GLIBC
mv /usr/lib64/libstdc++.so.6   /usr/lib64/libstdc++.so.6.backup
cp /root/gcc-4.9.3/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.20 /usr/lib64/.
cd /usr/lib64/
ln -s libstdc++.so.6.0.20 libstdc++.so.6
reboot

==============TERCEIRO TEMOS DE INSTALAR PYTHON >= 2.7==================
ssh root@focus101.cat.cbpf.br
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
tar xzf Python-2.7.11.tgz
cd Python-2.7.11
./configure
make altinstall
-----Para entrar com o python 2.7 apenas digite "python2.7"-------------
-----o diretório dele é /usr/local/bin/python2.7------------------------

Considering that you defined the enviroment variables MYSITEROOT and CMTCONFIG [see]

cd $MYSITEROOT
wget http://lhcbproject.web.cern.ch/lhcbproject/dist/install_project.py
python install_project.py -b LHCbDIRAC v8r2p29
========MENSAGEM QUE APARECE DURANTE AO DAR O COMANDO ACIMA=============
You can now set the variable DIRACSYSCONFIG for the configuration of your installation
export DIRACSYSCONFIG=$MYLOCATION/etc/dirac.cfg 

if This dirac.cfg does not exist yet, you can create it by running 
the command $VO_LHCB_SW_DIR/lib/lhcb/DIRAC/DIRAC_v5r12p28/DiracSys/configure-dirac
to configure dirac. 
Don't forget that you should have an area where you installed your certificates authorities
and that you have to keep up to date with the command dirac-admin-get-CAs
eg : export X509_CERT_DIR=$MYLOCATION/etc/grid-security/certificates
export X509_VOMS_DIR=$MYLOCATION/etc/grid-security/vomsdir
========================================================================
mkdir $MYSITEROOT/etc/grid-security
mkdir $MYSITEROOT/etc/grid-security/certificates
mkdir $MYSITEROOT/etc/grid-security/vomsdir

python install_project.py -b Ganga v601r14

python install_project.py -b DaVinci v38r1p1

Running the LHCbDirac v8r2p29 (it uses DIRAC v6r14p18) for the first time not using root user.

========INCLUDE IN YOUR ~/.BASHRC=======================================
if [ $(hostname) == "focus101.cat.cbpf.br" ]; then
export MYSITEROOT=/usr/local/lhcb_software ;
export CMTCONFIG=x86_64-slc6-gcc49-opt
export X509_USER_PROXY=~/.globus/proxy
export X509_CERT_DIR=$MYLOCATION/etc/grid-security/certificates
export X509_VOMS_DIR=$MYLOCATION/etc/grid-security/vomsdir
fi
========CERTIFY THAT YOU HAVE THE CERTIFICATE INSTALLED=================
[[[ If you do not have your certificate installed, see here. ]]]
========================================================================
source $MYSITEROOT/LbLogin.sh
SetupProject LHCbDirac v8r2p29
lhcb-proxy-init
$MYSITEROOT/lhcb/DIRAC/DIRAC_v6r14p18/DiracSys/configure-dirac
dirac-admin-get-CAs
Observation: The Ganga v600r17 installation include the LHCbDirac v7r13p29 package.

1.2) Test the installation

source $MYSITEROOT/LbLogin.sh
SetupProject LHCbDirac
cd ~frodrigu
mkdir cmtuser
[[[ Installed the certificates, see here. ]]]
cd ~
dirac-admin-get-CAs
lhcb-proxy-init
/data1/lhcb_software/lhcb/DIRAC/DIRAC_v6r6p9/DiracSys/configure-dirac
source $MYSITEROOT/LbLogin.sh
SetupProject Ganga

 
 
 

2) Installing the Grid certificates (mandatory for the DIRAC)

Considering that you defined the enviroment variables MYSITEROOT (/data/lhcb_software) and CMTCONFIG (x86_64-slc5-gcc43-opt) [see]

In the new version of the LHCbDIRAC is not necessary to create the environment variables: export X509_CERT_DIR=/etc/grid-security/certificates and export X509_VOMS_DIR=/etc/grid-security/vomsdir In principle these variables are set during the installation.

For LHCbDIRAC v6r6p12:

source $MYSITEROOT/LbLogin.sh
SetupProject LHCbDIRAC v6r6p12
echo $X509_CERT_DIR
echo $X509_VOMS_DIR

 
 
 

3) Set the enviroment to use the Grid (do it at the first time that you use Ganga or LHCbDirac)

For users

Import your certificate:

mkdir ~frodrigu/.globus 
scp frodrigu@lxplus.cern.ch:.globus/certificado_expireOn_111015.p12 ~frodrigu/.globus 
cd ~frodrigu/.globus
openssl pkcs12 -nocerts -in certificado_expireOn_111015.p12 -out userkey.pem 
openssl pkcs12 -clcerts -nokeys -in certificado_expireOn_111015.p12 -out usercert.pem 
chmod 400 userkey.pem

Insert in the

~/.bashrc
file the line:
export X509_USER_PROXY=~/.globus/proxy

Open a new terminal section or use the command:

 source ~/.bashrc

For administrator

Network Time Protocol (NTP) Installation - NTP needs to be installed because the grid needs the clocks on the systems to be synchronized. The security process creates proxy certificates that are valid for specific times. If the systems do not have their clocks synchronized, then the user may not be able to use the grid, as the proxy certificates may look like they have expired or not yet valid. Server1 is configured, as NTP Server and remaining machines are bind to the NTP server for the clock synchronization.
ssh root@focus100.cat.cbpf.br
yum install ntp
vim /etc/ntp.conf
Include on focus100:/etc/ntp.conf
# Specify the key identifier to use with the ntpq utility.
#controlkey 8
server pcdsh05.on.br
restrict pcdsh05.on.br mask 255.255.255.255 nomodify notrap noquery
Include on focus101:/etc/ntp.conf
server focus100.cat.cbpf.br iburst
In case that a user receive the error below when generate the lhcb-proxy-init
Error: Your host clock seems to be off by more than TEN MINUTES! Thats really bad.
We're cowardly refusing to generate a proxy. Please fix your system time
Update the clock using the following command
ntpdate -u pcdsh05.on.br
ntpdate -u cream-ce.cat.cbpf.br (IF ON DID NOT WORK)
 
 
 

4) Running the Ganga project

Open a new terminal.

source $MYSITEROOT/LbLogin.sh

SetupProject <Project>
i.e.:  SetupProject Panoramix
        SetupProject Ganga

To test the certificate installation

dirac-admin-get-CAs
lhcb-proxy-init

https://lhcbweb.pic.es/DIRAC/LHCb-Production/lhcb_user/Data/BK/display

 
 
 

5) Solutions:

 export LANG=en_US.UTF-8      (for bash)
 setenv LANG en_US.UTF-8      (for tcsh)

 
 
 
 
 
 
 

History

H.3) What I did in the last installation at FOCUS100(SLC 5, GCC 4.1): (August 16, 2013)

Considering that you defined the enviroment variables MYSITEROOT (/data1/lhcb_software) and CMTCONFIG (x86_64-slc5-gcc43-opt) [see]

cd $MYSITEROOT
rm install_project.py
wget http://lhcbproject.web.cern.ch/lhcbproject/dist/install_project.py
cp LbLogin.sh LbLogin.sh_v7r13p27
python install_project.py -b Ganga v600r17
source $MYSITEROOT/LbLogin.sh
SetupProject LHCbDirac v7r13p29
[[[ If you do not have your certificate installed, see here. ]]]
/data1/lhcb_software/lhcb/DIRAC/DIRAC_v6r8p24/DiracSys/configure-dirac
dirac-admin-get-CAs
lhcb-proxy-init
/data1/lhcb_software/lhcb/DIRAC/DIRAC_v6r8p24/DiracSys/configure-dirac
dirac-admin-get-CAs
lhcb-proxy-init
Observation: The Ganga v600r17 installation include the LHCbDirac v7r13p29 package.

H.2) What I did to install a new version on FOCUS100(SLC 5, GCC 4.1): (July 15, 2013)

Considering that you defined the enviroment variables MYSITEROOT (/data/lhcb_software) and CMTCONFIG (x86_64-slc5-gcc43-opt) [see]

su
cd $MYSITEROOT
cp LbLogin.sh LbLogin.sh_v7r5      (to use the old versions already installed)
wget http://lhcbproject.web.cern.ch/lhcbproject/dist/install_project.py
python install_project.py -b LHCbDirac v7r13p27
/data1/lhcb_software/lhcb/DIRAC/DIRAC_v6r8p22/DiracSys/configure-dirac
exit   (exit superuser)

H.1) What I did for FOCUS100(SLC 5, GCC 4.1) and FOCUS17(UBUNTU 10.4, GCC 4.4):    (January 21, 2013)

Considering that you defined the enviroment variables MYSITEROOT (/data/lhcb_software) and CMTCONFIG (x86_64-slc5-gcc43-opt) [see]

cd $MYSITEROOT 
wget http://lhcbproject.web.cern.ch/lhcbproject/dist/install_project.py
python install_project.py -b DaVinci v33r1
python install_project.py -b Ganga v508r19

Warning received during Ganga installation:

You can now set the variable DIRACSYSCONFIG for the configuration of your installation
export DIRACSYSCONFIG=$MYLOCATION/etc/dirac.cfg
if This dirac.cfg does not exist yet, you can create it by running the command
$VO_LHCB_SW_DIR/lib/lhcb/DIRAC/DIRAC_v5r12p28/DiracSys/configure-dirac
to configure dirac. Don't forget that you should have an area where you installed your certificates authorities and that you have to keep up to date with the command dirac-admin-get-CAs. Example give:
  export X509_CERT_DIR=$MYLOCATION/etc/grid-security/certificates   export X509_VOMS_DIR=$MYLOCATION/etc/grid-security/vomsdir