wiki:CommonBuild
Last modified 4 years ago Last modified on 06/26/13 13:18:04

Getting Code

  • CULA Dense Matrix Downloads
  • GDAL
  • liblas
  • tpie - git clone git://github.com/thomasmoelhave/tpie.git
  • terrastream (private) - git clone swat:/home/adanner/research/terrastream
  • mpi_gis (semi-private) - git clone gitrepos:mpi_gis

Stampede pre-config

Add the following to .profile_user and run . ~/.profile_user to make the updates take effect immediately

export BOOST_ROOT=$TACC_BOOST_DIR
export CMAKE_INCLUDE_PATH=$HOME/local/cula/include/:$HOME/local/include/

Building CULA

Stampede is using CUDA 5.0 and needs CULA R17

sh cula_dense_free_R17-linux.run
install in $HOME/local/cula

Keeneland is using CUDA 4.2 and needs CULA R15

sh cula_dense_free_R15-linux.run
install in $HOME/local/cula
cd $HOME/local/cula

Longhorn is using CUDA 4.1 and needs CULA R14

sh cula_dense_free_R14-linux64.run
install in $HOME/local/cula
cd $HOME/local/cula
mv lib lib32
mv lib64 lib
cd lib
mv libcublas.so.4.1.28 libcublas_cula.so.4.1.28
mv libcudart.so.4.1.28 libcudart_cula.so.4.1.28
\rm libcublas.so libcublas.so.4 libcudart.so libcudart.so.4
ln -s libcudart_cula.so.4.1.28 libcudart_cula.so
ln -s libcudart_cula.so.4.1.28 libcudart_cula.so.4
ln -s libcublas_cula.so.4.1.28 libcublas_cula.so
ln -s libcublas_cula.so.4.1.28 libcublas_cula.so.4

Forge is using CUDA 4.0 and needs CULA R12

sh cula_R12-linux64.run
install in $HOME/local/cula
cd $HOME/local/cula
mv lib lib32
mv lib64 lib
cd lib
mv libcublas.so.4.0.17 libcublas_cula.so.4.0.17
mv libcudart.so.4.0.17 libcudart_cula.so.4.0.17
\rm libcublas.so libcublas.so.4 libcudart.so libcudart.so.4
ln -s libcudart_cula.so.4.0.17 libcudart_cula.so
ln -s libcudart_cula.so.4.0.17 libcudart_cula.so.4
ln -s libcublas_cula.so.4.0.17 libcublas_cula.so
ln -s libcublas_cula.so.4.0.17 libcublas_cula.so.4

Building GDAL

mkdir packages
cd packages
wget http://download.osgeo.org/gdal/1.10.0/gdal-1.10.0.tar.gz
tar xzvf gdal-1.10.0.tar.gz
cd gdal-1.10.0
CXXFLAGS='-O2 -D_LARGE_FILE_SOURCE -D_FILE_OFFSET_BITS=64' \
CFLAGS='-O2 -D_LARGE_FILE_SOURCE -D_FILE_OFFSET_BITS=64' \
./configure --prefix=$HOME/local/
make -j4
make install

Building liblas

cd ~/packages
wget http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz
tar xzvf libLAS-1.7.0.tar.gz
cd libLAS-1.7.0
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/local/ ..
make -j8 
make install

Building tpie

cd ~/packages
git clone git://github.com/thomasmoelhave/tpie.git
cd tpie
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/local/ ..

There is a bug in the cmake/boost version installed on keeneland. The cmake command should be

cmake -DCMAKE_INSTALL_PREFIX=$HOME/local/ -DBoost_INCLUDE_DIR=$BOOST_INCLUDE ..

see StackOverflow

make -j8
make install

tpie is currently incompatible with the version of boost on keeneland, but the fix is minor. Change

if (!boost::filesystem::exists(argv[i], ec))

to

if (!boost::filesystem::exists(argv[i]))

in

apps/merge_fractions/merge_fractions.cpp

Building terrastream

cmake -DUSE_EXTERNAL_TPIE=ON -DTPIE_INCLUDE_DIRS=$HOME/local/include \
   -DUSE_QT_GUI=OFF -DUSE_NCURSES_GUI=OFF -DWITH_TESTING=OFF \
   -DGDAL_INCLUDE_DIR=$HOME/local/include -DLIBLAS_BINARY_DIR=$HOME/local/bin ..

Building mpi_gis

git clone gitrepos:mpi_gis
#then build
cd mpi_gis/
mkdir build
cd build
cmake -DTPIE_INCLUDE_DIRS=$HOME/local/include/ -DCULA_INCLUDE_DIRS=$HOME/local/cula/include/ ..

On Keeneland use

cmake -DTPIE_INCLUDE_DIRS=$HOME/local/include/ -DCULA_INCLUDE_DIRS=$HOME/local/cula/include/ -DBoost_INCLUDE_DIR=$BOOST_INCLUDE  ..
make -j8