Info | ||
---|---|---|
| ||
For now, it only covers the installation of the HDC module on a GateWay cluster with the GNU GCC compiler. |
Prerequisites
To build HDC, you will need:
- c++11 compliant compiler (tested with intelstudio>=2018 and gcc>=5.0)
- gfortran >= 4.9
- Boost >= 1.48
- CMake >= 3.3
- Doxygen for documentation building
- Cython > 0.23 (there is some parsing error in 0.23)
Optionally it can use:
- Python > 3.4 (Python HDC bindings "pyHCD" and hdc-binder support)
- MATLAB > 2018a (MATLAB mex interface)
- Yahoo MDBM (recommended storage plugin working within shared memory)
- Redis + libhiredis-dev (storage plugin working within distributed memory)
- HDF5 devel libraries ((de)serialization, tested with 1.8 and 1.10)
- libs3 ((de)serialization plugin)
- flatbuffers ((de)serialization plugin)
Load modules (GCC):
Code Block language bash module load cmake/3.5.2 module load itm-gcc/6.1.0 module load zlib/1.2.8--gnu--6.1.0 szip/2.1--gnu--6.1.0 module load hdf5/1.8.17--gnu--6.1.0 module load openmpi/1.10.7--gnu--6.1.0 module load boost/1.61.0--gnu--6.1.0
- Building from source
Clone the HDC project's repository:
Code Block language bash $: git clone ssh://git@git.iter.org/imas/hdc.git
Build MDBM backend (optional)
Expand Clone the MDBM project's repository:
Code Block language bash $: git clone https://github.com/yahoo/mdbm
Navigate to local MDBM directory:
Code Block language bash $: cd mdbm
Set install prefix:
In place of $PATH variable it is needed to pass relative path to MDBM directory, e.g.: ~/projects/mdbm
Code Block language bash $: MDBM_PREFIX=$(realpath $PATH)/install $: sed -i.bak "s|/tmp/install|$MDBM_PREFIX|g" Makefile.base
Optionally disable tests (they need libcppunit, preferably):
Code Block language bash $: sed -i.bak '/SUBDIRS/s/test //' src/Makefile
And finally build & install:
Code Block language bash $: make install
Leave MDBM repository, but keep $MDBM_PREFIX variable, it will be needed later
Code Block language bash $: cd ..
Navigate to local HDC directory:
Code Block language bash $: cd hdc
Create new directory for build files:
Code Block language bash $: mkdir build
Navigate to build directory:
Code Block language bash $: cd build
- Configure a build - two possibilities: with/without MDBM previously build:
Building without previously installed MDBM module:
Code Block language bash $: cmake -DCMAKE_INSTALL_PREFIX=../install ..
Building with previously installed MDBM module:
If you have set up MDBM and you still haveMDBM_PREFIX
variable, then in order to use MDBM, please, append this tocmake
command line:-DMDBM_LIBRARY=$MDBM_PREFIX/lib64 -DMDBM_INCLUDE_DIR=$MDBM_PREFIX/include
Code Block language bash $: cmake -DCMAKE_INSTALL_PREFIX=../install -DMDBM_LIBRARY=$MDBM_PREFIX/lib64/libmdbm.so -DMDBM_INCLUDE_DIR=$MDBM_PREFIX/include ..
And finally build&install:
Code Block language bash $: make -j install
After successful build, run tests please:
Code Block language bash $: make test