mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-10-30 10:18:07 +01:00
configure
This commit is contained in:
parent
11f2bd400a
commit
49fc21a9fa
@ -83,9 +83,7 @@
|
||||
- Added LIB file to add extra libs in plugin
|
||||
- Using Intel IPP for sorting when using Intel compiler
|
||||
- Removed parallelism in sorting
|
||||
|
||||
ao_one_e_integral_zero
|
||||
banned_excitations
|
||||
- Compute banned_excitations from exchange integrals to accelerate with local MOs
|
||||
|
||||
|
||||
|
||||
|
130
configure
vendored
130
configure
vendored
@ -3,7 +3,7 @@
|
||||
# Quantum Package configuration script
|
||||
#
|
||||
|
||||
TEMP=$(getopt -o c:i:h -l config:,install:,help -n $0 -- "$@") || exit 1
|
||||
TEMP=$(getopt -o d:c:i:h -l download:,config:,install:,help -n $0 -- "$@") || exit 1
|
||||
eval set -- "$TEMP"
|
||||
|
||||
export QP_ROOT="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
@ -20,11 +20,9 @@ git submodule update
|
||||
|
||||
# /!\ When updating version, update also etc files
|
||||
BATS_URL="https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz"
|
||||
BUBBLE_URL="https://github.com/projectatomic/bubblewrap/releases/download/v0.3.3/bubblewrap-0.3.3.tar.xz"
|
||||
DOCOPT_URL="https://github.com/docopt/docopt/archive/0.6.2.tar.gz"
|
||||
BSE_URL="https://github.com/MolSSI-BSE/basis_set_exchange/archive/v0.8.11.tar.gz"
|
||||
F77ZMQ_URL="https://github.com/scemama/f77_zmq/archive/v4.2.5.tar.gz"
|
||||
LIBCAP_URL="https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git/snapshot/libcap-2.25.tar.gz"
|
||||
NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip"
|
||||
OCAML_URL="https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh"
|
||||
RESULTS_URL="https://gitlab.com/scemama/resultsFile/-/archive/v2.0/resultsFile-v2.0.tar.gz"
|
||||
@ -41,6 +39,7 @@ Usage:
|
||||
$(basename $0) -c <file> | --config=<file>
|
||||
$(basename $0) -h | --help
|
||||
$(basename $0) -i <package> | --install=<package>
|
||||
$(basename $0) -d <package> | --download=<package>
|
||||
|
||||
Options:
|
||||
-c, --config=<file> Define a COMPILATION configuration file,
|
||||
@ -49,6 +48,9 @@ Options:
|
||||
-i, --install=<package> INSTALL <package>. Use at your OWN RISK:
|
||||
no support will be provided for the installation of
|
||||
dependencies.
|
||||
-d, --download=<package> DOWNLOAD <package>. Use at your OWN RISK:
|
||||
no support will be provided for the installation of
|
||||
dependencies.
|
||||
|
||||
Example:
|
||||
./$(basename $0) -c config/gfortran.cfg
|
||||
@ -100,6 +102,14 @@ while true ; do
|
||||
case "$2" in
|
||||
"") help ; break;;
|
||||
*) PACKAGES="${PACKAGE} $2"
|
||||
DO_INSTALL=1
|
||||
esac
|
||||
shift 2;;
|
||||
-d|--download)
|
||||
case "$2" in
|
||||
"") help ; break;;
|
||||
*) PACKAGES="${PACKAGE} $2"
|
||||
DO_DOWNLOAD=1
|
||||
esac
|
||||
shift 2;;
|
||||
-h|-help|--help)
|
||||
@ -204,7 +214,7 @@ if [[ "${PACKAGES}.x" != ".x" ]] ; then
|
||||
fi
|
||||
|
||||
if [[ ${PACKAGES} = all ]] ; then
|
||||
PACKAGES="zlib ninja irpf90 zeromq f77zmq gmp libcap bwrap ocaml docopt resultsFile bats"
|
||||
PACKAGES="zlib ninja zeromq f77zmq gmp ocaml docopt resultsFile bats"
|
||||
fi
|
||||
|
||||
|
||||
@ -212,15 +222,20 @@ for PACKAGE in ${PACKAGES} ; do
|
||||
|
||||
if [[ ${PACKAGE} = ninja ]] ; then
|
||||
|
||||
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||
download ${NINJA_URL} "${QP_ROOT}"/external/ninja.zip
|
||||
fi
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
execute << EOF
|
||||
rm -f "\${QP_ROOT}"/bin/ninja
|
||||
unzip "\${QP_ROOT}"/external/ninja.zip -d "\${QP_ROOT}"/bin
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
elif [[ ${PACKAGE} = gmp ]] ; then
|
||||
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --bzip2 --extract --file gmp-6.1.2.tar.bz2
|
||||
@ -228,45 +243,15 @@ EOF
|
||||
./configure --prefix=$QP_ROOT && make -j 8
|
||||
make install
|
||||
EOF
|
||||
|
||||
elif [[ ${PACKAGE} = libcap ]] ; then
|
||||
|
||||
download ${LIBCAP_URL} "${QP_ROOT}"/external/libcap.tar.gz
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --gunzip --extract --file libcap.tar.gz
|
||||
rm libcap.tar.gz
|
||||
cd libcap-*/libcap
|
||||
prefix=$QP_ROOT make BUILD_GPERF=no install
|
||||
EOF
|
||||
|
||||
elif [[ ${PACKAGE} = bwrap ]] ; then
|
||||
|
||||
download ${BUBBLE_URL} "${QP_ROOT}"/external/bwrap.tar.xz
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --xz --extract --file bwrap.tar.xz
|
||||
rm bwrap.tar.xz
|
||||
cd bubblewrap*
|
||||
./configure --prefix=$QP_ROOT && make -j 8
|
||||
make install-exec-am
|
||||
EOF
|
||||
|
||||
elif [[ ${PACKAGE} = irpf90 ]] ; then
|
||||
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --gunzip --extract --file irpf90.tar.gz
|
||||
rm irpf90.tar.gz
|
||||
mv irpf90-* irpf90
|
||||
cd irpf90
|
||||
make
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
elif [[ ${PACKAGE} = zeromq ]] ; then
|
||||
|
||||
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||
download ${ZEROMQ_URL} "${QP_ROOT}"/external/zeromq.tar.gz
|
||||
fi
|
||||
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
execute << EOF
|
||||
export CC=gcc
|
||||
export CXX=g++
|
||||
@ -278,11 +263,16 @@ EOF
|
||||
make
|
||||
make install
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
elif [[ ${PACKAGE} = f77zmq ]] ; then
|
||||
|
||||
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||
download ${F77ZMQ_URL} "${QP_ROOT}"/external/f77_zmq.tar.gz
|
||||
fi
|
||||
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --gunzip --extract --file f77_zmq.tar.gz
|
||||
@ -294,24 +284,44 @@ EOF
|
||||
cp libf77zmq.so "\${QP_ROOT}"/lib
|
||||
cp f77_zmq_free.h "\${QP_ROOT}"/include
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
elif [[ ${PACKAGE} = ocaml ]] ; then
|
||||
|
||||
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||
download ${OCAML_URL} "${QP_ROOT}"/external/ocaml-bundle.sh
|
||||
fi
|
||||
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
cd "${QP_ROOT}"/external/
|
||||
./ocaml-bundle.sh
|
||||
cat << EOF | ./ocaml-bundle.sh
|
||||
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
elif [[ ${PACKAGE} = bse ]] ; then
|
||||
|
||||
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||
download ${BSE_URL} "${QP_ROOT}"/external/bse.tar.gz
|
||||
fi
|
||||
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --gunzip --extract --file bse.tar.gz
|
||||
pip install -e basis_set_exchange-*
|
||||
EOF
|
||||
fi
|
||||
|
||||
elif [[ ${PACKAGE} = zlib ]] ; then
|
||||
|
||||
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||
download ${ZLIB_URL} "${QP_ROOT}"/external/zlib.tar.gz
|
||||
fi
|
||||
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --gunzip --extract --file zlib.tar.gz
|
||||
@ -320,38 +330,54 @@ EOF
|
||||
./configure --prefix=${QP_ROOT} && \
|
||||
make && make install
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
elif [[ ${PACKAGE} = docopt ]] ; then
|
||||
|
||||
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||
download ${DOCOPT_URL} "${QP_ROOT}"/external/docopt.tar.gz
|
||||
fi
|
||||
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --gunzip --extract --file docopt.tar.gz
|
||||
mv docopt-*/docopt.py "\${QP_ROOT}/external/Python"
|
||||
rm --recursive --force -- docopt-*/ docopt.tar.gz
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
elif [[ ${PACKAGE} = resultsFile ]] ; then
|
||||
|
||||
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||
download ${RESULTS_URL} "${QP_ROOT}"/external/resultsFile.tar.gz
|
||||
fi
|
||||
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --gunzip --extract --file resultsFile.tar.gz
|
||||
mv resultsFile-*/resultsFile "\${QP_ROOT}/external/Python/"
|
||||
rm --recursive --force resultsFile-* resultsFile.tar.gz
|
||||
EOF
|
||||
fi
|
||||
|
||||
elif [[ ${PACKAGE} = bats ]] ; then
|
||||
|
||||
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||
download ${BATS_URL} "${QP_ROOT}"/external/bats.tar.gz
|
||||
fi
|
||||
|
||||
if [[ $DO_INSTALL == 1 ]] ; then
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar -zxf bats.tar.gz
|
||||
( cd bats-core-1.1.0/ ; ./install.sh \${QP_ROOT})
|
||||
rm --recursive --force -- bats-core-1.1.0 \ "\${QP_ROOT}"/external/bats.tar.gz
|
||||
EOF
|
||||
fi
|
||||
|
||||
else
|
||||
error "${PACKAGE} unknown."
|
||||
@ -369,12 +395,6 @@ if [[ ${NINJA} = $(not_found) ]] ; then
|
||||
fail
|
||||
fi
|
||||
|
||||
IRPF90=$(find_exe irpf90)
|
||||
if [[ ${IRPF90} = $(not_found) ]] ; then
|
||||
error "IRPF90 (irpf90) is not installed."
|
||||
fail
|
||||
fi
|
||||
|
||||
ZEROMQ=$(find_lib -lzmq)
|
||||
if [[ ${ZEROMQ} = $(not_found) ]] ; then
|
||||
error "ZeroMQ (zeromq) is not installed."
|
||||
@ -393,24 +413,6 @@ if [[ ${ZLIB} = $(not_found) ]] ; then
|
||||
fail
|
||||
fi
|
||||
|
||||
LIBCAP=$(find_lib -lcap)
|
||||
if [[ ${LIBCAP} = $(not_found) ]] ; then
|
||||
error "Libcap (libcap) is not installed."
|
||||
fail
|
||||
fi
|
||||
|
||||
BWRAP=$(find_exe bwrap)
|
||||
if [[ ${BWRAP} = $(not_found) ]] ; then
|
||||
error "Bubblewrap (bwrap) is not installed."
|
||||
fail
|
||||
fi
|
||||
|
||||
OPAM=$(find_exe opam)
|
||||
if [[ ${OPAM} = $(not_found) ]] ; then
|
||||
error "OPAM (ocaml) package manager is not installed."
|
||||
fail
|
||||
fi
|
||||
|
||||
OCAML=$(find_exe ocaml)
|
||||
if [[ ${OCAML} = $(not_found) ]] ; then
|
||||
error "OCaml (ocaml) compiler is not installed."
|
||||
|
@ -4,7 +4,6 @@ if [[ -z $OPAMROOT ]]
|
||||
then
|
||||
|
||||
# Comment these lines if you have a system-wide OCaml installation
|
||||
export OPAMROOT=${QP_ROOT}/external/opam
|
||||
export PATH="${QP_ROOT}/external/ocaml-bundle/bootstrap/bin:$PATH"
|
||||
eval $(opam env --root "${QP_ROOT}/external/ocaml-bundle/opam" --set-root)
|
||||
|
||||
|
BIN
external/ocaml-bundle.sh
vendored
BIN
external/ocaml-bundle.sh
vendored
Binary file not shown.
@ -2,7 +2,7 @@
|
||||
# Stage 1
|
||||
|
||||
# Configure QP2
|
||||
./configure --install all --config ./config/travis.cfg || exit -1
|
||||
./configure --download all --install all --config ./config/travis.cfg || exit -1
|
||||
|
||||
# Create cache
|
||||
cd ../
|
||||
|
Loading…
Reference in New Issue
Block a user