-
Notifications
You must be signed in to change notification settings - Fork 90
Albany: Building Trilinos from scratch
Most of the effort of building Albany is in configuring and building Trilinos. An instructional Trilinos configuration script is available at
Albany/doc/do-cmake-trilinos-instructional
Frequent Issues
Build time. If you find that rebuilding Albany after making a change to a source file is taking a long time (more than 15s to 1 minute, depending on file), there are typically two basic causes: (1) building Trilinos without explicit template instantiation (ETI) and (2) configuring Trilinos to build static instead of shared libraries. ETI compiles many of Trilinos's headers so that the Albany build does not have to. Building Albany against Trilinos shared libraries means that the linker does not have to build a large static executable. The script above shows how to build with ETI and shared libraries. The runtime cost of using shared libraries is on the order of 1 second at program startup.
Changes by large transition
This is a summary of changes to the Trilinos configuration as a function of large software transitions. You don't need to read this summary if you're building Albany well after these transitions have occurred.
(Nov 2014 transition) If you can already build the Epetra-only Albany, add these lines to your Trilinos configuration file to build the Tpetra-enabled Albany:
-D Trilinos_ENABLE_Tpetra:BOOL=ON \
-D Trilinos_ENABLE_Kokkos: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 \
(Feb 2015 transition) If you then can build the Tpetra-enabled Albany, add these lines to build the basic Kokkos-enabled Albany:
-D Trilinos_ENABLE_Kokkos:BOOL=ON \
-D Trilinos_ENABLE_KokkosCore:BOOL=ON \
-D Phalanx_KOKKOS_DEVICE_TYPE:STRING="SERIAL" \
-D Phalanx_INDEX_SIZE_TYPE:STRING="INT" \
-D Phalanx_SHOW_DEPRECATED_WARNINGS:BOOL=OFF \
-D Kokkos_ENABLE_Serial:BOOL=ON \
-D Kokkos_ENABLE_OpenMP:BOOL=OFF \
-D Kokkos_ENABLE_Pthread:BOOL=OFF \
Optionally, you can enable MueLu by adding either of these:
-D Trilinos_ENABLE_MueLu:BOOL=ON \
-D TPL_ENABLE_SuperLU:STRING=ON \
-D SuperLU_INCLUDE_DIRS:STRING="${SUPERLUDIR}/include" \
-D SuperLU_LIBRARY_DIRS:STRING="${SUPERLUDIR}/lib" \
or
-D Trilinos_ENABLE_MueLu:BOOL=ON \
-D Amesos2_ENABLE_KLU2:BOOL=ON \
The first requires building SuperLU.
If you are developing Kokkos kernels in Albany, add the following flag to your Albany configuration:
-D ENABLE_KOKKOS_UNDER_DEVELOPMENT \