-
Notifications
You must be signed in to change notification settings - Fork 6
Compiling and installing
- trilinos
- tbb
- cimg
- boost
- HDF5-cpp-wrapper (https://github.com/DaWelter/HDF5-cpp-wrapper, provides C++ interface for HDF5, supported in hdf5 since 1.10)
- numpycpp (https://github.com/DaWelter/numpycpp, provides the C interface for numpy, added in boost since 1.63)
- 4.1.11-gentoo-ARCH
- 4.1.7-hardened-r1-ARCH
- SMP Debian 3.2.68-1+deb7u5 x86_64 GNU/Linux
- Ubuntu 16.04 4.4.0-45-generic #66-Ubuntu
- Ubuntu 14.04 4.2.0-27-generic #32
CMake is our build system. You most likely need to configure the build according
to your system specifics. To do so, we recommend you to create a shell script which contains the call to cmake while storing all your personal options. We have several examples in the install_helpers
directory.
An example usage of our install_helpers
on Ubuntu 16.04 works as follows:
export CC=mpicc #set c compiler to mpi
export CXX=mpicxx #sets cxx compiler to mpi
$mkdir build # create your build directory
$cd build
$./ /path/to/source/directory/tumorcode/install_helpers/do-configure-tumorcode-ubuntu16.sh /path/to/source/directory/tumorcode
$make
$make install
Basic CMake usage is as follows
$mkdir build # create your build directory
$cd build
$cmake -DCMAKE_INSTALL_PREFIX=/home/thierry/tc_install path_to_tumorcode
$make
$make install
The install command is required since it copies generated python libraries to
their proper place within the py
subdirectory. Note that you can set CMAKE_INSTALL_PREFIX
to your source directory, which is useful for development.
Note that /home/thierry/tc_install
is only an example here. Using the curses based interface ccmake
might also be an option to configure your builds.
Here is a list of debian packages you will need:
sudo apt-get install cmake gfortran libblas-dev liblapack-dev python2.7-dev libboost-all-dev libboost-python-dev python-numpy python-matplotlib libpng-dev libtbb-dev libeigen3-dev python-h5py python-scipy povray mpi-default-dev libmumps-dev libsuperlu-dev libhdf5-dev libhdf5-openmpi-dev libptscotch-dev binutils-dev libiberty-dev libtrilinos-* cimg-dev libcgal-dev libcgal-qt5-dev libann-dev
Our HDF5-cpp-wrapper is a lightweight c++ library around HDF5. Get it by
git clone https://github.com/DaWelter/HDF5-cpp-wrapper.git
As it is only a
single-header you can simply put a link to it in a directory in your include paths.
NumpyCPP is our C++ wrapper around the numpy C API. Get it by
git clone https://github.com/DaWelter/numpycpp.git
. Compile and install by
$cd numpycpp
$mkdir build
$cmake -DCMAKE_INSTALL_PREFIX=/home/thierry/tc_install ../
$make
$make install
In order to use the command system wide you have to export the binary path to your system. With the bash system you can do this by adding the following line to your .bashrc file in the home folder.
export PATH=$PATH:/home/thierry/tc_install/bin
We followed the python standards (https://docs.python.org/2.7/c-api/intro.html#debugging-builds), we designed the python interface of tumorcode in such a way that debugging builds are invoked with the -d
flag of python. We give an example with holds true for all other cases. To run the vesselgenerator in debug mode execute:
python2 -d /home/thierry/tc_install/py/krebsjobs/submitVesselgeneration.py -h
17.11.17 we intended to remove this odd dependency for the current master branch. For reference we leave this information here.
IMPORTANT: We fetch object references pertaining to the HDF5 library linked with h5py and use functions on them pertaining to the HDF5 lib linked to our code, assuming both libraries are the same. THIS MIGHT, HOWEVER, NOT BE THE CASE.
If so, on Ubuntu 16 for instance, you have to compile h5py by yourself. Here is how you can achieve this:
Install the requirements sudo apt-get install cython python-mpi4py python-pkgconfig
.
Then get the h5py source, e.g. from GitHub git clone https://github.com/h5py/h5py
.
Then build and install by
$cd h5py
$python2 setup.py configure --hdf5=/usr/include/hdf5/openmpi --mpi
$python2 setup.py build
$sudo python2 setup.py install
# or if you want to install it in a custom directory
$python2 setup.py install --prefix=target_dir
By --hdf5=...
and --mpi
we request to link against the hdf5 library
that is installed by respective debian packages, which happen to be compiled with
MPI Support.
This software performs all computations locally, as opposed to distributed HPC. Therefore MPI is NOT required. However, it should do no harm if trilinos and other packages are linked to MPI.
Since trilinos was added to ubuntu in 16.04 you have add it manually in previous versions. We recommend: https://launchpad.net/~nschloe/+archive/ubuntu/trilinos-nightly/
Note that the labeling and versions of the packages vary slightly between Ubuntu 14.04 and 16.04.
Here is a list of debian packages you will need:
sudo apt-get install cmake gfortran libblas-dev liblapack-dev python2.7-dev libboost-all-dev libboost-python-dev python-numpy python-matplotlib libboost-program-options-dev libpng12-dev libtbb-dev libeigen3-dev python-h5py python-scipy povray mpi-default-dev libmumps-dev libsuperlu3-dev libhdf5-openmpi-dev libptscotch-dev binutils-dev libiberty-dev libtrilinos-* cimg-dev
Unfortunately we are experiencing this bug, (https://github.com/trilinos/Trilinos/issues/1225) when configuring tumorcode at the moment.
We usually completely eliminate MPI from your build to avoid any potential for trouble.
Therefore we compile the Trilinos suite by ourselves. To assist people
in doing the same, we provide configure scripts located in install_helpers
.
For scientific information see http://www.uni-saarland.de/fak7/rieger/homepage/research/tumor/tumor.html