Skip to content
Evert Jans edited this page Dec 3, 2013 · 9 revisions

Welcome

Welcome to my wiki! This explains how to install a H5FDdsm environment onto a Linux (Ubuntu 12.04LTS) pc.

Using H5FDdsm

First we need to get some aptitude packages like gcc and make:

$ sudo apt-get install gcc cmake cmake-curses-gui make g++ git

Because of interfering libraries on the youBot we will install the environment locally. If this is not nessesary some parts can be sourced from the repository:

($ sudo apt-get install libopenmpi1.5-2 mpich2 libmpich2-3)

We now continue assuming a local install of all needed libraries.

Clone the custom files from this H5FDdsm repository:

$ cd ~/
$ git clone https://github.com/ejans/h5fddsm.git

Get the source files:

$ cd ~/h5fddsm
$ wget http://www.mpich.org/static/downloads/1.4rc2/mpich2-1.4rc2.tar.gz \
$ http://hpcforge.org/frs/download.php/59/h5fddsm-0.9.9.tar.bz2 \
$ http://hpcforge.org/frs/download.php/57/hdf5-vfd-1.8.9.tar.bz2

Create a local folder in your home directory:

$ mkdir ~/local

Start with the mpich source:

We would like to create position-independent code. To do this we have to export the following flags:

$ export CFLAGS=-fPIC CPPFLAGS=-fPIC CXXFLAGS=-fPIC

Now configure and install the mpich source:

$ cd ~/h5fddsm
$ tar -xf mpich2-1.4rc2.tar.gz
$ cd mpich2-1.4rc2
$ ./configure --prefix=$HOME/local --enable-shared \
$ --enable-sharedlibs=gcc --disable-f77 --disable-fc
$ make -j4
$ make install

Continue with the hdf5 source:

$ cd ~/h5fddsm
$ tar -xf hdf5-vfd-1.8.9.tar.bz2
$ cd hdf5-vfd-1.8.9
$ mkdir build
$ cd build
$ ccmake ..

Press c to begin and after each change press c again. Press t to toggle advanced mode and set the following parameters:

BUILD_SHARED_LIBS                ON
CMAKE_INSTALL_PREFIX             /home/User/local
HDF5_BUILD_CPP_LIB               OFF
HDF5_BUILD_FORTRAN               OFF
HDF5_BUILD_HL_LIB                ON
HDF5_BUILD_TOOLS                 ON
HDF5_ENABLE_HSIZET               ON
HDF5_ENABLE_LARGE_FILE           ON
HDF5_ENABLE_PARALLEL             ON
HDF5_ENABLE_Z_LIB_SUPPORT        OFF

The following should be set automatically, these have to be set manual if a different version of mpi is already installed.

MPIEXEC                          /home/User/local/bin/mpiexec
MPI_CXX_COMPILER                 /home/User/local/bin/mpicxx 
MPI_CXX_COMPILE_FLAGS            -fPIC
MPI_CXX_INCLUDE_PATH             /home/User/local/include

MPI_CXX_LIBRARIES                /home/User/local/lib/libmpichcxx.so;
                                 /home/User/local/lib/libmpich.so;
                                 /home/User/local/libopa.so;
                                 /home/User/local/lib/libmpl.so;
                                 /usr/lib/x86_64-linux-gnu/librt.so;
                                 /usr/lib/x86_64-linux-gnu/libpthread.so

MPI_CXX_LINK_FLAGS                -Wl,-rpath  -Wl,/home/User/local/lib 
MPI_C_COMPILER                   /home/User/local/bin/mpicc
MPI_C_COMPILE_FLAGS               -fPIC  -fPIC      
MPI_C_INCLUDE_PATH               /home/User/local/include

MPI_C_LIBRARIES                  /home/User/local/lib/libmpich.so;
                                 /home/User/local/lib/libopa.so;
                                 /home/User/local/lib/libmpl.so;
                                 /usr/lib/x86_64-linux-gnu/librt.so;
                                 /usr/lib/x86_64-linux-gnu/libpthread.so

MPI_C_LINK_FLAGS                  -Wl,-rpath,/home/User/local/lib

MPI_EXTRA_LIBRARY                /home/User/local/lib/libmpich.so;
                                 /home/User/local/lib/libopa.so;
                                 /home/User/local/lib/libmpl.so;
                                 /usr/lib/x86_64-linux-gnu/librt.so;
                                 /usr/lib/x86_64-linux-gnu/libpthread.so

MPI_LIBRARY                      /home/User/local/lib/libmpichcxx.so
CMAKE_CXX_FLAGS                  -fPIC

Press c again and g to configure and exit.

Now make:

$ make -j4
$ make install

Now start the h5fddsm part:

$ cd ~/h5fddsm
$ tar -xf h5fddsm-0.9.9.tar.bz2
$ cd h5fddsm-0.9.9
$ mkdir build
$ cd build
$ ccmake ..

Some paths have to be set:

BUILD_SHARED_LIBS                ON
BUILD_TESTING                    ON
CMAKE_CXX_FLAGS                  -fPIC
CMAKE_C_FLAGS                    -fPIC
CMAKE_INSTALL_PREFIX             /home/User/local/
HDF5_DIR                         /home/User/local/share/cmake/hdf5
HDF5_INCLUDE_DIR                 /home/User/local/include
MPI_EXEC                         /home/User/local/bin/mpiexec
MPI_CXX_COMPILER                 /home/User/local/bin/mpicxx
MPI_CXX_COMPILE_FLAGS             -fPIC
MPI_CXX_INCLUDE_PATH             /home/User/local/include

MPI_CXX_LIBRARIES                /home/User/local/lib/libmpichcxx.so;
                                 /home/User/local/lib/libmpich.so;
                                 /home/User/local/lib/libopa.so;
                                 /home/User/local/lib/libmpl.so;
                                 /usr/lib/x86_64-linux-gnu/librt.so;
                                 /usr/lib/x86_64-linux-gnu/libpthread.so;
				 
MPI_CXX_LINK_FLAGS                -Wl,-rpath  -Wl,/home/User/local/lib
MPI_C_COMPILER                   /home/User/local/bin/mpicc
MPI_C_COMPILE_FLAGS               -fPIC  -fPIC
MPI_C_INCLUDE_PATH               /home/User/local/include

MPI_C_LIBRARIES                  /home/User/local/lib/libmpich.so;
                                 /home/User/local/lib/libopa.so;
                                 /home/User/local/lib/libmpl.so;
                                 /usr/lib/x86_64-linux-gnu/librt.so;
                                 /usr/lib/x86_64-linux-gnu/libpthread.so

MPI_C_LINK_FLAGS                  -Wl,-rpath,/home/User/local/lib

MPI_EXTRA_LIBRARY                /home/User/local/lib/libmpich.so;
                                 /home/User/local/lib/libopa.so;
                                 /home/User/local/lib/libmpl.so;
                                 /usr/lib/x86_64-linux-gnu/librt.so;
                                 /usr/lib/x86_64-linux-gnu/libpthread.so;
				  
MPI_LIBRARY                      /home/User/local/lib/libmpichcxx.so

Press c again and g to configurate and exit. Now make:

$ make -j4

We don't install this part because we want to recompile the changed test code.

Copy the changed source files from the BUP folder and make:

$ cd ~/h5fddsm/BUP
$ cp H* ../h5fddsm-0.9.9/Testing 
$ cp runReceiver.sh ../h5fddsm-0.9.9/build/bin
$ cd ../h5fddsm-0.9.9/build
$ make -j4

We can test the software by running a testprogram locally.

On one terminal run:

$ cd ~/h5fddsm/h5fddsm-0.9.9/build/bin
$ ./H5FDdsmReceiver_cwrite_auto

On a second terminal run:

$ cd ~/h5fddsm/h5fddsm-0.9.9/build/bin
$ ./H5FDdsmSender_cwrite_cread

Have fun!

License

See COPYING

Acknowledgement

This work is based on the H5FDdsm library.

The research leading to these results has received funding from the European Community's Seventh Framework Programme under grant agreement no. FP7-600958 (SHERPA: Smart collaboration between Humans and ground-aErial Robots for imProving rescuing activities in Alpine environments)

Clone this wiki locally