Commit 9f3d8b89 authored by Hamilton, Steven P.'s avatar Hamilton, Steven P.
Browse files

Removing a bunch of unused files.

parent f43b22af
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
INSTALL.rst
 No newline at end of file
+0 −136
Original line number Diff line number Diff line
==================================================================
Quick configure, build and install hints for Trilinos
==================================================================

:Author: Brent Perschbacher
:Contact: bmpersc@sandia.gov

This document is intended to be a very concise set of examples of how to
configure, build and install Trilinos. The intended audience is those who need
a quick refresher on Trilinos CMake build system or those wanting a quick
install without worrying about all the features and options that are
available.  For a more indepth document on what features and options are
available and how to use them, see the document:

  https://trilinos.org/docs/files/TrilinosBuildReference.html

.. sectnum::

.. contents::


Requirements
============

* CMake 2.8.11 or newer
* A C and C++ compiler
* Optionally a Fortran compiler
* Optionally an installation of MPI


Instructions
============

Following are a few examples of simple configurations for Trilinos. Anything in
<> should be replaced with the appropriate path or value and excluding the <>.

It is recommended that you put your configure options in a script (e..g
``do-configure``) so you can repeat the configure if necessary.

Note: all examples assume a unix like command line and Makefile Generators.


Simple MPI instructions (enables most packages)
------------------------------------------------

::

  cmake \
  -DTPL_ENABLE_MPI=ON \
  -DMPI_BASE_DIR=<path to mpi install> \
  -DTrilinos_ENABLE_ALL_PACKAGES=ON \
  -DCMAKE_INSTALL_PREFIX=<path to install Trilinos into> \
  <path to Trilinos source>
  
  make -j<n> install

NOTE: Enabling all packages will trigger the enable of several third-party
libraries (TPLs).  If CMake can't find these TPLs on your system, then you
will need to either point to them or disable them as specified in the CMake
output.


Simple serial instructions (enables most packages)
--------------------------------------------------

::

  cmake \
  -DCMAKE_C_COMPILER=<path to C compiler> \
  -DCMAKE_CXX_COMPILER=<path to C++ compiler> \
  -DCMAKE_Fortran_COMPILER=<path to Fortran compiler> \
  -DTrilinos_ENABLE_ALL_PACKAGES=ON \
  -DCMAKE_INSTALL_PATH=<path to install Trilinos into> \
  <path to Trilinos source>
  
  make -j<n> install


Intermediate MPI instructions (enables a few packages)
------------------------------------------------------

::

  cmake \
  -DTPL_ENABLE_MPI=ON \
  -DMPI_BASE_DIR=<path to mpi install> \
  -DTrilinos_ENABLE_Epetra=ON \
  -DTrilinos_ENABLE_AztecOO=ON \
  -DTrilinos_ENABLE_Ifpack=ON \
  -DCMAKE_INSTALL_PATH=<path to install Trilinos into> \
  <path to Trilinos source>
  
  make -j<n> install


Intermediate MPI instructions (enables a few packages)
------------------------------------------------------

::

  cmake \
  -DCMAKE_C_COMPILER=<path to C compiler> \
  -DCMAKE_CXX_COMPILER=<path to C++ compiler> \
  -DCMAKE_Fortran_COMPILER=<path to Fortran compiler> \
  -DTrilinos_ENABLE_Epetra=ON \
  -DTrilinos_ENABLE_AztecOO=ON \
  -DTrilinos_ENABLE_Ifpack=ON \
  -DCMAKE_INSTALL_PATH=<path to install Trilinos into> \
  <path to Trilinos source>
  
  make -j<n> install


Useful Options
==============

To turn on explicit template instantiation (can massively reduce build times)
use::

  -DTrilinos_ENABLE_EXPLICIT_INSTANTIATION=ON

To use shared libraries (much smaller executables and faster linking) use::

  -DBUILD_SHARED_LIBS=ON

To disable Fortran use the following::

  -DTrilinos_ENABLE_FORTRAN=OFF

To enable a package::

  -DTrilinos_ENABLE_<package name>=ON

To enable tests::

  -DTrilinos_ENABLE_TESTS=ON
+0 −124
Original line number Diff line number Diff line
@@ -58,130 +58,6 @@
# Define the Trilinos packages
#
TRIBITS_REPOSITORY_DEFINE_PACKAGES(
  Gtest                 commonTools/gtest                 SS
  ThreadPool            packages/ThreadPool               PS # Depends on Pthreads
  Kokkos                packages/kokkos                   PS
  Teuchos               packages/teuchos                  PS
  RTOp                  packages/rtop                     PS
  Sacado                packages/sacado                   PS
  Epetra                packages/epetra                   PS
  SCORECpcu             SCOREC/pcu                        SS
  SCORECgmi             SCOREC/gmi                        SS
  SCORECgmi_sim         SCOREC/gmi_sim                    SS
  SCORECapf             SCOREC/apf                        SS
  SCORECapf_sim         SCOREC/apf_sim                    SS
  SCORECmds             SCOREC/mds                        SS
  SCORECparma           SCOREC/parma                      SS
  SCORECspr             SCOREC/spr                        SS
  Zoltan                packages/zoltan                   PS
  Shards                packages/shards                   PS
  GlobiPack             packages/globipack                PS
  Triutils              packages/triutils                 PS
  Tpetra                packages/tpetra                   PS
  EpetraExt             packages/epetraext                PS
  Domi                  packages/domi                     EX
  Thyra                 packages/thyra                    PS
  Xpetra                packages/xpetra                   PS
  OptiPack              packages/optipack                 PS
  Isorropia             packages/isorropia                PS
  Pliris                packages/pliris                   PS
  Claps                 packages/claps                    EX
  AztecOO               packages/aztecoo                  PS
  Galeri                packages/galeri                   PS
  Amesos                packages/amesos                   PS
  Pamgen                packages/pamgen                   PS
  Zoltan2               packages/zoltan2                  SS
  Ifpack                packages/ifpack                   PS
  ML                    packages/ml                       PS
  Belos                 packages/belos                    PS
  ShyLU                 packages/shylu                    SS
  Amesos2               packages/amesos2                  SS
  SEACAS                packages/seacas                   SS # Depends on netcdf, optionally hdf5, xdmf, pamgen
  Trios                 packages/trios                    EX #temporary
  Komplex               packages/komplex                  PS
  Anasazi               packages/anasazi                  PS
  Ifpack2               packages/ifpack2                  PS
  Stratimikos           packages/stratimikos              PS
  FEI                   packages/fei                      PS
  Teko                  packages/teko                     SS
  TriKota               packages/TriKota                  SS
  Intrepid              packages/intrepid                 PS
  Intrepid2             packages/intrepid2                SS
  STK                   packages/stk                      SS # Depends on boost
  SCORECapf_zoltan      SCOREC/zoltan                     SS
  SCORECapf_stk         SCOREC/stk                        SS
  SCORECma              SCOREC/ma                         SS
  SCOREC                SCOREC                            SS
  Phalanx               packages/phalanx                  SS
  NOX                   packages/nox                      PS
  Moertel               packages/moertel                  PS
  MueLu                 packages/muelu                    SS
  Rythmos               packages/rythmos                  PS
  MOOCHO                packages/moocho                   ST
  Stokhos               packages/stokhos                  SS
  ROL                   packages/rol                      SS
  Piro                  packages/piro                     SS
  Panzer                packages/panzer                   SS
  Sundance              packages/Sundance                 SS # Could be PS based on deps (BUG: 4669)
  CTrilinos             packages/CTrilinos                SS # Switched to SS to speed up checkin testing
  ForTrilinos           packages/ForTrilinos              EX
  PyTrilinos            packages/PyTrilinos               SS
  WebTrilinos           packages/WebTrilinos              EX # Should be SS
  NewPackage            packages/new_package              EX # Should be SS
  Optika		packages/optika		          EX
  Mesquite              packages/mesquite                 PS
  MeshingGenie          packages/meshinggenie             EX
  TrilinosCouplings     packages/trilinoscouplings        SS
  Pike                  packages/pike                     SS
  xSDKTrilinos          packages/xSDKTrilinos             SS
  )
# Allow builds even if some packages are missing

TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCOREC)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECgmi)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECgmi_sim)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECpcu)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECapf)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECapf_sim)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECmds)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECparma)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECspr)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECapf_stk)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECapf_zoltan)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SCORECma)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(MOOCHO)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(Sundance)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(CTrilinos)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(ForTrilinos)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(Optika)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(Mesquite)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(WebTrilinos)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(xSDKTrilinos)

#
# Disable certain packages on certain platforms.
#
# NOTE: This just makes the packages experimental 'EX' and therefore still
# allows the user to enable the package explicitly but the package will not
# get enabled implicitly.
#

TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(MOOCHO Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Phalanx Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(PyTrilinos Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Sundance Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Tpetra Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Ifpack2 Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(TriKota Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Pamgen Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(STK Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(SEACAS Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Anasazi Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Zoltan Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Isorropia Windows)

TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Teko Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Mesquite AIX)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Trios Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Panzer Windows)
+0 −75
Original line number Diff line number Diff line
# CMAKE File for "MyApp" application building against an installed Trilinos

cmake_minimum_required(VERSION 2.7)

# Use Trilinos_PREFIX, if the user set it, to help find Trilinos.
# The final location will actually be held in Trilinos_DIR which must
# point at "<prefix>/lib/cmake/Trilinos", but this helps the search.
SET(CMAKE_PREFIX_PATH ${Trilinos_PREFIX} ${CMAKE_PREFIX_PATH})

# Get Trilinos as one entity
FIND_PACKAGE(Trilinos REQUIRED)

# Echo trilinos build info just for fun
MESSAGE("\nFound Trilinos!  Here are the details: ")
MESSAGE("   Trilinos_DIR = ${Trilinos_DIR}")
MESSAGE("   Trilinos_VERSION = ${Trilinos_VERSION}")
MESSAGE("   Trilinos_PACKAGE_LIST = ${Trilinos_PACKAGE_LIST}")
MESSAGE("   Trilinos_LIBRARIES = ${Trilinos_LIBRARIES}")
MESSAGE("   Trilinos_INCLUDE_DIRS = ${Trilinos_INCLUDE_DIRS}")
MESSAGE("   Trilinos_LIBRARY_DIRS = ${Trilinos_LIBRARY_DIRS}")
MESSAGE("   Trilinos_TPL_LIST = ${Trilinos_TPL_LIST}")
MESSAGE("   Trilinos_TPL_INCLUDE_DIRS = ${Trilinos_TPL_INCLUDE_DIRS}")
MESSAGE("   Trilinos_TPL_LIBRARIES = ${Trilinos_TPL_LIBRARIES}")
MESSAGE("   Trilinos_TPL_LIBRARY_DIRS = ${Trilinos_TPL_LIBRARY_DIRS}")
MESSAGE("   Trilinos_BUILD_SHARED_LIBS = ${Trilinos_BUILD_SHARED_LIBS}")
MESSAGE("End of Trilinos details\n")

# Make sure to use same compilers and flags as Trilinos
SET(CMAKE_CXX_COMPILER ${Trilinos_CXX_COMPILER} )
SET(CMAKE_C_COMPILER ${Trilinos_C_COMPILER} )
SET(CMAKE_Fortran_COMPILER ${Trilinos_Fortran_COMPILER} )

SET(CMAKE_CXX_FLAGS  "${Trilinos_CXX_COMPILER_FLAGS} ${CMAKE_CXX_FLAGS}")
SET(CMAKE_C_FLAGS  "${Trilinos_C_COMPILER_FLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_Fortran_FLAGS  "${Trilinos_Fortran_COMPILER_FLAGS} ${CMAKE_Fortran_FLAGS}")

#
# End of setup and error checking
#  NOTE: PROJECT command checks for compilers, so this statement
#        is moved AFTER setting CMAKE_CXX_COMPILER from Trilinos

PROJECT(MyApp)

# MPI check 
MESSAGE("-- Checking if MPI is enabled in Trilinos:")
LIST(FIND Trilinos_TPL_LIST MPI MPI_List_ID)
IF (MPI_List_ID GREATER -1)
  MESSAGE("-- Checking if MPI is enabled in Trilinos: MPI ENABLED")
  SET(MYAPP_MPI TRUE)
  ADD_DEFINITIONS(-DMYAPP_MPI)
ELSE()
  MESSAGE("-- Checking if MPI is enabled in Trilinos: MPI NOT ENABLED")
  SET(MYAPP_MPI FALSE)
ENDIF()

# Set optional dependency in MyApp on Epetra package: 
#   this toggles code within  #ifdef MYAPP_EPETRA 
MESSAGE("-- Looking for Epetra:")
LIST(FIND Trilinos_PACKAGE_LIST Epetra Epetra_List_ID)
IF (Epetra_List_ID GREATER -1)
  ADD_DEFINITIONS(-DMYAPP_EPETRA)
  MESSAGE("-- Looking for Epetra: -- found, compiling with -DMYAPP_EPETRA")
  SET(MYAPP_EPETRA TRUE)
ELSE()
  MESSAGE("-- Looking for Epetra: -- not found.")
  SET(MYAPP_EPETRA FALSE)
ENDIF()

# Compile source code
ADD_SUBDIRECTORY(src)

#Turn on test to be run by ctest
ENABLE_TESTING()
ADD_SUBDIRECTORY(test)
+0 −32
Original line number Diff line number Diff line
******************************************************************
*** WARNING: THIS CODE IS NOT AUTOMATICALLY TESTED IN TRILINOS ***
***          BECAUSE IT REQUIRES AN INSTALLED TRILINOS         ***
******************************************************************

This is a small demonstration of how to build an application
against Trilinos when both are using CMake for the build system.
This example also demonstrates ctest.

To run this example: 

(1) Trilinos needs to be configured using  PREFIX, e.g.:
    -DCMAKE_INSTALL_PREFIX:path=/home/turing/InstalledTrilinos10_6 \

(2) "make; make install"  of Trilinos
    (This will put a file in the ${CMAKE_INSTALL_PREFIX}/include
      directory called "TrilinosConfig.cmake")

(3) For this demo, the file build/do-cmake needs to be
    edited as specified in the comments.

(4) run "do-cmake" script in the build directory

(5) run "make" in the build directory

(6) run "ctest" in the build directory

#
# Look into comments in CMakeLists.txt files for more info.

# Questions to Andy Salinger (agsalin@sandia.gov)
#     or  trilinos-framework@software.sandia.gov
Loading