9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-29 15:54:42 +02:00

Merge branch 'master' into features_periodic

This commit is contained in:
Anthony Scemama 2020-02-26 10:46:31 +01:00
commit cb0a9d2750
3 changed files with 36 additions and 42 deletions

76
configure vendored
View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
# #
# Quantum Package configuration script # Quantum Package configuration script
# #
@ -15,13 +15,13 @@ unset CCXX
export CC=gcc export CC=gcc
# When updating version, update also etc files # /!\ When updating version, update also etc files
EZFIO_TGZ="EZFIO.1.6.2.tar.gz"
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" 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"
EZFIO_URL="https://gitlab.com/scemama/EZFIO/-/archive/v1.6.1/EZFIO-v1.6.1.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"
GMP_URL="ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2" GMP_URL="ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2"
IRPF90_URL="https://gitlab.com/scemama/irpf90/-/archive/v1.7.6/irpf90-v1.7.6.tar.gz" IRPF90_URL="https://gitlab.com/scemama/irpf90/-/archive/v1.7.6/irpf90-v1.7.6.tar.gz"
@ -45,7 +45,7 @@ Usage:
Options: Options:
-c, --config=<file> Define a COMPILATION configuration file, -c, --config=<file> Define a COMPILATION configuration file,
in "${QP_ROOT}/config/". in "${QP_ROOT}/config/".
-h, --help Print the HELP message -h, --help Print the HELP message
-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
@ -73,7 +73,7 @@ function execute () {
while read -r line; do while read -r line; do
echo " " $line echo " " $line
_command+="${line} ;" _command+="${line} ;"
done done
sleep 1 sleep 1
echo "" echo ""
printf "\e[0;94m" printf "\e[0;94m"
@ -87,7 +87,7 @@ OCAML_PACKAGES="ocamlbuild cryptokit zmq sexplib ppx_sexp_conv ppx_deriving geto
while true ; do while true ; do
case "$1" in case "$1" in
-c|--config) -c|--config)
case "$2" in case "$2" in
"") help ; break;; "") help ; break;;
*) if [[ -f $2 ]] ; then *) if [[ -f $2 ]] ; then
@ -96,15 +96,15 @@ while true ; do
error "error: configuration file $2 not found." error "error: configuration file $2 not found."
exit 1 exit 1
fi fi
esac esac
shift 2;; shift 2;;
-i|--install) -i|--install)
case "$2" in case "$2" in
"") help ; break;; "") help ; break;;
*) PACKAGES="${PACKAGE} $2" *) PACKAGES="${PACKAGE} $2"
esac esac
shift 2;; shift 2;;
-h|-help|--help) -h|-help|--help)
help help
exit 0;; exit 0;;
--) shift ; break ;; --) shift ; break ;;
@ -178,6 +178,19 @@ function find_dir() {
} }
# Extract EZFIO if needed
EZFIO=$(find_dir "${QP_ROOT}"/external/ezfio)
if [[ ${EZFIO} = $(not_found) ]] ; then
execute << EOF
cd "\${QP_ROOT}"/external
tar --gunzip --extract --file ${EZFIO_TGZ}
rm -rf ezfio
mv EZFIO ezfio
EOF
fi
if [[ "${PACKAGES}.x" != ".x" ]] ; then if [[ "${PACKAGES}.x" != ".x" ]] ; then
printf "\e[0;31m" printf "\e[0;31m"
echo "" echo ""
@ -224,7 +237,7 @@ EOF
./configure --prefix=$QP_ROOT && make -j 8 ./configure --prefix=$QP_ROOT && make -j 8
make install make install
EOF EOF
elif [[ ${PACKAGE} = libcap ]] ; then elif [[ ${PACKAGE} = libcap ]] ; then
download ${LIBCAP_URL} "${QP_ROOT}"/external/libcap.tar.gz download ${LIBCAP_URL} "${QP_ROOT}"/external/libcap.tar.gz
@ -259,7 +272,7 @@ EOF
cd irpf90-* cd irpf90-*
make make
EOF EOF
elif [[ ${PACKAGE} = zeromq ]] ; then elif [[ ${PACKAGE} = zeromq ]] ; then
@ -290,7 +303,7 @@ EOF
cp f77_zmq_free.h "\${QP_ROOT}"/include cp f77_zmq_free.h "\${QP_ROOT}"/include
EOF EOF
elif [[ ${PACKAGE} = ocaml ]] ; then elif [[ ${PACKAGE} = ocaml ]] ; then
download ${OCAML_URL} "${QP_ROOT}"/external/opam_installer.sh download ${OCAML_URL} "${QP_ROOT}"/external/opam_installer.sh
@ -303,7 +316,7 @@ EOF
rm -rf ${HOME}/.opam rm -rf ${HOME}/.opam
fi fi
export OPAMROOT=${HOME}/.opam export OPAMROOT=${HOME}/.opam
cat << EOF | bash ${QP_ROOT}/external/opam_installer.sh --no-backup cat << EOF | bash ${QP_ROOT}/external/opam_installer.sh --no-backup
${QP_ROOT}/bin ${QP_ROOT}/bin
@ -323,13 +336,13 @@ EOF
# Conventional commands # Conventional commands
execute << EOF execute << EOF
chmod +x "${QP_ROOT}"/external/opam_installer.sh chmod +x "${QP_ROOT}"/external/opam_installer.sh
"${QP_ROOT}"/external/opam_installer.sh --no-backup "${QP_ROOT}"/external/opam_installer.sh --no-backup
EOF EOF
execute << EOF execute << EOF
rm --force ${QP_ROOT}/bin/opam rm --force ${QP_ROOT}/bin/opam
export OPAMROOT=${OPAMROOT:-${QP_ROOT}/external/opam} export OPAMROOT=${OPAMROOT:-${QP_ROOT}/external/opam}
echo ${QP_ROOT}/bin \ echo ${QP_ROOT}/bin \
| sh ${QP_ROOT}/external/opam_installer.sh | sh ${QP_ROOT}/external/opam_installer.sh
EOF EOF
rm ${QP_ROOT}/external/opam_installer.sh rm ${QP_ROOT}/external/opam_installer.sh
# source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true # source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
@ -342,18 +355,6 @@ EOF
EOF EOF
fi fi
elif [[ ${PACKAGE} = ezfio ]] ; then
download ${EZFIO_URL} "${QP_ROOT}"/external/ezfio.tar.gz
execute << EOF
cd "\${QP_ROOT}"/external
tar --gunzip --extract --file ezfio.tar.gz
rm -f ezfio.tar.gz
rm -rf ezfio
mv EZFIO-* ezfio
EOF
elif [[ ${PACKAGE} = bse ]] ; then elif [[ ${PACKAGE} = bse ]] ; then
@ -362,7 +363,6 @@ 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
elif [[ ${PACKAGE} = zlib ]] ; then elif [[ ${PACKAGE} = zlib ]] ; then
download ${ZLIB_URL} "${QP_ROOT}"/external/zlib.tar.gz download ${ZLIB_URL} "${QP_ROOT}"/external/zlib.tar.gz
@ -375,13 +375,13 @@ EOF
make && make install make && make install
EOF EOF
elif [[ ${PACKAGE} = docopt ]] ; then elif [[ ${PACKAGE} = docopt ]] ; then
download ${DOCOPT_URL} "${QP_ROOT}"/external/docopt.tar.gz download ${DOCOPT_URL} "${QP_ROOT}"/external/docopt.tar.gz
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
@ -392,7 +392,7 @@ EOF
download ${RESULTS_URL} "${QP_ROOT}"/external/resultsFile.tar.gz download ${RESULTS_URL} "${QP_ROOT}"/external/resultsFile.tar.gz
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
@ -402,7 +402,7 @@ EOF
download ${BATS_URL} "${QP_ROOT}"/external/bats.tar.gz download ${BATS_URL} "${QP_ROOT}"/external/bats.tar.gz
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
@ -468,12 +468,6 @@ if [[ ${OCAML} = $(not_found) ]] ; then
fail fail
fi fi
EZFIO=$(find_dir "${QP_ROOT}"/external/ezfio)
if [[ ${EZFIO} = $(not_found) ]] ; then
error "EZFIO (ezfio) is not installed."
fail
fi
ZLIB=$(find_lib -lz) ZLIB=$(find_lib -lz)
if [[ ${ZLIB} = $(not_found) ]] ; then if [[ ${ZLIB} = $(not_found) ]] ; then
error "Zlib (zlib) is not installed." error "Zlib (zlib) is not installed."
@ -520,15 +514,15 @@ fi
if [[ -f ${QP_ROOT}/build.ninja ]] ; then if [[ -f ${QP_ROOT}/build.ninja ]] ; then
[[ -z ${TRAVIS} ]] && echo "You can now run ./bin/qpsh to enter in the QP shell mode :)" [[ -z ${TRAVIS} ]] && echo "You can now run ./bin/qpsh to enter in the QP shell mode :)"
else else
echo "" echo ""
echo "${QP_ROOT}/build.ninja does not exist," echo "${QP_ROOT}/build.ninja does not exist,"
echo "you need to specify the COMPILATION configuration file." echo "you need to specify the COMPILATION configuration file."
echo "See ./configure --help for more details." echo "See ./configure --help for more details."
echo "" echo ""
fi fi
exit 0 exit 0

BIN
external/EZFIO.1.6.2.tar.gz vendored Normal file

Binary file not shown.

View File

@ -442,7 +442,7 @@ BEGIN_PROVIDER [ double precision, weight_occ_pattern_average, (N_occ_pattern) ]
endif endif
END_PROVIDER END_PROVIDER
BEGIN_PROVIDER [ double precision, psi_occ_pattern_sorted, (N_int,2,N_occ_pattern) ] BEGIN_PROVIDER [ integer(bit_kind), psi_occ_pattern_sorted, (N_int,2,N_occ_pattern) ]
&BEGIN_PROVIDER [ double precision, weight_occ_pattern_average_sorted, (N_occ_pattern) ] &BEGIN_PROVIDER [ double precision, weight_occ_pattern_average_sorted, (N_occ_pattern) ]
&BEGIN_PROVIDER [ integer, psi_occ_pattern_sorted_order, (N_occ_pattern) ] &BEGIN_PROVIDER [ integer, psi_occ_pattern_sorted_order, (N_occ_pattern) ]
&BEGIN_PROVIDER [ integer, psi_occ_pattern_sorted_order_reverse, (N_occ_pattern) ] &BEGIN_PROVIDER [ integer, psi_occ_pattern_sorted_order_reverse, (N_occ_pattern) ]