LAMA
|
You can check out the latest version via svn by the following commmand:
svn co https://libama.svn.sourceforge.net/svnroot/libama/trunk lama
Or you can download the tar file by this link:
libama.svn.sourceforge.net/viewvc/libama/trunk/?view=tar
Since we use CMake to control the software compilation and installation process, you should have an actual CMake version (2.8 or later) available on your platform. As recommended for CMake in general, you should use an own build directory and not build within the source directory.
cd lama mkdir release cd release cmake -DMKL_ROOT=/opt/intel/mkl -DBOOST_ROOT=/home/boost/ -DCMAKE_BUILD_TYPE=Release ../src
By using ccmake you can set individual items that will also be discussed later on this page.
BOOST_ROOT
home directory of your BOOST installation, /usr if you use a Linux installationCMAKE_BUILD_TYPE
Release, or DebugCMAKE_INSTALL_PREFIX
directory where LAMA should be installed laterCUDA_TOOLKIT_ROOT_DIR
optional, directory of your CUDA installationLAMA_ASSERT_LEVEL
ERROR recommended, alternatively DEBUGLAMA_LOG_LEVEL
INFO recommended, alternatively DEBUG or more detailled TRACELAMA_USE_CUDA
switch ON or OFFLAMA_USE_MPI
switch ON or OFFTo build LAMA just invoke make in your build directory. Parallel builds are supported and recommended.
make -j <number-of-build-processes>
LAMA uses some Boost libraries and therefore you must have an actual version (1.34 or later) installed on your machine.
Many linux installations provide an actual release of Boost and if Boost is installed, LAMA should have no problems to find it.
If for any reasons no actual Boost installation is available, you must download and install it. Please make sure that you build also the dynamic libraries. After installation you can tell cmake the location of installation by the variable BOOST_ROOT
as described above or by setting an environment variable.
export BOOST_ROOT=<path-to-boost-installation>
Via ccmake you can verify that the Boost variables needed for LAMA have correct values.
BOOST_ROOT
/home/brandes/local/boost_1_46_0
Boost_INCLUDE_DIR
/home/brandes/local/boost_1_46_0/include
Boost_LIBRARY_DIRS
/home/brandes/local/boost_1_46_0/lib
Boost_PROGRAM_OPTIONS_LIBRARY
/home/brandes/local/boost_1_46_0/lib/libboost_program_options
.soBoost_THREAD_LIBRARY
/home/brandes/local/boost_1_46_0/lib/libboost_thread
.soBoost_UNIT_TEST_FRAMEWORK_LIBR
/home/brandes/local/boost_1_46_0/lib/libboost_unit_test_framework
.soWe recommend using Intel MKL libraries for BLAS, LAPACK and (optional) ScalLAPACK routines. If the environment variable MKL_ROOT is set to the corresponding installation directory, there should be no problems at all.
export MKL_ROOT=<path-to-mkl-installation>
If the MKL is not available, LAMA tries to find other BLAS or LAPACK libraries. If it fails, you will see a typical message like this:
Could NOT find LAMA_BLAS (missing: LAMA_BLAS_LIBRARIES)
Unfortunately, the CMake modules have some problems in finding the BLAS and LAPACK libraries. Especially the module FindLAPACK.cmake
has the problem that in some versions the CMAKE_FIND_LIBRARY_SUFFIXES
variable was misspelled as CMAKE_FIND_LIBRRAY_SUFFIXES
. Here is a solution how to specify the corresponding libraries directly:
cmake -DBLAS_blas_LIBRARY=/usr/lib64/libblas.so.3 \ -DLAPACK_lapack_LIBRARY=/usr/lib64/liblapack.so.3
ScaLAPACK is optional and only needed if you need to build the inverse of a distributed matrix.
If you want to use MPI, please make sure that a version of MPI (e.g. OpenMPI) is installed on your machine, and that mpirun is in your path. By this way, the FindMPI module of cmake will recognize your MPI installation.
LAMA itself uses the following MPI variables:
MPI_CXX_COMPILER
for the MPI C++ compiler, e.g. mpicxxMPI_CXX_INCLUDE_PATH
for the include file, e.g. /usr/local/openmpi-1.4.3/includeMPI_CXX_LIBRARIES
for the libraries to be linked, e.g. /usr/local/openmpi-1
.4.3/lib/libmpi_cxx.so;/usr/local/openmpi-1.4.3/lib/libmpi.so;...MPI is optional and LAMA can be built without it. But you will not be able to take advantage of distributed vectors and matrices.
LAMA supports GPU accelearators via CUDA. This feature is optional.
If CUDA is installed on your machine, LAMA should find it if it is in one of the system directories. Otherwise you can give cmake the hint by the variable LAMA_ROOT
.
To build LAMAs doxygen API documentation call
make doc
Documentation is available in the directory <project-root>/doc/doxygen/html
, open the file index.html
in your browser and the system documentation is available.
To install LAMA to the configured installation path just call
make install
in your build directory.
For your convenience, we recommend to set the environment variable LAMA_ROOT
to this installation directory.
export LAMA_ROOT=<installation-directory>
Examples can be found in the directory <project-root>/share/tutorial
.
cd test export LAMA_LOG=config export LAMA_UNSUPPORTED=IGNORE lama_test
If some software components could not be found, we recommend using ccmake where you can set variables individually.
ccmake .
In case of troubles with MPI or CUDA, please make sure that your installation works at least without these optional features.