-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-ese-fetch.sh
81 lines (62 loc) · 2.24 KB
/
build-ese-fetch.sh
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
#!/bin/bash
# TODO: Use your own directory where the patches are located
PATCH_DIR="${HOME}/ichpc-build-additional"
################################################################################
### THIS SHOULD BE IN EVERY PBS SCRIPT FOR FETCH
################################################################################
# TODO: Use your own directory where fetch is located
FETCH_DIR="${HOME}/fetch2012"
FLUIDITY_DIR="${FETCH_DIR}/fluidity"
# TODO: Remeber to set FI_PROVIDER=tcp otherwise Intel MPI complains
export FI_PROVIDER=tcp
# TODO: Remember to add this to your PYTHONPATH for testharness to work
export PYTHONPATH="${FLUIDITY_DIR}/python":${PYTHONPATH}
export PATH="${FETCH_DIR}/bin":"${FLUIDITY_DIR}/bin":${PATH}
# Load modules for build
module load ese-software
module load ese-fluidity-dev # ese-fluidity-dev/20200227-python3-cmake317
################################################################################
FLUIDITY_GIT_URL=https://github.com/fluidityproject/fluidity.git
FLUIDITY_VERSION="VTK9-fixes"
# Clone fluidity from GitHub into fetch if not already present
if [ ! -d ${FLUIDITY_DIR} ]; then
git clone ${FLUIDITY_GIT_URL} ${FLUIDITY_DIR}
fi
# Checkout the branch with the VTK9 fixes
pushd ${FETCH_DIR}
pushd ${FLUIDITY_DIR}
git pull
git checkout ${FLUIDITY_VERSION}
git reset --hard ${FLUIDITY_VERSION}
#### CHANGE THE PATCH LOCATION TO YOUR PATCH DIRECTORY
#
# Local changes against Fluidity master at VTK9-fixes
patch -p0 <${PATCH_DIR}/use-local-netcdf.patch
patch -p0 <${PATCH_DIR}/vtk-add-libs.patch
patch -p0 <${PATCH_DIR}/vtk-add-tools-libs.patch
patch -p0 <${PATCH_DIR}/vtk-add-fldecomp-libs.patch
# Regenerate configure after local changes
autoconf
pushd libadaptivity
autoconf
popd
# A bit of prep
libtoolize
# Configure
export LIBS="${LIBS} -L${PETSC_DIR}/lib -lblas -llapack"
${FLUIDITY_DIR}/configure --enable-2d-adaptivity
# Build
make all -j 8
popd # takes us to FETCH_DIR
#### CHANGE THE PATCH LOCATION TO YOUR PATCH DIRECTORY
#
# Local changes against fetch master mirroring Fluidity's
patch -p0 <${PATCH_DIR}/use-local-netcdf.patch
patch -p0 <${PATCH_DIR}/vtk-add-libs-fetch.patch
# Regenerate configure after local changes
autoconf
# Configure
${FETCH_DIR}/configure --enable-2d-adaptivity
# Build
make bin/fetch -j 8
popd