« Previous - Version 23/25 (diff) - Next » - Current version
Brian Granzow, 11/12/2014 12:11 pm


Installing Trilinos

Albany uses many packages from Trilinos, and the SCOREC tools are built as a set of packages inside Trilinos when the below procedure is followed.

Albany and the required software stack is built nightly and the results submitted to "CDash":

http://my.cdash.org/index.php?project=Albany

The CDash setup scripts for this dashboard are located in the Albany repository at:

Albany/doc/dashboards/avatar.scorec.rpi.edu

These scripts are an excellent place to look for a current set of install and test procedures for Albany and the supporting software stack.

NOTE!

A stable version of Trilinos is already available on SCOREC machines. Unless you have specific development related to Trilinos
(which is unlikely), you can build Albany using an existing install of Trilinos, as seen in Installing_Albany.

Trilinos Quick Reference Guide

A quick reference guide to building and installing Trilinos is maintained at:

http://trilinos.sandia.gov/TrilinosBuildQuickRef.html

This guide covers specific details about many of the build options and the cmake commands available.

Set environment variables

The build process needs to find the mpicxx wrappers and mpi libraries. Some third party libraries also exist on SCOREC systems.

Example:

source /usr/local/etc/bash_profile
module load cmake/latest
module load mpich3/3.1.2-thread-multiple

Get trilinos source from the public repo

Make a base Trilinos directory, where you plan for the Trilinos source to exist and set this directory as $TRILINOS_SRC.

Example:

mkdir Trilinos
cd Trilinos
export TRILINOS_SRC=$PWD
git clone https://software.sandia.gov/trilinos/repositories/publicTrilinos

Checkout SCOREC git repo under publicTrilinos folder

cd $TRILINOS_SRC/publicTrilinos
git checkout https://github.com/SCOREC/core.git SCOREC

Note: it is mandatory that the SCOREC checkout directory is placed directly in the publicTrilinos directory, and the Trilinos build
"builds" the SCOREC tools as part of the overall process.

Configuring

Note: build-dir can be anywhere but in the Trilinos source directory.

mkdir build-dir
cd build-dir
***CREATE do-configure shell script***
chmod +x do-configure
./do-configure

Example do-configure script:


#!/bin/sh

BUILD_DIR=`pwd`
INSTALL_DIR=/lore/granzb/trilinos/install
TRILINOS_HOME=/lore/granzb/trilinos/src
MPI_BASE_DIR=/usr/local/mpich3/3.1.2-thread-multiple
BOOSTDIR=/lore/dibanez/trilinos
NETCDF=/lore/dibanez/trilinos
HDF5DIR=/lore/dibanez/trilinos
ZLIB_DIR=/usr
PARMETISDIR=/usr/local/parmetis/4.0.3/mpich3.1.2
SUPERLUDIR=/lore/dibanez/trilinos
export BOOST_ROOT=$BOOSTDIR
EXTRA_ARGS=$@

cmake \
  -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \
  -D CMAKE_BUILD_TYPE:STRING=NONE \
  -D CMAKE_C_FLAGS:STRING="-O2 -g" \
  -D CMAKE_CXX_FLAGS:STRING="-O2 -g" \
  -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
\
  -D Trilinos_VERBOSE_CONFIGURE:BOOL=OFF \
  -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING="" \
  -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
  -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
  -D Trilinos_ASSERT_MISSING_PACKAGES:BOOL=OFF \
  -D Trilinos_ENABLE_EXPORT_MAKEFILES:BOOL=OFF \
  -D Trilinos_ENABLE_TESTS:BOOL=OFF \
  -D Trilinos_ENABLE_EXAMPLES:BOOL=OFF \
\
  -D Trilinos_ENABLE_SCOREC:BOOL=ON \
  -D Trilinos_EXTRA_REPOSITORIES:STRING=SCOREC \
  -D SCOREC_DISABLE_STRONG_WARNINGS:BOOL=ON \
\
  -D TPL_ENABLE_MPI:BOOL=ON \
  -D MPI_BASE_DIR:PATH=$MPI_BASE_DIR \
\
  -D TPL_ENABLE_BoostLib:BOOL=ON \
  -D TPL_ENABLE_BoostAlbLib:BOOL=ON \
  -D Boost_INCLUDE_DIRS:FILEPATH=$BOOSTDIR/include \
  -D Boost_LIBRARY_DIRS:FILEPATH=$BOOSTDIR/lib \
  -D BoostLib_INCLUDE_DIRS:FILEPATH=$BOOSTDIR/include \
  -D BoostLib_LIBRARY_DIRS:FILEPATH=$BOOSTDIR/lib \
  -D BoostAlbLib_INCLUDE_DIRS:FILEPATH=$BOOSTDIR/include \
  -D BoostAlbLib_LIBRARY_DIRS:FILEPATH=$BOOSTDIR/lib \
\
  -D TPL_ENABLE_HDF5:BOOL=ON \
  -D HDF5_INCLUDE_DIRS:PATH=$HDF5DIR/include \
  -D HDF5_LIBRARY_DIRS:PATH=$HDF5DIR/lib \
\
  -D TPL_ENABLE_Netcdf:BOOL=ON \
  -D TPL_Netcdf_INCLUDE_DIRS:PATH=$NETCDF/include \
  -D Netcdf_LIBRARY_DIRS:PATH=$NETCDF/lib \
\
  -D TPL_ENABLE_ParMETIS:STRING=ON \
  -D ParMETIS_INCLUDE_DIRS:PATH=$PARMETISDIR/include \
  -D ParMETIS_LIBRARY_DIRS:PATH=$PARMETISDIR/lib \
\
  -D TPL_ENABLE_SuperLU:BOOL=ON \
  -D SuperLU_INCLUDE_DIRS:PATH="${SUPERLUDIR}/include" \
  -D SuperLU_LIBRARY_DIRS:PATH="${SUPERLUDIR}/lib" \
\
  -D TPL_ENABLE_Matio:BOOL=OFF \
  -D TPL_ENABLE_X11:BOOL=OFF \
\
  -D Trilinos_ENABLE_Zoltan:BOOL=ON \
  -D Trilinos_ENABLE_Zoltan2:BOOL=ON \
  -D Zoltan2_ENABLE_Experimental:BOOL=ON\
  -D Zoltan_ENABLE_ULONG_IDS:BOOL=ON \
  -D ZOLTAN_BUILD_ZFDRIVE:BOOL=OFF \
\
  -D Trilinos_ENABLE_Kokkos:BOOL=ON \
  -D Trilinos_ENABLE_KokkosCore:BOOL=ON \
  -D Trilinos_ENABLE_KokkosContainers:BOOL=ON \
  -D Trilinos_ENABLE_KokkosLinAlg:BOOL=ON \
  -D Trilinos_ENABLE_KokkosCompat:BOOL=ON \
\
  -D Trilinos_ENABLE_Teuchos:BOOL=ON \
  -D Teuchos_ENABLE_COMPLEX:BOOL=OFF \
\
  -D Trilinos_ENABLE_Phalanx:BOOL=ON \
  -D Phalanx_ENABLE_TEUCHOS_TIME_MONITOR:BOOL=ON \
\
  -D Trilinos_ENABLE_Stokhos:BOOL=ON \
  -D Stokhos_ENABLE_TEUCHOS_TIME_MONITOR:BOOL=ON \
\
  -D Trilinos_ENABLE_Stratimikos:BOOL=ON \
  -D Stratimikos_ENABLE_TEUCHOS_TIME_MONITOR:BOOL=ON \
\
  -D Trilinos_ENABLE_Piro:BOOL=ON \
  -D Trilinos_ENABLE_Shards:BOOL=ON \
  -D Trilinos_ENABLE_Sacado:BOOL=ON \
  -D Trilinos_ENABLE_Epetra:BOOL=ON \
  -D Trilinos_ENABLE_EpetraExt:BOOL=ON \
  -D Trilinos_ENABLE_Ifpack:BOOL=ON \
  -D Trilinos_ENABLE_AztecOO:BOOL=ON \
  -D Trilinos_ENABLE_Amesos:BOOL=ON \
  -D Trilinos_ENABLE_Anasazi:BOOL=ON \
  -D Trilinos_ENABLE_Belos:BOOL=ON \
  -D Trilinos_ENABLE_ML:BOOL=ON \
  -D Trilinos_ENABLE_Intrepid:BOOL=ON \
  -D Trilinos_ENABLE_NOX:BOOL=ON \
  -D Trilinos_ENABLE_Thyra:BOOL=ON \
  -D Trilinos_ENABLE_Rythmos:BOOL=ON \
  -D Trilinos_ENABLE_MOOCHO:BOOL=ON \
  -D Trilinos_ENABLE_OptiPack:BOOL=ON \
  -D Trilinos_ENABLE_GlobiPack:BOOL=ON \
  -D Trilinos_ENABLE_Isorropia:BOOL=ON\
  -D Trilinos_ENABLE_Galeri:BOOL=ON\
  -D Trilinos_ENABLE_STKIO:BOOL=ON \
  -D Trilinos_ENABLE_STKMesh:BOOL=ON \
  -D Trilinos_ENABLE_SEACASExodus:BOOL=ON \
  -D Trilinos_ENABLE_Teko:BOOL=ON \
  -D Trilinos_ENABLE_MueLu:BOOL=ON \
  -D Trilinos_ENABLE_Ifpack2:BOOL=ON \
  -D Trilinos_ENABLE_Amesos2:BOOL=ON \
  -D Trilinos_ENABLE_TrilinosCouplings:BOOL=ON \
  -D Trilinos_ENABLE_Tpetra:BOOL=ON \
  -D Trilinos_ENABLE_ThyraTpetraAdapters:BOOL=ON \
  -D Trilinos_ENABLE_Didasko:BOOL=ON \
  -D Trilinos_ENABLE_ThreadPool:BOOL=ON \
  -D Trilinos_ENABLE_SEACASIoss:BOOL=ON \
  -D Trilinos_ENABLE_Pamgen:BOOL=ON \
  -D Trilinos_ENABLE_SECONDARY_STABLE_CODE:BOOL=ON \
\
  -D Trilinos_ENABLE_DEBUG:BOOL=OFF \
  -D Trilinos_ENABLE_FEI:BOOL=OFF\
  -D Trilinos_ENABLE_Mesquite:BOOL=OFF\
  -D Trilinos_ENABLE_TriKota:BOOL=OFF \
  -D Trilinos_ENABLE_STKClassic:BOOL=OFF \
\
${TRILINOS_HOME}

note: if you followed the instructions at Installing_Required_Libraries_for_Trilinos, you will need to modify the directories
above for BOOST_DIR, NETCDF, and HDFDIR

Building Trilinos / SCOREC tools

  • Building all targets for all enabled packages
    make -j N # where N is the number processes to use
    

Installing

make install

Testing

  • Testing all packages
    ctest