Install notes for SN@ilWare software

1 Install @ LAL

1.1 Preamble

1.1.1 Configuration of installation directory

export SW_WORK_DIR=/exp/nemo/garrido/tmp

1.1.2 Machine configuration

uname -a
Linux nemo3.lal.in2p3.fr 2.6.32-220.13.1.el6.x86_64 #1 SMP Tue Apr 17 15:16:22 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux
gcc --version
gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)

1.2 Cadfael

1.2.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Cadfael/trunk \
    ${SW_WORK_DIR}/Cadfael/trunk

1.2.2 Configuration

To setup Cadfael, first create the following directory

mkdir ${SW_WORK_DIR}/Cadfael/build && cd ${SW_WORK_DIR}/Cadfael/build

Then simply do

cmake                                                     \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/Cadfael/install \
    -DCADFAEL_VERBOSE_BUILD=ON                            \
    -DCADFAEL_STEP_TARGETS=ON                             \
    -Dport/patchelf=ON                                    \
    -Dport/gsl=ON                                         \
    -Dport/clhep=ON                                       \
    -Dport/boost=ON                                       \
    -Dport/boost+regex=ON                                 \
    -Dport/camp=ON                                        \
    -Dport/xerces-c=ON                                    \
    -Dport/geant4=ON                                      \
    -Dport/geant4+gdml=ON                                 \
    -Dport/geant4+x11=ON                                  \
    -Dport/geant4+data=ON                                 \
    -Dport/root=ON                                        \
    -Dport/root+x11=ON                                    \
    -Dport/root+asimage=ON                                \
    -Dport/root+mathmore=ON                               \
    -Dport/root+opengl=ON                                 \
    ${SW_WORK_DIR}/Cadfael/trunk/

then execute the make command

make

1.2.3 Ports status [8/8]

  • patchelf
  • GSL
  • CLHEP
  • boost
  • camp
  • xerces-c
  • Geant4
    • -Dport/geant4+gdml will install Xerces-C
    • -Dport/geant4+data
  • ROOT
    • -Dport/root+mathmore
    • -Dport/root+opengl

1.3 Bayeux

1.3.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Bayeux/trunk \
    ${SW_WORK_DIR}/Bayeux/trunk

1.3.2 Configuration

To setup Bayeux, execute the following code

cmake                                                    \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/Bayeux/install \
    -DCMAKE_PREFIX_PATH=${SW_WORK_DIR}/Cadfael/install   \
    -DBayeux_ENABLE_TESTING=ON                           \
    -DBayeux_WITH_GEANT4=ON                              \
    ${SW_WORK_DIR}/Bayeux/trunk/

To run the compilation process on several CPU cores do

make -j8 install

1.3.3 Test programs [10/10]

Adding option -DBayeux_ENABLE_TESTING=ON to the cmake command will enable the compilation of test programs. Then doing make test will launch each of the 237 test programs and it will eventually shows some broken tests.

  • datatools
  • brio
  • cuts
  • genbb_help
  • geomtools
  • genvtx
  • mygsl
  • materials
  • dpp
  • mctools

1.4 Falaise

1.4.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Falaise/trunk \
    ${SW_WORK_DIR}/Falaise/trunk

1.4.2 Configuration

To setup Falaise with an already version of Bayeux installed, do

cmake                                                                                  \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/Falaise/install                              \
    -DCMAKE_PREFIX_PATH="${SW_WORK_DIR}/Cadfael/install;${SW_WORK_DIR}/Bayeux/install" \
    -DFalaise_ENABLE_TESTING=ON                                                        \
    -DFalaise_BUILD_DOCS=ON                                                            \
    -DFalaise_USE_SYSTEM_BAYEUX=ON                                                     \
    ${SW_WORK_DIR}/Falaise/trunk

To run the compilation process on several CPU cores do

make -j8 install

1.4.3 Basic tests

cd ${SW_WORK_DIR}/Falaise/build
./BuildProducts/bin/flsimulate -n 10 -o /tmp/${USER}/io_output_simulation.brio
./BuildProducts/bin/flreconstruct -i /tmp/${USER}/io_output_simulation.brio -o /tmp/${USER}/io_output_reconstruction.brio
./BuildProducts/bin/flvisualize -i /tmp/${USER}/io_output_reconstruction.brio

Tests successfully passed.

1.5 Full configuration

Given that the previous installation steps have been successfully passed, the final setup only needs to export the PATH environment variable to give access to Cadfael executables such as root as well as Bayeux and Falaise binaries i.e. bxdpp_processing, flsimulate… Users just need to execute or to add the following lines in theirs .bashrc

export PATH=${SW_WORK_DIR}/Cadfael/install/bin:$PATH
export PATH=${SW_WORK_DIR}/Bayeux/install/bin:$PATH
export PATH=${SW_WORK_DIR}/Falaise/install/bin:$PATH

2 Install @ CC

2.1 Preamble

2.1.1 Configuration of cmake

First you should use a more decent version of cmake by doing

source $THRONG_DIR/sw/config/SL6.4/nemo_basic_sw_setup-1.0.bash
do_nemo_basics_sw_setup_1

You will get version 2.8.10.2 of cmake.

2.1.2 Configuration of installation directory

export SW_WORK_DIR=/sps/nemo/scratch/garrido/tmp

2.1.3 Machine configuration

uname -a
Linux ccage031 2.6.32-358.14.1.el6.x86_64 #1 SMP Tue Jul 16 14:24:33 CDT 2013 x86_64 x86_64 x86_64 GNU/Linux
gcc --version | head -1
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

2.2 Cadfael

2.2.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Cadfael/trunk \
    ${SW_WORK_DIR}/Cadfael/trunk

2.2.2 Configuration

To setup Cadfael, first create the following directory

mkdir -p ${SW_WORK_DIR}/Cadfael/build && cd ${SW_WORK_DIR}/Cadfael/build

Then simply do

cmake                                                     \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/Cadfael/install \
    -DCADFAEL_VERBOSE_BUILD=ON                            \
    -DCADFAEL_STEP_TARGETS=ON                             \
    -Dport/patchelf=ON                                    \
    -Dport/gsl=ON                                         \
    -Dport/clhep=ON                                       \
    -Dport/boost=ON                                       \
    -Dport/boost+regex=ON                                 \
    -Dport/camp=ON                                        \
    -Dport/xerces-c=ON                                    \
    -Dport/geant4=ON                                      \
    -Dport/geant4+gdml=ON                                 \
    -Dport/geant4+x11=ON                                  \
    -Dport/geant4+data=ON                                 \
    -Dport/root=ON                                        \
    -Dport/root+x11=ON                                    \
    -Dport/root+asimage=ON                                \
    -Dport/root+mathmore=ON                               \
    -Dport/root+opengl=ON                                 \
    ${SW_WORK_DIR}/Cadfael/trunk/

then execute the make command

make

2.2.3 Ports status [8/8]

  • patchelf
  • GSL
  • CLHEP
  • boost
  • camp
  • xerces-c
  • Geant4
    • -Dport/geant4+gdml will install Xerces-C
    • -Dport/geant4+data
  • ROOT
    • -Dport/root+mathmore
    • -Dport/root+opengl

2.3 Bayeux

2.3.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Bayeux/trunk \
    ${SW_WORK_DIR}/Bayeux/trunk

2.3.2 Configuration

To setup Bayeux, first create the following directory

mkdir -p ${SW_WORK_DIR}/Bayeux/build && cd ${SW_WORK_DIR}/Bayeux/build

Then simply do

cmake                                                    \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/Bayeux/install \
    -DCMAKE_PREFIX_PATH=${SW_WORK_DIR}/Cadfael/install   \
    -DBayeux_ENABLE_TESTING=ON                           \
    -DBayeux_WITH_GEANT4=ON                              \
    ${SW_WORK_DIR}/Bayeux/trunk/

To run the compilation process on several CPU cores do

make -j6 install

2.3.3 Test programs [10/10]

Adding option -DBayeux_ENABLE_TESTING=ON to the cmake command will enable the compilation of test programs. Then doing make test will launch each of the 238 test programs and it will eventually shows some broken tests.

  • datatools
  • brio
  • cuts
  • genbb_help
  • geomtools
  • genvtx
  • mygsl
  • materials
  • dpp
  • mctools

2.4 Falaise

2.4.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Falaise/trunk \
    ${SW_WORK_DIR}/Falaise/trunk

2.4.2 Configuration

To setup Falaise with an already version of Bayeux installed, first create the following directory

mkdir -p ${SW_WORK_DIR}/Falaise/build && cd ${SW_WORK_DIR}/Falaise/build

Then configure Falaise

cmake                                                                                  \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/Falaise/install                              \
    -DCMAKE_PREFIX_PATH="${SW_WORK_DIR}/Cadfael/install;${SW_WORK_DIR}/Bayeux/install" \
    -DFalaise_ENABLE_TESTING=ON                                                        \
    -DFalaise_BUILD_DOCS=OFF                                                           \
    -DFalaise_USE_SYSTEM_BAYEUX=ON                                                     \
    ${SW_WORK_DIR}/Falaise/trunk

Remark: doxygen version @ Lyon is 1.6 which does not fulfill requirements for building Falaise documentation.

To run the compilation process on several CPU cores do

make -j6 install

2.4.3 Basic tests

cd ${SW_WORK_DIR}/Falaise/build
./BuildProducts/bin/flsimulate -n 10 -o /tmp/${USER}/snemo_tc_muons_roof.xml
./BuildProducts/bin/flreconstruct -i /tmp/${USER}/snemo_tc_muons_roof.xml

Tests successfully passed.

3 Install @ laptop

3.1 Machine configuration

uname -a
Linux garrido-laptop 3.11.4-1-ARCH #1 SMP PREEMPT Sat Oct 5 21:22:51 CEST 2013 x86_64 GNU/Linux
cmake --version
cmake version 2.8.12

3.2 With g++ (GCC) 4.8.2

3.2.1 Cadfael

  • Checking out
    svn co https://nemo.lpc-caen.in2p3.fr/svn/Cadfael/trunk \
        ~/Workdir/NEMO/supernemo/snware_test/cadfael/trunk
    
  • Configuration

    To setup Cadfael simply do

    cmake                                                                           \
        -DCMAKE_INSTALL_PREFIX=~/Workdir/NEMO/supernemo/new_snware/cadfael/install  \
        -DCADFAEL_VERBOSE_BUILD=ON                                                  \
        -DCADFAEL_STEP_TARGETS=ON                                                   \
        -Dport/patchelf=ON                                                          \
        -Dport/gsl=ON                                                               \
        -Dport/clhep=ON                                                             \
        -Dport/boost=ON                                                             \
        -Dport/boost+regex=ON                                                       \
        -Dport/camp=ON                                                              \
        -Dport/xerces-c=ON                                                          \
        -Dport/geant4=ON                                                            \
        -Dport/geant4+gdml=ON                                                       \
        -Dport/geant4+x11=ON                                                        \
        -Dport/geant4+data=ON                                                       \
        -Dport/root=ON                                                              \
        -Dport/root+x11=ON                                                          \
        -Dport/root+asimage=ON                                                      \
        -Dport/root+mathmore=ON                                                     \
        -Dport/root+opengl=ON                                                       \
        ~/Workdir/NEMO/supernemo/new_snware/cadfael/trunk
    

    then execute the make command

    make
    
  • Ports status [7/8]
    • patchelf
    • GSL
    • CLHEP
    • boost (see Boost test error and fix)
    • camp
    • xerces-c
    • Geant4
    • ROOT
  • Xerces-C test error
    Making check in samples
    1099,1103c1099
    < String expression test failed at line 5735
    < String expression test failed at line 5746
    < String expression test failed at line 5749
    < String expression test failed at line 5752
    < Test Failed
    ---
    > Test Run Successfully
    make[3]: *** [check] Erreur 1
    make[2]: *** [ports/xerces-c/xerces-c-prefix/src/xerces-c-stamp/xerces-c-test] Erreur 2
    make[1]: *** [ports/xerces-c/CMakeFiles/xerces-c.dir/all] Erreur 2
    make: *** [all] Erreur 2
    

    The problem comes from DTest under <xerces-c src dir>/tests/src/DOM/DOMTest/DTest.cpp line 5680 where a preprocessor macro checks if 2 strings are "Xerces-C" equal. It fails at different place as diff exhibits. It is not clear what is going on. Solution for the time being is to disable these tests and see if it may propagate to some other ports

  • Boost test error

    A fix will be to patch the cstdint.hpp file following this commit https://svn.boost.org/trac/boost/changeset/84950

    • check in boost 1.55.0 and fix already implemented
    • but Cadfael uses boost 1.53.0 for which fix is not implemented ! → thiw works

    Fixed since Cadfael ahs moved to Boost 1.55.0

3.2.2 Bayeux

  • Checking out
    svn co https://nemo.lpc-caen.in2p3.fr/svn/Bayeux/trunk \
        ~/Workdir/NEMO/supernemo/new_snware/bayeux/repo
    
  • Configuration

    To setup Bayeux execute the following code

    cmake                                                                         \
        -DCMAKE_INSTALL_PREFIX=~/Workdir/NEMO/supernemo/new_snware/bayeux/install \
        -DCMAKE_PREFIX_PATH=~/Workdir/NEMO/supernemo/new_snware/cadfael/install   \
        -DBayeux_ENABLE_TESTING=ON                                                \
        -DBayeux_WITH_GEANT4=ON                                                   \
        -G Ninja -DCMAKE_MAKE_PROGRAM=$(pkgtools__get_binary_path ninja)          \
        ~/Workdir/NEMO/supernemo/new_snware/bayeux/repo
    
  • Test programs [10/10]
    • datatools
    • brio
    • cuts
    • genbb_help
    • geomtools
    • genvtx
    • mygsl
    • materials
    • dpp
    • mctools

3.2.3 TODO Falaise

4 Install @ pc-server

4.1 Preamble

4.1.1 Configuration of installation directory

export SW_WORK_DIR=/data/workdir/nemo/supernemo/snware_test

4.1.2 Machine configuration

uname -a
Linux pc-91089 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013 i686 i686 i686 GNU/Linux
g++ --version | head -1
g++ (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
cmake --version
cmake version 2.8.11.2

4.2 Cadfael

4.2.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Cadfael/trunk \
    ${SW_WORK_DIR}/Cadfael/trunk

4.2.2 Configuration

To setup Cadfael, first create the following directory

mkdir ${SW_WORK_DIR}/Cadfael/build && cd ${SW_WORK_DIR}/Cadfael/build

Then simply do

cmake                                                     \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/Cadfael/install \
    -DCADFAEL_VERBOSE_BUILD=ON                            \
    -DCADFAEL_STEP_TARGETS=ON                             \
    -Dport/patchelf=ON                                    \
    -Dport/gsl=ON                                         \
    -Dport/clhep=ON                                       \
    -Dport/boost=ON                                       \
    -Dport/boost+regex=ON                                 \
    -Dport/camp=ON                                        \
    -Dport/xerces-c=ON                                    \
    -Dport/geant4=ON                                      \
    -Dport/geant4+gdml=ON                                 \
    -Dport/geant4+x11=ON                                  \
    -Dport/geant4+data=ON                                 \
    -Dport/root=ON                                        \
    -Dport/root+x11=ON                                    \
    -Dport/root+asimage=ON                                \
    -Dport/root+mathmore=ON                               \
    -Dport/root+opengl=ON                                 \
    ${SW_WORK_DIR}/Cadfael/trunk

then execute the make command

make

4.2.3 Ports status [7/8]

  • patchelf
  • GSL
  • CLHEP
  • boost
  • camp
  • xerces-c
  • Geant4
    • -Dport/geant4+gdml will install Xerces-C
    • -Dport/geant4+data
  • ROOT
    • -Dport/root+mathmore
    • -Dport/root+opengl
  • CLHEP test error

    Need to have a look into the logs.

    96% tests passed, 2 tests failed out of 47
    
    Total Test time (real) =  18.38 sec
    
    The following tests FAILED:
             24 - testInstanceRestore (Failed)
             29 - testBug58950 (Failed)
    Errors while running CTest
    make[4]: *** [test] Erreur 8
    make[3]: *** [ports/clhep/clhep-prefix/src/clhep-stamp/clhep-test] Erreur 2
    make[2]: *** [ports/clhep/CMakeFiles/clhep.dir/all] Erreur 2
    make[1]: *** [ports/clhep/CMakeFiles/clhep.dir/rule] Erreur 2
    make: *** [clhep] Erreur 2
    

    I had to disable the tests of CLHEP since one of them was failing and thus stopping the compilation of other ports. To remove test, I have commented two lines (line 38 & 39) located in file $SW_WORK_DIR/Cadfael/trunk/ports/clhep/CMakeLists.txt.

4.3 Bayeux

4.3.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Bayeux/trunk \
    ${SW_WORK_DIR}/Bayeux/trunk

4.3.2 Configuration

To setup Bayeux, first create the following directory

mkdir -p ${SW_WORK_DIR}/Bayeux/build && cd ${SW_WORK_DIR}/Bayeux/build

Then simply do

cmake                                                    \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/Bayeux/install \
    -DCMAKE_PREFIX_PATH=${SW_WORK_DIR}/Cadfael/install   \
    -DBayeux_ENABLE_TESTING=ON                           \
    -DBayeux_WITH_GEANT4=ON                              \
    ${SW_WORK_DIR}/Bayeux/trunk/

To run the compilation process do

make install

4.3.3 Test programs [0/10]

Adding option -DBayeux_ENABLE_TESTING=ON to the cmake command will enable the compilation of test programs. Then doing make test will launch each of the 238 test programs and it will eventually shows some broken tests.

  • datatools
  • brio
  • cuts
  • genbb_help
  • geomtools
  • genvtx
  • mygsl
  • materials
  • dpp
  • mctools (see below)
  • mctools compilation error

    Compilation of mctools component generates the following error

    Building CXX object source/CMakeFiles/Bayeux_mctools_geant4.dir/bxmctools/src/g4/primary_generator.cc.o
    /mnt/xwscratch/snailware/software/Bayeux/trunk/source/bxmctools/src/g4/primary_generator.cc: In member function ‘void mctools::g4::primary_generator::_generate_event(G4Event*)’:
    /mnt/xwscratch/snailware/software/Bayeux/trunk/source/bxmctools/src/g4/primary_generator.cc:365: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
    /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/basic_string.h:702: note: candidate 1: typename _Alloc::rebind<_CharT>::other::reference std::basic_string<_CharT, _Traits, _Alloc>::operator[](typename _Alloc::rebind<_CharT>::other::size_type) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
    /mnt/xwscratch/snailware/software/Bayeux/trunk/source/bxmctools/src/g4/primary_generator.cc:365: note: candidate 2: operator[](const char*, int) <built-in>
    make[2]: *** [source/CMakeFiles/Bayeux_mctools_geant4.dir/bxmctools/src/g4/primary_generator.cc.o] Error 1
    make[1]: *** [source/CMakeFiles/Bayeux_mctools_geant4.dir/all] Error 2
    make: *** [all] Error 2
    

    I guess this is related to g++ version which is too old and does not handle properly implicit cast. To overpass this problem, I changed line 365 of $SW_WORK_DIR/Bayeux/trunk/source/bxmctools/src/g4/primary_generator.cc by replacing the G4string type by a std::string type. Then I also changed the declaration line 376 to something like

    G4ParticleDefinition * g4_particle = particle_table->FindParticle ((G4String)g4_particle_name);
    

5 Install @ VMWare

5.1 Preamble

5.1.1 Connection to machine

ssh -p 2026 vmuser@134.158.89.155

5.1.2 Machine configuration

uname -a
Linux xwlivecd_sl.localdomain 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 18:49:37 EDT 2012 i686 i686 i386 GNU/Linux
g++ --version | head -1
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)

5.1.3 Prerequisites

Since the machine embeds a SL5.5 linux distribution, some third-party software components are missing. Especially, a decent version of cmake software has to be installed (version from SL5.5 yum repositories are too deprecated). The following table shows which external software have been (manually) installed

Table 1: Third-party software components installed
Software Version
cmake 2.8.12.1

The needed softwares are installed in /mnt/xwscratch/snailware/thirdparty directory. A download directory contains the tarballs and everything is installed in install directory.

To use them, we should explicitly add the install path to the PATH environment variable.

export PATH=/mnt/xwscratch/snailware/thirdparty/install/bin:$PATH

I also had to install through yum package manager several packages listed in the following table

Table 2: Missing software components installed through yum install commmand
Package Required by
patch patchelf
expat-devel geant4

5.1.4 Configuration of installation directory

export SW_WORK_DIR=/mnt/xwscratch/snailware/software

5.2 Cadfael

5.2.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Cadfael/trunk \
    ${SW_WORK_DIR}/Cadfael/trunk

5.2.2 Configuration

To setup Cadfael, first create the following directory

mkdir -p ${SW_WORK_DIR}/Cadfael/build && cd ${SW_WORK_DIR}/Cadfael/build

Then simply do

cmake                                             \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/install \
    -DCADFAEL_VERBOSE_BUILD=ON                    \
    -DCADFAEL_STEP_TARGETS=ON                     \
    -Dport/patchelf=ON                            \
    -Dport/gsl=ON                                 \
    -Dport/clhep=ON                               \
    -Dport/boost=ON                               \
    -Dport/boost+regex=ON                         \
    -Dport/camp=ON                                \
    -Dport/xerces-c=ON                            \
    -Dport/geant4=ON                              \
    -Dport/geant4+gdml=ON                         \
    -Dport/geant4+x11=ON                          \
    -Dport/geant4+data=ON                         \
    -Dport/root=ON                                \
    -Dport/root+x11=ON                            \
    -Dport/root+asimage=ON                        \
    -Dport/root+mathmore=ON                       \
    -Dport/root+opengl=ON                         \
    ${SW_WORK_DIR}/Cadfael/trunk/

then execute the make command

make

5.2.3 Ports status [7/8]

  • patchelf
  • GSL
  • CLHEP (see below)
  • boost
  • camp
  • xerces-c
  • Geant4
    • -Dport/geant4+gdml will install Xerces-C
    • -Dport/geant4+data
  • ROOT
    • -Dport/root+mathmore
    • -Dport/root+opengl
  • CLHEP test error

    I had to disable the tests of CLHEP since one of them was failing and thus stopping the compilation of other ports. To remove test, I have commented two lines (line 38 & 39) located in file $SW_WORK_DIR/Cadfael/trunk/ports/clhep/CMakeLists.txt.

5.3 Bayeux

5.3.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Bayeux/trunk \
    ${SW_WORK_DIR}/Bayeux/trunk

5.3.2 Configuration

To setup Bayeux, first create the following directory

mkdir -p ${SW_WORK_DIR}/Bayeux/build && cd ${SW_WORK_DIR}/Bayeux/build

Then simply do

cmake                                             \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/install \
    -DCMAKE_PREFIX_PATH=${SW_WORK_DIR}/install    \
    -DBayeux_ENABLE_TESTING=ON                    \
    -DBayeux_WITH_GEANT4=ON                       \
    ${SW_WORK_DIR}/Bayeux/trunk/

To run the compilation process do

make install

5.3.3 Test programs [9/10]

Adding option -DBayeux_ENABLE_TESTING=ON to the cmake command will enable the compilation of test programs. Then doing make test will launch each of the 238 test programs and it will eventually shows some broken tests.

  • datatools
  • brio
  • cuts
  • genbb_help
  • geomtools
  • genvtx
  • mygsl
  • materials
  • dpp
  • mctools (see below)
  • mctools compilation error

    Compilation of mctools component generates the following error

    Building CXX object source/CMakeFiles/Bayeux_mctools_geant4.dir/bxmctools/src/g4/primary_generator.cc.o
    /mnt/xwscratch/snailware/software/Bayeux/trunk/source/bxmctools/src/g4/primary_generator.cc: In member function ‘void mctools::g4::primary_generator::_generate_event(G4Event*)’:
    /mnt/xwscratch/snailware/software/Bayeux/trunk/source/bxmctools/src/g4/primary_generator.cc:365: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
    /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/basic_string.h:702: note: candidate 1: typename _Alloc::rebind<_CharT>::other::reference std::basic_string<_CharT, _Traits, _Alloc>::operator[](typename _Alloc::rebind<_CharT>::other::size_type) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
    /mnt/xwscratch/snailware/software/Bayeux/trunk/source/bxmctools/src/g4/primary_generator.cc:365: note: candidate 2: operator[](const char*, int) <built-in>
    make[2]: *** [source/CMakeFiles/Bayeux_mctools_geant4.dir/bxmctools/src/g4/primary_generator.cc.o] Error 1
    make[1]: *** [source/CMakeFiles/Bayeux_mctools_geant4.dir/all] Error 2
    make: *** [all] Error 2
    

    I guess this is related to g++ version which is too old and does not handle properly implicit cast. To overpass this problem, I changed line 365 of $SW_WORK_DIR/Bayeux/trunk/source/bxmctools/src/g4/primary_generator.cc by replacing the G4string type by a std::string type. Then I also changed the declaration line 376 to something like

    G4ParticleDefinition * g4_particle = particle_table->FindParticle ((G4String)g4_particle_name);
    

5.4 Falaise

5.4.1 Checking out

svn co https://nemo.lpc-caen.in2p3.fr/svn/Falaise/trunk \
    ${SW_WORK_DIR}/Falaise/trunk

5.4.2 Configuration

To setup Falaise with an already version of Bayeux installed, first create the following directory

mkdir -p ${SW_WORK_DIR}/Falaise/build && cd ${SW_WORK_DIR}/Falaise/build

Then configure Falaise

cmake                                             \
    -DCMAKE_INSTALL_PREFIX=${SW_WORK_DIR}/install \
    -DCMAKE_PREFIX_PATH=${SW_WORK_DIR}/install    \
    -DFalaise_ENABLE_TESTING=ON                   \
    -DFalaise_BUILD_DOCS=OFF                      \
    -DFalaise_USE_SYSTEM_BAYEUX=ON                \
    ${SW_WORK_DIR}/Falaise/trunk

To run the compilation process do

make install

5.4.3 Basic tests

export PATH=${SW_WORK_DIR}/install/bin:$PATH
flsimulate -n 10 -o /tmp/${USER}/snemo_tc_muons_roof.xml
flreconstruct -i /tmp/${USER}/snemo_tc_muons_roof.xml

Tests successfully passed.

5.5 Final tests

Every binaries have been placed within /mnt/xwscratch/snailware/software/install directory. It means that all the relevant parts i.e. library, configuration files, executables of the software may be found here. To make use of the useful binaries for SuperNEMO simulation and reconstruction, one has to export the bin directory to the PATH environment variable:

export PATH=/mnt/xwscratch/snailware/software/install/bin:$PATH

Then, the flsimulate program and the flreconstruct program can be execute from everywhere.

To test each of them, you can do

flsimulate -n 10 -o /tmp/${USER}/snemo_output.xml

This will generate 10 events and store the result of the simulation in the /tmp/${USER}/snemo_output.xml file. To perform reconstruction of the previous set of simulated data, you can do

flreconstruct -i /tmp/${USER}/snemo_output.xml

This will dump some information related to simulated data. Making both of them working means that everything has been installed properly.

Remark: Since binaries use rpath technique to embeds library path1, binaries may be moved to other place without breaking link paths. It seems to work with Bayeux components but for the 2 interesting Falaise binaries, namely flsimulate and flreconstruct, it seems to have some bad hard-coded path within these binaries. For example, if I moved the former binaries to the $HOME directory, then running $HOME/flsimulate --help command gives the following error

1

rpath is a term in programming which refers to a run-time search path hard-coded in an executable file or library, used during dynamic linking to find the libraries the executable or library requires.


terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
  what():  boost::filesystem::canonical: No such file or directory: "/home/vmuser/../share/Falaise-1.0.0"
Aborted

Clearly, there is a reference to a relative path from where the executable is used.

File under version control - commit 1b7d8a5 - 2015-10-19