Skip to content

Commit fef7b23

Browse files
committed
libMesh v1.5.0 .deb package for Ubuntu 16.04.
1 parent ad6a833 commit fef7b23

File tree

4 files changed

+74
-0
lines changed

4 files changed

+74
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ libmesh/ubuntu16.04/libmesh_v1.3.1/libmesh-1.3.1-1.deb
77
libmesh/ubuntu16.04/libmesh_v1.4.1/libmesh/
88
libmesh/ubuntu16.04/libmesh_v1.4.1/libmesh-1.4.1-1/
99
libmesh/ubuntu16.04/libmesh_v1.4.1/libmesh-1.4.1-1.deb
10+
11+
libmesh/ubuntu16.04/libmesh_v1.5.0/libmesh/
12+
libmesh/ubuntu16.04/libmesh_v1.5.0/libmesh-1.5.0-1/
13+
libmesh/ubuntu16.04/libmesh_v1.5.0/libmesh-1.5.0-1.deb
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Package: libmesh-1.5.0
2+
Version: 1.5.0-1
3+
Section: base
4+
Priority: optional
5+
Architecture: amd64
6+
Depends: gfortran (>= 4.5),
7+
openmpi-bin (>= 1.10), libopenmpi-dev (>= 1.10),
8+
libpetsc3.6 (>= 3.6), libpetsc3.6.2-dev (>= 3.6),
9+
libslepc3.6 (>= 3.6), libslepc3.6.1-dev (>= 3.6),
10+
libparpack2-dev (>= 3.3),
11+
libboost-all-dev (>= 1.58),
12+
libeigen3-dev (>= 3.2)
13+
Maintainer: Joshua Deaton <jdeaton@users.noreply.github.com>
14+
Description: libMesh
15+
The libMesh library provides a framework for the numerical simulation
16+
of partial differential equations using arbitrary unstructured discretizations
17+
on serial and parallel platforms. A major goal of the library is to provide
18+
while allowing a research scientist to focus on the physics they are modeling.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env bash
2+
3+
# Get # of processors in environment variables.
4+
export NP=$(nproc)
5+
# Store current location as working directory.
6+
export WORK_DIR=${PWD}
7+
8+
# Update packages fromt apt repos.
9+
sudo apt-get update
10+
sudo apt-get -y install build-essential gfortran wget less m4 git cmake
11+
sudo apt-get -y install openmpi-bin libopenmpi-dev
12+
sudo apt-get -y install libpetsc3.6 libpetsc3.6.2-dbg libpetsc3.6.2-dev
13+
sudo apt-get -y install libslepc3.6 libslepc3.6.1-dbg libslepc3.6.1-dev
14+
sudo apt-get -y install libparpack2-dev
15+
sudo apt-get -y install libboost-all-dev
16+
sudo apt-get -y install libeigen3-dev
17+
18+
# Fetch/build libMesh.
19+
mkdir libmesh
20+
cd libmesh
21+
wget https://github.com/libMesh/libmesh/releases/download/v1.5.0/libmesh-1.5.0.tar.gz
22+
tar -xvf libmesh-1.5.0.tar.gz
23+
cd libmesh-1.5.0
24+
mkdir build
25+
cd build
26+
export PETSC_DIR=/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real
27+
export SLEPC_DIR=/usr/lib/slepcdir/3.6.1/x86_64-linux-gnu-real
28+
export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi
29+
../configure --prefix=/usr/local --with-methods="opt dbg" --disable-metaphysicl --disable-examples
30+
make -j ${NP}
31+
sudo make install
32+
33+
# Organize libMesh include/ and lib/ for packaging.
34+
cd ${WORK_DIR}
35+
export PKG_DIR=libmesh-1.5.0-1
36+
export INST_DIR=${PKG_DIR}/usr/local
37+
mkdir ${PKG_DIR}
38+
mkdir ${PKG_DIR}/usr
39+
mkdir ${PKG_DIR}/usr/local
40+
mkdir ${PKG_DIR}/usr/local/include
41+
mkdir ${PKG_DIR}/usr/local/lib
42+
cp -r /usr/local/include/* ${INST_DIR}/include
43+
cp -r /usr/local/lib/libmesh* ${INST_DIR}/lib
44+
cp -r /usr/local/lib/libnetcdf* ${INST_DIR}/lib
45+
46+
# Copy in DEBIAN/control package configuration file.
47+
cp -r ${WORK_DIR}/DEBIAN ${PKG_DIR}
48+
49+
# Create libMesh .deb package.
50+
dpkg-deb --build libmesh-1.5.0-1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
docker rm libmesh-150-pkg-build-ubuntu-16.04
2+
docker run -it --entrypoint /bin/bash --name libmesh-150-pkg-build-ubuntu-16.04 -v ${PWD}:/package ubuntu:16.04

0 commit comments

Comments
 (0)