forked from jack-morrison/OLCF-Support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-psi4-summit.sh
58 lines (46 loc) · 1.57 KB
/
install-psi4-summit.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
#!/bin/bash
set -e
module purge
module load gcc/6.4.0 spectrum-mpi cuda cmake openblas python
## SET OLCF PROJECT ID
OLCF_PROJECT="ABC123"
SRCDIR="${SRCDIR:-$HOME/psi4}"
BUILDDIR="${BUILDDIR:-$MEMBERWORK/${OLCF_PROJECT}/tmp/psi4-build}"
MYCONDAENV="${MYCONDAENV:-/ccs/proj/${OLCF_PROJECT}/$USER/summit/opt/psi4_conda}"
INSTALLDIR="${INSTALLDIR:-/ccs/proj/${OLCF_PROJECT}/$USER/summit/opt/psi4}"
rm -rf "${INSTALLDIR}"
rm -rf "${BUILDDIR}"
mkdir -p "${BUILDDIR}"
USE_MYCONDAENV=true
if [ "$USE_MYCONDAENV" = true ]; then
# Setup conda env
if [ ! -f "${MYCONDAENV}/bin/python" ]; then
conda create -p "${MYCONDAENV}" python=3.6 numpy scipy matplotlib setuptools
. activate "${MYCONDAENV}"
pip install networkx
pip install pint
pip install pydantic
pip install qcelemental
pip install pytest
fi
# Activate conda env
if [ -z "${CONDA_PREFIX:-}" ]; then
. activate "${MYCONDAENV}"
elif [ "${CONDA_PREFIX}" != "${MYCONDAENV}" ]; then
conda deactivate
. activate "${MYCONDAENV}"
fi
fi
PYTHON_BIN="$(which python3)"
echo "Using python from '${PYTHON_BIN}'"
cd "${BUILDDIR}"
cmake -B. -DCMAKE_INSTALL_PREFIX="${INSTALLDIR}" \
-DCMAKE_C_COMPILER="${OLCF_GCC_ROOT}/bin/gcc" \
-DCMAKE_CXX_COMPILER="${OLCF_GCC_ROOT}/bin/g++" \
-DCMAKE_Fortran_COMPILER="${OLCF_GCC_ROOT}/bin/gfortran" \
-DPYTHON_EXECUTABLE="${PYTHON_BIN}" \
-DPYTHON_LIBRARY="${PYTHON_BIN}/../lib/libpython3.6m.so" \
-DPYTHON_INCLUDE_DIR="${PYTHON_BIN}/../include/python3.6m" \
"${SRCDIR}"| tee build.log
make -j8 | tee -a build.log
make install | tee -a build.log