/
dftbplus-17.1_install
executable file
·82 lines (64 loc) · 1.71 KB
/
dftbplus-17.1_install
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
#!/usr/bin/env bash
set -e
package_name="dftbplus"
package_version="17.1"
package_description="DFTB+ is a quantum mechanical simulation software package, based on the Density Functional Tight Binding (DFTB) method."
source includes/source_includes.sh
_env_setup() {
module purge
require gcc-libs
require compilers/intel/2017
require mpi/intel/2017
require arpack-ng
require python2
make_build_env ""
package_url="https://github.com/dftbplus/dftbplus/archive/${package_version}.tar.gz"
package_file="${package_version}.tar.gz"
unpack_dir="dftbplus-${package_version}"
}
_file_setup() {
cd "$build_dir"
wget "$package_url"
tar -xf "$package_file"
}
_pre_build() {
cd "$unpack_dir"
cp sys/make.x86_64-linux-intel ./make.arch
./utils/get_opt_externals dftd3
./utils/get_opt_externals slakos
cd ..
}
_build() {
cd "$unpack_dir"
make LIB_BLAS=-mkl MKL_LIBDIR= OTHERLIBS=-qopenmp LNOPT= INSTALLDIR="$install_prefix"
cd ..
}
_post_build() {
cd "$unpack_dir"
# This sed removes two tests that aren't implemented in 17.1 and
# would otherwise mark the test process as failed.
sed -i -e '/^sockets\/H2O/d' -e '/^sockets\/diamond/d' test/prog/dftb+/tests
make test
make INSTALLDIR="$install_prefix" install
make_module \
-o "${module_dir}/${package_label}" \
-p "$install_prefix" \
-r gcc-libs \
-r compilers/intel/2017 \
-r mpi/intel/2017 \
-r arpack-ng \
-r python2 \
-c "$package_name" \
-w "$package_description"
cd ..
}
_clean_up() {
#rm -Rf ${temp_dir:-ERROR_TEMP_DIR_NOT_SET}
:
}
_env_setup
_file_setup
_pre_build
_build
_post_build
_clean_up