« Previous - Version 24/25 (diff) - Next » - Current version
Brian Granzow, 08/20/2015 04:14 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.

Building Trilinos and Third Party Libraries

There are good instructions to build Trilinos and third party libraries on various architectures

https://github.com/gahansen/Albany/wiki/Building-Albany-and-supporting-tools

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 git
module load cmake
module load mpich3/3.1.2-thread-multiple
module load gcc/4.9.2

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:

# Modify these paths for your system.
TOOLS=/lore/dibanez/trilinos/TPL_install
TRILINSTALLDIR=../install
MPIDIR=/usr/local/mpich3/3.1.2-thread-multiple/bin
BOOSTDIR=$TOOLS
NETCDFDIR=$TOOLS
HDF5DIR=$TOOLS
SUPERLUDIR=$TOOLS
PARMETISDIR=/usr/local/parmetis/4.0.3/mpich3.1.2
HAVE_LL=ON

rm -f CMakeCache.txt;

cmake \
\
 -D Trilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON \
 -D CMAKE_INSTALL_PREFIX:PATH=$TRILINSTALLDIR \
 -D CMAKE_BUILD_TYPE:STRING=NONE \
 -D TPL_ENABLE_MPI:BOOL=ON \
 -D MPI_BASE_DIR:PATH=$MPIDIR \
 -D CMAKE_C_FLAGS:STRING="-O2 -g" \
 -D CMAKE_CXX_FLAGS:STRING="-O2 -g -Wno-deprecated-declarations -Wno-sign-compare" \
 -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
 -D BUILD_SHARED_LIBS:BOOL=ON \
 -D Trilinos_EXTRA_LINK_FLAGS:STRING="-ldl" \
 -D Trilinos_ENABLE_SECONDARY_TESTED_CODE:BOOL=OFF \
\
 -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
 -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING="" \
 -D Trilinos_ENABLE_Teuchos: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_Phalanx:BOOL=ON \
 -D Trilinos_ENABLE_Intrepid:BOOL=ON \
 -D Trilinos_ENABLE_NOX:BOOL=ON \
 -D Trilinos_ENABLE_Stratimikos:BOOL=ON \
 -D Trilinos_ENABLE_Thyra:BOOL=ON \
 -D Trilinos_ENABLE_Rythmos:BOOL=ON \
 -D Trilinos_ENABLE_MOOCHO:BOOL=ON \
 -D Trilinos_ENABLE_Stokhos:BOOL=ON \
 -D Trilinos_ENABLE_Piro:BOOL=ON \
 -D Trilinos_ENABLE_Teko:BOOL=ON \
\
 -D Trilinos_ENABLE_STKIO:BOOL=ON \
 -D Trilinos_ENABLE_STKMesh:BOOL=ON \
 -D TPL_ENABLE_Boost:BOOL=ON \
 -D Boost_INCLUDE_DIRS:FILEPATH="$BOOSTDIR/include" \
 -D Boost_LIBRARY_DIRS:FILEPATH="$BOOSTDIR/lib" \
 -D TPL_ENABLE_BoostLib:BOOL=ON \
 -D BoostLib_INCLUDE_DIRS:FILEPATH="$BOOSTDIR/include" \
 -D BoostLib_LIBRARY_DIRS:FILEPATH="$BOOSTDIR/lib" \
\
 -D Trilinos_ENABLE_SEACAS:BOOL=ON \
 -D TPL_ENABLE_X11:BOOL=OFF \
 -D TPL_ENABLE_Matio:BOOL=OFF \
 -D Trilinos_ENABLE_SEACASIoss:BOOL=ON \
 -D Trilinos_ENABLE_SEACASExodus:BOOL=ON \
 -D TPL_ENABLE_Netcdf:BOOL=ON \
 -D Netcdf_INCLUDE_DIRS:PATH="$NETCDFDIR/include" \
 -D Netcdf_LIBRARY_DIRS:PATH="$NETCDFDIR/lib" \
 -D TPL_ENABLE_HDF5:BOOL=ON \
 -D HDF5_INCLUDE_DIRS:PATH="$HDF5DIR/include" \
 -D HDF5_LIBRARY_DIRS:PATH="$HDF5DIR/lib" \
\
 -D Trilinos_ENABLE_Tpetra:BOOL=ON \
 -D Trilinos_ENABLE_Kokkos:BOOL=ON \
 -D HAVE_INTREPID_KOKKOSCORE:BOOL=ON \
 -D Trilinos_ENABLE_Ifpack2:BOOL=ON \
 -D Trilinos_ENABLE_Amesos2:BOOL=ON \
 -D Trilinos_ENABLE_Zoltan2:BOOL=ON \
 -D Trilinos_ENABLE_MueLu:BOOL=ON \
 -D Amesos2_ENABLE_KLU2:BOOL=ON \
\
 -D Trilinos_ENABLE_SCOREC:BOOL=ON \
 -D Trilinos_ENABLE_EXPORT_MAKEFILES:BOOL=OFF \
 -D Trilinos_ASSERT_MISSING_PACKAGES:BOOL=OFF \
\
 -D TPL_ENABLE_ParMETIS:STRING=ON \
 -D ParMETIS_INCLUDE_DIRS:PATH="$PARMETISDIR/include" \
 -D ParMETIS_LIBRARY_DIRS:PATH="$PARMETISDIR/lib" \
 -D TPL_ENABLE_METIS:STRING=ON \
 -D METIS_INCLUDE_DIRS:PATH="$PARMETISDIR/include" \
 -D METIS_LIBRARY_DIRS:PATH="$PARMETISDIR/lib" \
 -D Zoltan_ENABLE_ULLONG_IDS:BOOL=ON \
 -D Teuchos_ENABLE_LONG_LONG_INT:BOOL=$HAVE_LL \
\
 -D Trilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON \
 -D Tpetra_INST_FLOAT=OFF \
 -D Tpetra_INST_INT_INT=ON \
 -D Tpetra_INST_DOUBLE=ON \
 -D Tpetra_INST_COMPLEX_FLOAT=OFF \
 -D Tpetra_INST_COMPLEX_DOUBLE=OFF \
 -D Tpetra_INST_INT_LONG=OFF \
 -D Tpetra_INST_INT_UNSIGNED=OFF \
 -D Tpetra_INST_INT_LONG_LONG=$HAVE_LL \
\
../src

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