File: INSTALL.rst

package info (click to toggle)
trilinos 12.14.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 752,372 kB
  • sloc: cpp: 3,241,095; ansic: 434,828; fortran: 169,554; xml: 54,886; python: 37,974; sh: 29,430; makefile: 27,828; javascript: 8,535; perl: 7,558; f90: 6,372; csh: 4,160; lex: 1,491; lisp: 810; yacc: 491; awk: 364; ml: 281; php: 145; sed: 3
file content (145 lines) | stat: -rw-r--r-- 3,789 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
==================================================================
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 enable support for the ``float`` scalar type use::

  -DTrilinos_ENABLE_FLOAT=ON

To enable support for ``std::complex<T>`` scalar types use::

  -DTrilinos_ENABLE_COMPLEX=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