Installing Required Libraries for Trilinos


If you are installing Trilinos on SCOREC machines, these steps have already been completed. It is not necessary to reproduce them
for your own Trilinos build. During configuring for Trilinos, you can point to the existing installed software, as seen in

Set environment variables

The build process needs to find the mpicxx wrappers and mpi libraries, as well as the tools being compiled below. Note that I have installed everything in /users/ghansen


  export PATH=/users/ghansen/bin:$PATH
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/users/ghansen/lib:/users/ghansen/lib64
  export TMPDIR=/tmp

Install cmake 2.8.4 or higher

Source archive:

Note: compiling cmake fully-optimized significantly speeds up the following configure processes.

tar xvf cmake-
export CXXFLAGS=-O3
./bootstrap --prefix=/users/ghansen
make install
ctest (skip if unwanted)

Install Boost

Source archive:

Note that the spaces in the echo line, around the ":" and ";", are significant.

tar xzf boost_1_55_0.tar.gz
cd boost_1_55_0
echo "using mpi : /users/ghansen/bin/mpicxx ;" >> ./tools/build/v2/user-config.jam
./ --with-libraries=signals,regex,filesystem,system,mpi,serialization,thread,program_options,exception --prefix=/users/ghansen
./b2 -j 4
./b2 -j 4 install

Note: If you are using the Intel compiler (composer_xe_2013), the build instructions are somewhat different:

echo "using mpi : /users/ghansen/intel/bin/mpicxx ;using mpi :" >> ./tools/build/v2/user-config.jam
echo "using intel-linux : /users/ghansen/intel/bin/icpc ;" >> ./tools/build/v2/user-config.jam
./ --with-toolset=intel-linux --with-libraries=signals,regex,filesystem,system,mpi,serialization,thread,program_options --prefix=/users/ghansen
./b2 -j 4
./b2 -j 4 install

The above bjam command gave me an error, so I removed the following lines from project-config.jam:

if ! intel-linux in [ feature.values <toolset> ]
    using intel-linux ;

I also had a compile error with std::complex<T> not being found in the resolution of #include<complex>. I added the path to a known definition:

export CPLUS_INCLUDE_PATH=/users/ghansen/include/c++/4.7.2:/usr/include/c++/4.1.2

Install zlib 1.2.8

Source archive:

tar xzf zlib-1.2.8.tar.gz
cd zlib-1.2.8
CC=mpicc CFLAGS="-O3" ./configure --prefix=/users/ghansen
make install

Install HDF5 v1.8.9 in parallel

Source archive:

tar xzf hdf5-1.8.9.tar.gz
cd hdf5-1.8.9
./configure CC=mpicc FC=mpif90 CXX=mpicxx CXXFLAGS="-fPIC -O3" CFLAGS="-fPIC -O3" FCFLAGS="-fPIC -O3" --enable-parallel --with-zlib=/users/ghansen/lib -prefix=/users/ghansen/parallel
make install
make check (skip if unwanted)

Install NETCDF with parallel I/O

source archive:

tar xvf netcdf-
cd netcdf-

Edit the file include/netcdf.h. Make the following edits near line 191:

#define NC_MAX_DIMS    65536    /* max dimensions per file */
#define NC_MAX_ATTRS    8192    
#define NC_MAX_VARS   524288    /* max variables per file */
#define NC_MAX_NAME   256 
#define NC_MAX_VAR_DIMS      8     /* max per variable dimensions */

./configure --prefix=/users/ghansen/parallel CC=mpicc FC=mpif90 CXX=mpicxx CFLAGS="-I/users/ghansen/parallel/include -O3" LDFLAGS=-L/users/ghansen/parallel/lib --disable-fsync --disable-cdmremote --disable-dap --disable-shared --disable-doxygen
make install
make check (skip if unwanted)

Install Parmetis v4.0.3


Install SuperLU_4.3 (Optional)

SuperLU can be used as a coarse solver for the ML preconditioner, and is needed for Amesos2 when the Tpetra branch of Albany is built.

source archive:

Build install paths:

tar -xvf superlu_4.3.tar.gz
cd SuperLU_4.3
mkdir /users/ghansen/SuperLU_4.3
mkdir /users/ghansen/SuperLU_4.3/include
mkdir /users/ghansen/SuperLU_4.3/lib

Edit "" file for your machine and environment. I used the following on "avatar":

PLAT = _linux
SuperLUroot     = /users/ghansen/SuperLU_4.3
SUPERLULIB      = $(SuperLUroot)/lib/libsuperlu_4.3.a
TMGLIB          = libtmglib.a
BLASLIB         = -L/usr/lib -lblas
LIBS            = $(SUPERLULIB) $(BLASLIB)
ARCH         = ar
RANLIB       = ranlib
CC           = gcc
CFLAGS       = -DPRNTlevel=0 -O3
NOOPTS       =
FORTRAN      = gfortran
FFLAGS       = -O2
LOADER       = $(CC)
CDEFS        = -DAdd_
#MATLAB       = /usr/sww/matlab

Now, build:

make -j 4
cd SRC/include
cp *.h /users/ghansen/SuperLU_4.3/include