-
Download the following libraries: HDF5: www.hdf5group.org/ftp/HDF5/current/src/hdf5-1.8.12.tar.gz h5py: www.h5py.org/dl/h5py-2.2.1.tar.gz moab-4.6.2: ftp.mcs.anl.gov/pub/fathom/moab-4.6.2.tar.gz boost-1.55.0: http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download
-
Create a directory for building software libraries (e.g. /home/user/software)
-
Move the tarballs you just downloaded into the software directory
-
create a directory called hdf5, h5py, moab, boost and archive in the software directory (mkdir dirname)
-
mv the hdf5-1.8.12.tar.gz tarball to the hdf5 directory
-
enter the hdf5 directory
-
run the command
tar -xf hdf5-1.8.12.tar.gz
to unpack the tarball -
mv the hdf5-1.8.12.tar.gz to the archive directory so that you don't have to download it again if something goes wrong (
mv hdf5-1.8.12.tar.gz ../archive/.
) -
create a soft link to the hdf5-1.8.12 directory called src (
ln -s hdf5-1.8.12 src
) -
create a directory called build (
mkdir build
) -
enter the build directory
-
execute the following command:
cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/user/software/hdf5 -DCMAKE_BUILD_TYPE:STRING=RELEASE -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF -DHDF5_ENABLE_USING_MEMCHECKER:BOOL=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_EXECS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_EXAMPLES:BOOL=ON -DHDF5_BUILD_CPP_LIB:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON -DHDF5_BUILD_HL_LIB:BOOL=ON ../src/
Note: /home/user/software is the absolute path to the software directory that you created Note: this command configures the build system to build shared libraries.
- execute the following commands if no errors occurred:
make
,make test
,make install
Note: Do not proceed unless all of these steps are successful!
-
open ~/.bashrc using a text editor (e.g.
emacs ~/.bashrc
) -
at the end of the file add the following lines: export LD_LIBRARY_PATH=/home/user/software/hdf5/lib:$LD_LIBRARY_PATH
Note: Shared libraries aren't loaded until a program executes (dynamic loading). The program needs to know where to look when loading shared libraries. There are several defaults that are checked first. The LD_LIBRARY_PATH environment variable allows you to append the locations that are checked for shared libraries.
- execute the following command:
exec bash
Note: This command loads in your new environment variables from .bashrc
-
mv the h5py-2.2.1.tar.gz to the h5py directory
-
enter the h5py directory
-
run the command
tar -xf h5py-2.2.1.tar.gz
to unpack the tarball -
enter the h5py-2.2.1 directory
-
execute the following command:
./setup.py build --hdf5=/home/user/software/hdf5
-
execute the following command:
./setup.py install --prefix=/home/user/software/h5py
-
open ~/.bashrc using a text editor (e.g.
emacs ~/.bashrc
) -
at the end of the file add the following lines: export PYTHONPATH=/home/user/software/h5py/lib/python2.7/site-packages:$PYTHONPATH
Note: Python has several default paths that it checks when loading modules. the PYTHONPATH environment variables allows you to append the paths where it looks.
- execute the following command:
export bash
-
mv the moab-4.6.2.tar.gz tarball to the moab directory
-
enter the moab directory
-
run the command
tar -xf moab-4.6.2.tar.gz
to unpack the tarball -
create a soft link to the moab-4.6.2 directory called src (
ln -s moab-4.6.2 src
) -
create a directory called build
-
enter the build directory
-
execute the following command:
../src/configure --prefix=/home/user/software/moab --enable-optimize --with-hdf5=/home/user/software/hdf5 --enable-64bit"
Note: MOAB currently uses a different build system called autotools
- execute the following commands if no errors occurred: make, make install
-
mv the boost_1_55_0.tar.gz tarball to the boost directory
-
enter the boost directory
-
run the command
tar -xf boost_1_55_0.tar.gz
to unpack the tarball -
enter the boost_1_55_0 directory
-
execute the following command:
./bootstrap.sh --prefix=/home/user/software/boost
-
execute the following command:
./b2 install
-
in the /home/user/software directory, create a new directory called tpor
-
enter the tpor directory
-
execute the following command:
git clone https://github.com/aprobinson/TPOR.git
-
create a directory called build
-
enter the build directory
-
copy the example configuration file from the TPOR repo (
cp ../TPOR/scripts/configure.sh .
) -
open the configure.sh file with a text editor (e.g.
emacs configure.sh
) -
set the MOAB_PREFIX_PATH variable equal to /home/user/software/moab, HDF5_PREFIX_PATH variable equal to /home/user/software/hdf5, BOOST_PREFIX_PATH variable equal to /home/user/software/boost, TPOR_PATH variable equal to /home/user/software/tpor/TPOR, CMAKE_INSTALL_PREFIX:PATH to /home/user/software/tpor/
-
close the configure.sh file
-
run the configure.sh file (
./configure.sh
)
Note: every time you run this fill it will pull down commits to the TPOR repo
- run the following commands:
make
,make test
,make install
Configure system to find tpor execs and pytpor python module 12. open ~/.bashrc using a text editor
- In the PYTHONPATH variable, add the following after the ":" /home/user/software/tpor:
Note: the variable should look like export PYTHONPATH=/home/user/software/h5py/lib/python2.7/site-packages:/home/user/software/tpor:$PYTHONPATH
- at the end of the file add the following line export PATH=/home/user/software/tpor/bin:$PATH
Note: when running commands in the terminal there are several default locations that are searched for the executables. The PATH environment variable allows you to add to that paths that are searched. Now, the tpor executables can be run from any directory without creating soft links, aliases or relative paths.
- run
exec bash
.