mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +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
|
- Added LIB file to add extra libs in plugin
|
||||||
- Using Intel IPP for sorting when using Intel compiler
|
- Using Intel IPP for sorting when using Intel compiler
|
||||||
- Removed parallelism in sorting
|
- Removed parallelism in sorting
|
||||||
|
- Compute banned_excitations from exchange integrals to accelerate with local MOs
|
||||||
ao_one_e_integral_zero
|
|
||||||
banned_excitations
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
130
configure
vendored
130
configure
vendored
@ -3,7 +3,7 @@
|
|||||||
# Quantum Package configuration script
|
# 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"
|
eval set -- "$TEMP"
|
||||||
|
|
||||||
export QP_ROOT="$( cd "$(dirname "$0")" ; pwd -P )"
|
export QP_ROOT="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||||
@ -20,11 +20,9 @@ git submodule update
|
|||||||
|
|
||||||
# /!\ When updating version, update also etc files
|
# /!\ When updating version, update also etc files
|
||||||
BATS_URL="https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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) -c <file> | --config=<file>
|
||||||
$(basename $0) -h | --help
|
$(basename $0) -h | --help
|
||||||
$(basename $0) -i <package> | --install=<package>
|
$(basename $0) -i <package> | --install=<package>
|
||||||
|
$(basename $0) -d <package> | --download=<package>
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-c, --config=<file> Define a COMPILATION configuration file,
|
-c, --config=<file> Define a COMPILATION configuration file,
|
||||||
@ -49,6 +48,9 @@ Options:
|
|||||||
-i, --install=<package> INSTALL <package>. Use at your OWN RISK:
|
-i, --install=<package> INSTALL <package>. Use at your OWN RISK:
|
||||||
no support will be provided for the installation of
|
no support will be provided for the installation of
|
||||||
dependencies.
|
dependencies.
|
||||||
|
-d, --download=<package> DOWNLOAD <package>. Use at your OWN RISK:
|
||||||
|
no support will be provided for the installation of
|
||||||
|
dependencies.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
./$(basename $0) -c config/gfortran.cfg
|
./$(basename $0) -c config/gfortran.cfg
|
||||||
@ -100,6 +102,14 @@ while true ; do
|
|||||||
case "$2" in
|
case "$2" in
|
||||||
"") help ; break;;
|
"") help ; break;;
|
||||||
*) PACKAGES="${PACKAGE} $2"
|
*) PACKAGES="${PACKAGE} $2"
|
||||||
|
DO_INSTALL=1
|
||||||
|
esac
|
||||||
|
shift 2;;
|
||||||
|
-d|--download)
|
||||||
|
case "$2" in
|
||||||
|
"") help ; break;;
|
||||||
|
*) PACKAGES="${PACKAGE} $2"
|
||||||
|
DO_DOWNLOAD=1
|
||||||
esac
|
esac
|
||||||
shift 2;;
|
shift 2;;
|
||||||
-h|-help|--help)
|
-h|-help|--help)
|
||||||
@ -204,7 +214,7 @@ if [[ "${PACKAGES}.x" != ".x" ]] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${PACKAGES} = all ]] ; then
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -212,15 +222,20 @@ for PACKAGE in ${PACKAGES} ; do
|
|||||||
|
|
||||||
if [[ ${PACKAGE} = ninja ]] ; then
|
if [[ ${PACKAGE} = ninja ]] ; then
|
||||||
|
|
||||||
|
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||||
download ${NINJA_URL} "${QP_ROOT}"/external/ninja.zip
|
download ${NINJA_URL} "${QP_ROOT}"/external/ninja.zip
|
||||||
|
fi
|
||||||
|
if [[ $DO_INSTALL == 1 ]] ; then
|
||||||
execute << EOF
|
execute << EOF
|
||||||
rm -f "\${QP_ROOT}"/bin/ninja
|
rm -f "\${QP_ROOT}"/bin/ninja
|
||||||
unzip "\${QP_ROOT}"/external/ninja.zip -d "\${QP_ROOT}"/bin
|
unzip "\${QP_ROOT}"/external/ninja.zip -d "\${QP_ROOT}"/bin
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = gmp ]] ; then
|
elif [[ ${PACKAGE} = gmp ]] ; then
|
||||||
|
|
||||||
|
if [[ $DO_INSTALL == 1 ]] ; then
|
||||||
execute << EOF
|
execute << EOF
|
||||||
cd "\${QP_ROOT}"/external
|
cd "\${QP_ROOT}"/external
|
||||||
tar --bzip2 --extract --file gmp-6.1.2.tar.bz2
|
tar --bzip2 --extract --file gmp-6.1.2.tar.bz2
|
||||||
@ -228,45 +243,15 @@ EOF
|
|||||||
./configure --prefix=$QP_ROOT && make -j 8
|
./configure --prefix=$QP_ROOT && make -j 8
|
||||||
make install
|
make install
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = zeromq ]] ; then
|
elif [[ ${PACKAGE} = zeromq ]] ; then
|
||||||
|
|
||||||
|
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||||
download ${ZEROMQ_URL} "${QP_ROOT}"/external/zeromq.tar.gz
|
download ${ZEROMQ_URL} "${QP_ROOT}"/external/zeromq.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $DO_INSTALL == 1 ]] ; then
|
||||||
execute << EOF
|
execute << EOF
|
||||||
export CC=gcc
|
export CC=gcc
|
||||||
export CXX=g++
|
export CXX=g++
|
||||||
@ -278,11 +263,16 @@ EOF
|
|||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = f77zmq ]] ; then
|
elif [[ ${PACKAGE} = f77zmq ]] ; then
|
||||||
|
|
||||||
|
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||||
download ${F77ZMQ_URL} "${QP_ROOT}"/external/f77_zmq.tar.gz
|
download ${F77ZMQ_URL} "${QP_ROOT}"/external/f77_zmq.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $DO_INSTALL == 1 ]] ; then
|
||||||
execute << EOF
|
execute << EOF
|
||||||
cd "\${QP_ROOT}"/external
|
cd "\${QP_ROOT}"/external
|
||||||
tar --gunzip --extract --file f77_zmq.tar.gz
|
tar --gunzip --extract --file f77_zmq.tar.gz
|
||||||
@ -294,24 +284,44 @@ EOF
|
|||||||
cp libf77zmq.so "\${QP_ROOT}"/lib
|
cp libf77zmq.so "\${QP_ROOT}"/lib
|
||||||
cp f77_zmq_free.h "\${QP_ROOT}"/include
|
cp f77_zmq_free.h "\${QP_ROOT}"/include
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = ocaml ]] ; then
|
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/
|
cd "${QP_ROOT}"/external/
|
||||||
./ocaml-bundle.sh
|
cat << EOF | ./ocaml-bundle.sh
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = bse ]] ; then
|
elif [[ ${PACKAGE} = bse ]] ; then
|
||||||
|
|
||||||
|
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||||
download ${BSE_URL} "${QP_ROOT}"/external/bse.tar.gz
|
download ${BSE_URL} "${QP_ROOT}"/external/bse.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $DO_INSTALL == 1 ]] ; then
|
||||||
execute << EOF
|
execute << EOF
|
||||||
cd "\${QP_ROOT}"/external
|
cd "\${QP_ROOT}"/external
|
||||||
tar --gunzip --extract --file bse.tar.gz
|
tar --gunzip --extract --file bse.tar.gz
|
||||||
pip install -e basis_set_exchange-*
|
pip install -e basis_set_exchange-*
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = zlib ]] ; then
|
elif [[ ${PACKAGE} = zlib ]] ; then
|
||||||
|
|
||||||
|
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||||
download ${ZLIB_URL} "${QP_ROOT}"/external/zlib.tar.gz
|
download ${ZLIB_URL} "${QP_ROOT}"/external/zlib.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $DO_INSTALL == 1 ]] ; then
|
||||||
execute << EOF
|
execute << EOF
|
||||||
cd "\${QP_ROOT}"/external
|
cd "\${QP_ROOT}"/external
|
||||||
tar --gunzip --extract --file zlib.tar.gz
|
tar --gunzip --extract --file zlib.tar.gz
|
||||||
@ -320,38 +330,54 @@ EOF
|
|||||||
./configure --prefix=${QP_ROOT} && \
|
./configure --prefix=${QP_ROOT} && \
|
||||||
make && make install
|
make && make install
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = docopt ]] ; then
|
elif [[ ${PACKAGE} = docopt ]] ; then
|
||||||
|
|
||||||
|
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||||
download ${DOCOPT_URL} "${QP_ROOT}"/external/docopt.tar.gz
|
download ${DOCOPT_URL} "${QP_ROOT}"/external/docopt.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $DO_INSTALL == 1 ]] ; then
|
||||||
execute << EOF
|
execute << EOF
|
||||||
cd "\${QP_ROOT}"/external
|
cd "\${QP_ROOT}"/external
|
||||||
tar --gunzip --extract --file docopt.tar.gz
|
tar --gunzip --extract --file docopt.tar.gz
|
||||||
mv docopt-*/docopt.py "\${QP_ROOT}/external/Python"
|
mv docopt-*/docopt.py "\${QP_ROOT}/external/Python"
|
||||||
rm --recursive --force -- docopt-*/ docopt.tar.gz
|
rm --recursive --force -- docopt-*/ docopt.tar.gz
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = resultsFile ]] ; then
|
elif [[ ${PACKAGE} = resultsFile ]] ; then
|
||||||
|
|
||||||
|
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||||
download ${RESULTS_URL} "${QP_ROOT}"/external/resultsFile.tar.gz
|
download ${RESULTS_URL} "${QP_ROOT}"/external/resultsFile.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $DO_INSTALL == 1 ]] ; then
|
||||||
execute << EOF
|
execute << EOF
|
||||||
cd "\${QP_ROOT}"/external
|
cd "\${QP_ROOT}"/external
|
||||||
tar --gunzip --extract --file resultsFile.tar.gz
|
tar --gunzip --extract --file resultsFile.tar.gz
|
||||||
mv resultsFile-*/resultsFile "\${QP_ROOT}/external/Python/"
|
mv resultsFile-*/resultsFile "\${QP_ROOT}/external/Python/"
|
||||||
rm --recursive --force resultsFile-* resultsFile.tar.gz
|
rm --recursive --force resultsFile-* resultsFile.tar.gz
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = bats ]] ; then
|
elif [[ ${PACKAGE} = bats ]] ; then
|
||||||
|
|
||||||
|
if [[ $DO_DOWNLOAD == 1 ]] ; then
|
||||||
download ${BATS_URL} "${QP_ROOT}"/external/bats.tar.gz
|
download ${BATS_URL} "${QP_ROOT}"/external/bats.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $DO_INSTALL == 1 ]] ; then
|
||||||
execute << EOF
|
execute << EOF
|
||||||
cd "\${QP_ROOT}"/external
|
cd "\${QP_ROOT}"/external
|
||||||
tar -zxf bats.tar.gz
|
tar -zxf bats.tar.gz
|
||||||
( cd bats-core-1.1.0/ ; ./install.sh \${QP_ROOT})
|
( cd bats-core-1.1.0/ ; ./install.sh \${QP_ROOT})
|
||||||
rm --recursive --force -- bats-core-1.1.0 \ "\${QP_ROOT}"/external/bats.tar.gz
|
rm --recursive --force -- bats-core-1.1.0 \ "\${QP_ROOT}"/external/bats.tar.gz
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
error "${PACKAGE} unknown."
|
error "${PACKAGE} unknown."
|
||||||
@ -369,12 +395,6 @@ if [[ ${NINJA} = $(not_found) ]] ; then
|
|||||||
fail
|
fail
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IRPF90=$(find_exe irpf90)
|
|
||||||
if [[ ${IRPF90} = $(not_found) ]] ; then
|
|
||||||
error "IRPF90 (irpf90) is not installed."
|
|
||||||
fail
|
|
||||||
fi
|
|
||||||
|
|
||||||
ZEROMQ=$(find_lib -lzmq)
|
ZEROMQ=$(find_lib -lzmq)
|
||||||
if [[ ${ZEROMQ} = $(not_found) ]] ; then
|
if [[ ${ZEROMQ} = $(not_found) ]] ; then
|
||||||
error "ZeroMQ (zeromq) is not installed."
|
error "ZeroMQ (zeromq) is not installed."
|
||||||
@ -393,24 +413,6 @@ if [[ ${ZLIB} = $(not_found) ]] ; then
|
|||||||
fail
|
fail
|
||||||
fi
|
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)
|
OCAML=$(find_exe ocaml)
|
||||||
if [[ ${OCAML} = $(not_found) ]] ; then
|
if [[ ${OCAML} = $(not_found) ]] ; then
|
||||||
error "OCaml (ocaml) compiler is not installed."
|
error "OCaml (ocaml) compiler is not installed."
|
||||||
|
@ -4,7 +4,6 @@ if [[ -z $OPAMROOT ]]
|
|||||||
then
|
then
|
||||||
|
|
||||||
# Comment these lines if you have a system-wide OCaml installation
|
# 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"
|
export PATH="${QP_ROOT}/external/ocaml-bundle/bootstrap/bin:$PATH"
|
||||||
eval $(opam env --root "${QP_ROOT}/external/ocaml-bundle/opam" --set-root)
|
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
|
# Stage 1
|
||||||
|
|
||||||
# Configure QP2
|
# Configure QP2
|
||||||
./configure --install all --config ./config/travis.cfg || exit -1
|
./configure --download all --install all --config ./config/travis.cfg || exit -1
|
||||||
|
|
||||||
# Create cache
|
# Create cache
|
||||||
cd ../
|
cd ../
|
||||||
|
Loading…
Reference in New Issue
Block a user