Trilinos

Linux

Using standard Debian packages

Install packages libtrilinos and libtrilinos-dev. In Ubuntu 6.06 (Dapper) or newer, you can use the Synaptic package manager for that, or type:

sudo apt-get install libtrilinos libtrilinos-dev

Now go to the directory with Hermes. Create the file CMake.vars with the following line (or append to the existing one):

set(WITH_TRILINOS YES)

Finally execute:

rm CMakeCache.txt
cmake .
make

Find more about Using TRILINOS in Hermes.

Windows

First of all - to build Trilinos, one needs LAPACK (CLAPACK) (see the optional package in the library installation documentation).

Download the sources for the latest version from the Trilinos page and unpack them in some temporary directory.

Go to the Trilinos source directory.

In the following, replace {TPL_LAPACK_LIBRARIES}, {TPL_BLAS_LIBRARIES} with the full path to your lapack.lib and blas.lib without any quotes.
Also, replace {CMAKE_INSTALL_PREFIX} with either your dependency root, or any other folder where you want to install Trilinos packages.
mkdir build_dir
cd build_dir
cmake \
 -D CMAKE_BUILD_TYPE:STRING=DEBUG \
 -D TPL_LAPACK_LIBRARIES:FILEPATH=d:\\hpfem\\hermes\\dependencies\\lib\\lapack.lib \
 -D TPL_BLAS_LIBRARIES:FILEPATH=d:\\hpfem\\hermes\\dependencies\\lib\\blas.lib \
 -D CMAKE_Fortran_FLAGS:STRING="-fPIC" \
 -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
 -D Trilinos_ENABLE_Teuchos:BOOL=ON \
 -D Teuchos_ENABLE_TESTS:STRING=OFF \
 -D Teuchos_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_Epetra:BOOL=ON \
 -D Epetra_ENABLE_TESTS:STRING=OFF \
 -D Epetra_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_EpetraExt:BOOL=ON \
 -D EpetraExt_ENABLE_TESTS:STRING=OFF \
 -D EpetraExt_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_AztecOO:BOOL=ON \
 -D AztecOO_ENABLE_TESTS:STRING=OFF \
 -D AztecOO_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_Ifpack:BOOL=ON \
 -D Ifpack_ENABLE_TESTS:STRING=OFF \
 -D Ifpack_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_ML:BOOL=ON \
 -D ML_ENABLE_TESTS:STRING=OFF \
 -D ML_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_OpenMP:BOOL=ON \
 -D Trilinos_ENABLE_Amesos:BOOL=ON \
 -D Amesos_ENABLE_TESTS:STRING=OFF \
 -D Amesos_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_NOX:BOOL=ON \
 -D NOX_ENABLE_TESTS:STRING=OFF \
 -D NOX_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_Anasazi:BOOL=ON \
 -D Anasazi_ENABLE_TESTS:STRING=OFF \
 -D Anasazi_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_Komplex:BOOL=ON \
 -D Komplex_ENABLE_TESTS:STRING=OFF \
 -D Komplex_ENABLE_EXAMPLES:STRING=OFF \
 -D Trilinos_ENABLE_TESTS:BOOL=OFF \
 -D DART_TESTING_TIMEOUT:STRING=600 \
 -D CMAKE_INSTALL_PREFIX:STRING=/d/hpfem/hermes/dependencies \
 ..
Build the Trilinos solution.
Go up to the Trilinos source directory and edit the cmake_install.cmake file. Change::
SET(CMAKE_INSTALL_CONFIG_NAME “Release”)

for:

SET(CMAKE_INSTALL_CONFIG_NAME "Debug")

Install Trilinos into the path specified by the {CMAKE_INSTALL_PREFIX} variable by running:

cmake -P cmake_install.cmake

You may also need to create a dummy file “unistd.h” in the include folder under dependencies folder. This header is not present in certain versions of Microsoft C library. Go to the directory with Hermes. Add the following lines into CMake.vars:

set(WITH_TRILINOS YES)
set(TRILINOS_ROOT {CMAKE_INSTALL_PREFIX})

again, replace {CMAKE_INSTALL_PREFIX} with the folder where you installed Trilinos.

Find more about Using TRILINOS in Hermes.

MAC OS

In preparation.

Using TRILINOS in Hermes

You may now select either SOLVER_AMESOS as the direct matrix solver or SOLVER_AZTECOO as the iterative matrix solver for your finite element problem, as detailed in the Poisson tutorial, or use it just to solve a standalone matrix problem

System Message: WARNING/2 (Ax = b)

latex exited with error [stdout] This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) entering extended mode (c:\users\lk\appdata\local\temp\tmpnvgqs5\math.tex LaTeX2e <2011/06/27> Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl ishmax, welsh, loaded. (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls” Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size12.clo”)) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\inputenc.sty” (C:\Users\LK\AppData\Roaming\MiKTeX\2.9\tex\latex\ucs\utf8x.def)) (C:\Users\LK\AppData\Roaming\MiKTeX\2.9\tex\latex\ucs\ucs.sty (C:\Users\LK\AppData\Roaming\MiKTeX\2.9\tex\latex\ucs\uni-global.def)) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty” For additional information on amsmath, use the `?’ option. (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amstext.sty” (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty”)) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty”) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty”)) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amscls\amsthm.sty”) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty” (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty”)) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\bm.sty”) (C:\Users\LK\AppData\Roaming\MiKTeX\2.9\tex\latex\dstroke\dsfont.sty) (C:\Users\LK\AppData\Roaming\MiKTeX\2.9\tex\latex\braket\braket.sty) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\carlisle\slashed.sty”) (C:\Users\LK\AppData\Roaming\MiKTeX\2.9\tex\latex\etoolbox\etoolbox.sty (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\misc\etex.sty”)) ! Undefined control sequence. <argument> \undefinedpagestyle l.15 \pagestyle{fancy} (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\color.sty” (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\color.cfg”) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\dvips.def”) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\dvipsnam.def”)) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\float\float.sty”) (c:\users\lk\appdata\local\temp\tmpnvgqs5\math.aux) (C:\Users\LK\AppData\Roaming\MiKTeX\2.9\tex\latex\ucs\ucsencs.def) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd”) (“C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd”) [1] (c:\users\lk\appdata\local\temp\tmpnvgqs5\math.aux) ) (see the transcript file for additional information) Output written on math.dvi (1 page, 344 bytes). Transcript written on math.log.
as in the Using Matrix Solvers tutorial. Note that Trilinos is also required for using the advanced nonlinear solver NOX (see e.g. the Trilinos - Nonlinear tutorial).

Table Of Contents

Previous topic

SuperLU

Next topic

UMFpack