Build The BambooMC (new version)

Get the source

git clone

Check out the new branchs

In this example, we checkout the factory branch
git checkout -b factory origin/factory

Make you new branch and check it out (optional)

If you want to add new features to the program, you may need to create a new branch. You need to give it a name. For example, panda.
git branch panda 
git checkout panda

Then you are on the new branch.

Build the program


1. g++: version > 4.8 (for full C++11 support)

In our cluster bl-2, you may need to enable the devtoolset-3 (g++ 4.8) or devtoolset-4 (g++ 5.2, prefered).
scl enable devtoolset-4 bash

2. Geant4: version 10.02 and above

In our cluster, the installation is available at /store/bl2/opt/geant4/10.02p01 . You can set the enviroment with following command
. /store/bl2/opt/geant4/10.02p01/bin/

3. ROOT 6

In our cluster, you need to set the environment to use ROOT 6 with following command
. /store/bl2/opt/root/6.08.04_gcc52/bin/

4. CMake 3 or higher

In the cluster, you can invoke cmake3 directly. In other system, you may need to use cmake.

Build program

0. create the build directory in the source tree
mkdir build

1. Invoke cmake 3
cmake -DENABLE_DETECTOR_SETS=example_detector -DCMAKE_BUILD_TYPE=Release ..

The parameter ENABLE_DETECTOR_SETS tell the compiler that the sources of a detector set with the name example_detector will be compiled. You can find the directory in the detectors directory in the first level of the source tree.

2. run make

-- XunChen - 2018-04-12
Topic revision: r2 - 2018-07-25, XunChen - This page was cached on 2020-07-15 - 15:21.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback