10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-11-07 06:33:38 +01:00
This commit is contained in:
Anthony Scemama 2019-07-01 13:11:46 +02:00
parent 7088c263be
commit 5befb6dfe9
4 changed files with 29 additions and 13 deletions

View File

@ -3,9 +3,9 @@
# URLs # URLs
###### ######
URL_OPAM ="https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh" URL_OPAM ="https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh"
URL_IRPF90="https://github.com/scemama/irpf90/archive/v1.7.2.tar.gz" URL_IRPF90="https://gitlab.com/scemama/irpf90/-/archive/v1.7.2/irpf90-v1.7.2.tar.gz"
URL_EZFIO ="https://github.com/scemama/EZFIO/archive/v1.3.2.tar.gz" URL_EZFIO ="https://gitlab.com/scemama/EZFIO/-/archive/master/EZFIO-master.tar.gz"
URL_ZMQ ="http://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz" URL_ZMQ ="http://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz"
URL_F77ZMQ="https://github.com/scemama/f77_zmq/archive/v4.2.5.tar.gz" URL_F77ZMQ="https://github.com/scemama/f77_zmq/archive/v4.2.5.tar.gz"
@ -49,7 +49,7 @@ build _build/irpf90.ok ../bin/irpman ../bin/irpf90: install | Downloads/irpf90.t
target = irpf90 target = irpf90
descr = IRPF90 descr = IRPF90
build _build/zmq.ok ../lib/libzmq.a ../lib/libzmq.so.4 ../lib/libzmq.so ../lib/zmq.h ../lib/zmq_utils.h: install | Downloads/zmq.tar.gz build _build/zmq.ok ../lib/libzmq.a ../lib/libzmq.so.5 ../lib/libzmq.so ../lib/zmq.h ../lib/zmq_utils.h: install | Downloads/zmq.tar.gz
target = zmq target = zmq
descr = ZeroMQ descr = ZeroMQ

View File

@ -4,7 +4,7 @@ set -u
set -e set -e
cd .. ; QMCCHEM_PATH="$PWD" ; cd - cd .. ; QMCCHEM_PATH="$PWD" ; cd -
PACKAGES="core cryptokit ocamlfind sexplib" # ppx_sexp_conv" PACKAGES="cryptokit ocamlfind sexplib.v0.11.0 ppx_sexp_conv ppx_deriving"
# return 0 if program version is equal or greater than check version # return 0 if program version is equal or greater than check version
check_version () { check_version () {
@ -53,31 +53,47 @@ source "${QMCCHEM_PATH}"/qmcchemrc
set -u set -u
cd Downloads cd Downloads
chmod +x opam_installer.sh chmod +x opam_installer.sh
rm --force ${QMCCHEM_PATH}/bin/opam
if [[ -z "$OPAMROOT" ]] ; then
export OPAMROOT=${HOME}/.opam
fi
if [[ -d "${HOME}"/.opam ]]
if [[ -d "$OPAMROOT" ]]
then then
set +e set +e
set +u set +u
source "${HOME}"/.opam/opam-init/init.sh source "${OPAMROOT}"/opam-init/init.sh
set -e set -e
set -u set -u
rm -f ${QMCCHEM_PATH}/bin/opam
ln -s $(which opam) ${QMCCHEM_PATH}/bin/opam
fi fi
echo N | ./opam_installer.sh "${QMCCHEM_PATH}"/bin/
cat << EOF | bash ./opam_installer.sh --no-backup
${QMCCHEM_PATH}/bin/
EOF
if [[ ! -f "${QMCCHEM_PATH}"/bin/opam ]] if [[ ! -f "${QMCCHEM_PATH}"/bin/opam ]]
then then
echo "Installation of OPAM failed" echo "Installation of OPAM failed"
exit 2 exit 2
fi fi
"${QMCCHEM_PATH}"/bin/opam config setup -a --dot-profile "${QMCCHEM_PATH}"/qmcchemrc
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
${QMCCHEM_PATH}/bin/opam init --verbose --yes --comp=4.07.1 --disable-sandboxing
touch "${QMCCHEM_PATH}"/bin/opam touch "${QMCCHEM_PATH}"/bin/opam
eval $(${QMCCHEM_PATH}/bin/opam env)
set +u set +u
export LD_LIBRARY_PATH="${QMCCHEM_PATH}/lib:${LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="${QMCCHEM_PATH}/lib:${LD_LIBRARY_PATH}"
export LIBRARY_PATH="${QMCCHEM_PATH}/lib:${LIBRARY_PATH}" export LIBRARY_PATH="${QMCCHEM_PATH}/lib:${LIBRARY_PATH}"
export C_INCLUDE_PATH="${QMCCHEM_PATH}/lib:${C_INCLUDE_PATH}" export C_INCLUDE_PATH="${QMCCHEM_PATH}/lib:${C_INCLUDE_PATH}"
set -u set -u
opam install ${PACKAGES} opam install --unlock-base ${PACKAGES}
rm "${QMCCHEM_PATH}"/install/_build/ocaml.log rm "${QMCCHEM_PATH}"/install/_build/ocaml.log
exit 0 exit 0

View File

@ -11,8 +11,8 @@ source qmcchemrc
FCFLAGS="${FCFLAGS} -fPIC" FCFLAGS="${FCFLAGS} -fPIC"
export IRPF90 FC FCFLAGS AR RANLIB export IRPF90 FC FCFLAGS AR RANLIB
cd EZFIO cd EZFIO
rm -f make.config source ../make.config
${NINJA} || exit -1 make || exit -1
cp lib/libezfio{,_irp}.a ${QMCCHEM_PATH}/lib/ || exit 1 cp lib/libezfio{,_irp}.a ${QMCCHEM_PATH}/lib/ || exit 1

View File

@ -26,7 +26,7 @@ then
source ${QMCCHEM_PATH}/make.config source ${QMCCHEM_PATH}/make.config
LIB="${LIB} ${QMCCHEM_PATH}/lib/libezfio_irp.a ${QMCCHEM_PATH}/lib/libf77zmq.a ${QMCCHEM_PATH}/lib/libzmq.a -lstdc++ -lrt" LIB="${LIB} ${QMCCHEM_PATH}/lib/libezfio_irp.a ${QMCCHEM_PATH}/lib/libf77zmq.a ${QMCCHEM_PATH}/lib/libzmq.a -lstdc++ -lrt -lz"
SRC="${SRC} ZMQ/f77_zmq_module.f90" SRC="${SRC} ZMQ/f77_zmq_module.f90"
OBJ="${OBJ} IRPF90_temp/ZMQ/f77_zmq_module.o" OBJ="${OBJ} IRPF90_temp/ZMQ/f77_zmq_module.o"
INCLUDES="${INCLUDES} -I AO -I SAMPLING -I TOOLS -I JASTROW -I MAIN -I PROPERTIES -I ZMQ" INCLUDES="${INCLUDES} -I AO -I SAMPLING -I TOOLS -I JASTROW -I MAIN -I PROPERTIES -I ZMQ"