You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\page InstallUbuntu1804Apt Installation on Ubuntu 18.04 (Bionic)
3
+
4
+
This page describes how to install libMesh/MAST on Ubuntu 18.04 (Eoan Ermine) using dependencies from the standard package manager. It is written for someone who has limited experience compiling software on Linux and contains details a more advanced user likely won't need.
Installing libMesh/MAST on Ubuntu 18.04 (Bionic Beaver) is relatively simple if you are able to use Ubuntu's Advanced Packaging Tool (APT) since all of the dependencies are provided in the standard package repositories. To do so we assume you have `sudo` privileges on your system and it is connected to the internet. If you are not a privileged user, ask an administrator to install these dependencies or consider \ref InstallManualDepsLinux "manually compiling/installing the dependencies" in your home directory.
9
+
10
+
To install all of the dependencies, simply execute the following commands in the terminal/shell. Some of the packages will install a number of required sub-dependencies.
We utilize some newer features in CMake and require a more recent version (3.13) than is included in the default APT repositories (3.10) for Ubuntu 18.04. The following code adds Kitware's (CMake maintainers) APT repository and installs the most recent version of CMake.
When using dependencies from Ubuntu 19.10's standard package repository, only a recent version of libMesh can be built. Any official libMesh "release" up to and include v1.5.1 will fail to build with linking errors related to a conflict between the Ubuntu `apt` provided `metis` (which the provided PETSc package requires) and the `metis` that libMesh builds itself. This issue was [resolved](https://github.com/libMesh/libmesh/pull/2427) in libMesh repository commit `df1e2b7` by adding the ability for libMesh to properly use an external `metis`. The MAST developers currently provide a version of libMesh v1.5.1 that have the fixes for the build patched in.
43
+
44
+
As a result, we need to build libMesh from the `v1.5.1_with_build_updates` branch of [jdeaton's fork](https://github.com/jdeaton/libmesh) of the official libMesh [repository](https://github.com/libMesh/libmesh). To do this we first clone the forked repository from GitHub, then checkout the appropriate branch of the code. From the directory where you want to build libMesh, execute the following in the terminal/shell, which will clone libMesh into a new directory `libmesh`:
45
+
46
+
\code{.sh}
47
+
git clone https://github.com/jdeaton/libmesh.git
48
+
cd libmesh
49
+
git checkout v1.5.1_with_build_updates
50
+
git submodule init
51
+
git submodule update
52
+
\endcode
53
+
54
+
libMesh compilation/installation follows the common Makefile-based `configure`, `make`, `make install` process that is common on Linux/Unix systems. Before beginning, we set a few environment variables by executing the following commands from inside the `libmesh` directory in the terminal/shell. `libMesh_INSTALL_DIR` specifies where the products of the libMesh build process will be installed. By default, text below specifies a directory that will be alongside `libmesh` named `libmesh_install`. You may change this if you wish. `NP` specifies the number of parallel jobs to use during compilation.
We recommend compiling libMesh in a dedicated build directory to keep from cluttering the main libMesh repository. From inside the `libmesh` directory, create a build directory and navigate into it with:
62
+
63
+
\code{.sh}
64
+
mkdir build
65
+
cd build
66
+
\endcode
67
+
68
+
We can now configure the libMesh build by pasting the entire contents of the following snippet into the shell/terminal. By default, libMesh will configure optimized, development, and debug versions of the library.
69
+
70
+
\code{.sh}
71
+
PETSC_DIR=/usr/lib/petsc \
72
+
SLEPC_DIR=/usr/lib/slepc \
73
+
../configure \
74
+
--prefix=${libMesh_INSTALL_DIR} \
75
+
--disable-strict-lgpl \
76
+
--enable-triangle=yes \
77
+
--enable-tetgen=yes \
78
+
--with-metis=/usr/lib/x86_64-linux-gnu \
79
+
--with-metis-include=/usr/include \
80
+
--with-eigen-include=/usr/include \
81
+
--with-glpk-include=/usr/include \
82
+
--with-glpk-lib=/usr/lib/x86_64-linux-gnu \
83
+
--with-nlopt-include=/usr/include \
84
+
--with-nlopt-lib=/usr/lib/x86_64-linux-gnu \
85
+
--with-vtk-include=/usr/include/vtk-6.3 \
86
+
--with-vtk-lib=/usr/lib/x86_64-linux-gnu
87
+
\endcode
88
+
89
+
If the configuration was successful, you should have the following output under `Optional Packages`:
90
+
91
+
\code{.sh}
92
+
Optional Packages:
93
+
boost............................ : yes
94
+
capnproto........................ : no
95
+
cppunit.......................... : no
96
+
curl............................. : no
97
+
eigen............................ : yes
98
+
exodus........................... : yes
99
+
version....................... : v5.22
100
+
fparser.......................... : yes
101
+
build from version............ : release
102
+
glpk............................. : yes
103
+
gmv.............................. : yes
104
+
gzstream......................... : yes
105
+
hdf5............................. : no
106
+
laspack.......................... : yes
107
+
libhilbert....................... : yes
108
+
metaphysicl...................... : yes
109
+
metis............................ : yes
110
+
mpi.............................. : yes
111
+
nanoflann........................ : yes
112
+
nemesis.......................... : yes
113
+
version....................... : v5.22
114
+
netcdf........................... : yes
115
+
version....................... : 4
116
+
nlopt............................ : yes
117
+
parmetis......................... : yes
118
+
petsc............................ : yes
119
+
version....................... : 3.7.7
120
+
qhull............................ : yes
121
+
sfcurves......................... : yes
122
+
slepc............................ : yes
123
+
version....................... : 3.7.4
124
+
thread model..................... : pthread
125
+
c++ rtti ........................ : yes
126
+
tecio............................ : yes
127
+
tecplot...(vendor binaries)...... : no
128
+
tetgen........................... : yes
129
+
triangle......................... : yes
130
+
trilinos......................... : no
131
+
vtk.............................. : yes
132
+
version....................... : 6.3.0
133
+
\endcode
134
+
135
+
We can now compile the libMesh binaries by executing in the terminal/shell, which will take some time:
136
+
137
+
\code{.sh}
138
+
make -j ${NP}
139
+
\endcode
140
+
141
+
Optionally, you can now test compiled libraries by executing `make check` in the terminal/shell. This will compile and run a number of example cases provided in the libMesh source. Note that this will take a long time and since you are using standard, well-maintained dependencies it is probably not necessary.
142
+
143
+
Finally, we will install the products of the libMesh compilation by simply executing the following, which will place all of the necessary libMesh files for MAST into the directory specified above with `libMesh_INSTALL_DIR`. Optionally, after this is complete, you can test the installed binaries using `make checkinstall`. Again, this takes quite a while and is likely not necessary with this standard installation.
144
+
145
+
\code{.sh}
146
+
make install
147
+
\endcode
148
+
149
+
The important directories from the installed contents are:
- `${libMesh_INSTALL_DIR}/contrib` - third-party utility programs bundled with libMesh
152
+
- `${libMesh_INSTALL_DIR}/examples` - source code for libMesh examples and wrapper scripts to run them
153
+
- `${libMesh_INSTALL_DIR}/include` - development headers for libMesh and bundled third-party packages
154
+
- `${libMesh_INSTALL_DIR}/lib` - libraries for libMesh and bundled third-party packages
155
+
- `${libMesh_INSTALL_DIR}/share` - single element reference meshes
156
+
157
+
\section install-ubuntu1804-mast MAST
158
+
159
+
The following instructions describe how to configure and compile the MAST library, some example programs, and the unit tests. In this guide, we don't build support for Cython, the pyNastran interface, interfaces to commercial/licensed optimizers (DOT, SNOPT, GCMMA) or the documentation.
160
+
161
+
Since MAST is in a state of ongoing development, we will build it from the `master` branch on the [GitHub repository](https://github.com/MASTmultiphysics/mast-multiphysics) so we have the most up-to-date changes. If you have forked MAST, substitute the remote URL for you fork in the `git clone` line.
162
+
163
+
We begin by cloning the repository from inside the directory of your choice:
We again recommend building in a dedicated build directory to keep from cluttering the main repository. From inside the `mast-multiphysics` directory, create a build directory and navigate into it with:
171
+
172
+
\code{.sh}
173
+
mkdir build
174
+
cd build
175
+
\endcode
176
+
177
+
The build process for MAST differs slightly from libMesh since we utilize CMake to generate Makefiles rather than a `configure` script. This is done by executing the following commands in the terminal/shell from inside the `build` directory. CMake will perform some inspections of your system, locate dependencies, and create the `Makefile`s necessary to build MAST in the `build` directory.
178
+
179
+
\code{.sh}
180
+
cmake .. \
181
+
-DCMAKE_BUILD_TYPE=Debug \
182
+
-DCMAKE_C_COMPILER=mpicc \
183
+
-DCMAKE_CXX_COMPILER=mpic++ \
184
+
-DCMAKE_Fortran_COMPILER=mpifort \
185
+
-DlibMesh_DIR=${libMesh_INSTALL_DIR} \
186
+
-DPETSc_DIR=/usr/lib/petsc \
187
+
-DSLEPc_DIR=/usr/lib/slepc \
188
+
-DEIGEN3_ROOT=/usr/include/eigen3 \
189
+
-DBOOST_ROOT=/usr \
190
+
-DBUILD_DOC=OFF \
191
+
-DENABLE_DOT=OFF \
192
+
-DENABLE_GCMMA=OFF \
193
+
-DENABLE_SNOPT=OFF\
194
+
-DENABLE_NASTRANIO=OFF \
195
+
-DENABLE_CYTHON=OFF
196
+
\endcode
197
+
198
+
Note that the above commands create a `Debug` version of the MAST library (using the `*_dbg` versions of libMesh). This is required if you want to utilize a C++ debugger (such as gdb) and includes a significant amount of diagnostic/debug output. For more performance, an optimized/Release version can be built by changing the `-DCMAKE_BUILD_TYPE` CMake variable to `Release`.
199
+
200
+
After CMake configuration completes, you can build the MAST library (`libmast`), several example problems, and unit tests by simply executing the following in the terminal/shell.
201
+
202
+
\code{.sh}
203
+
make -j ${NP}
204
+
\endcode
205
+
206
+
\todo Contact libMesh developers to resolve inability of libMesh configuration process to find Ubuntu repository provided HDF5 headers/libraries (openmpi/serial).
207
+
\todo Update page with next release of libMesh after v1.5.1 that will incorporate changes to deal with metis conflicts.
208
+
\todo Update the guide to include building support for pyNastran, Cython, and generating the documentation locally.
Copy file name to clipboardExpand all lines: doc/install/install_ubuntu_1910_apt.dox
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
4
4
This page describes how to install libMesh/MAST on Ubuntu 19.10 (Eoan Ermine) using dependencies from the standard package manager. It is written for someone who has limited experience compiling software on Linux and contains details a more advanced user likely won't need.
5
5
6
-
\note Ubuntu 19.10 goes end-of-life in July 2020 and is no longer officially supported by Canonical. Consider updating to Ubuntu 20.04 LTS.
6
+
\note Ubuntu 19.10 went end-of-life in July 2020 and is no longer officially supported by Canonical. Consider updating to Ubuntu 20.04 LTS.
0 commit comments