mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-12-21 11:53:30 +01:00
Improved install scripts
This commit is contained in:
parent
eecf75171e
commit
81b9c05e77
17
configure.sh
17
configure.sh
@ -2,16 +2,23 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
cd install
|
QMCCHEM_PATH=$PWD
|
||||||
|
mkdir -p "${QMCCHEM_PATH}"/bin
|
||||||
|
cd "${QMCCHEM_PATH}"/install
|
||||||
mkdir -p Downloads _build
|
mkdir -p Downloads _build
|
||||||
mkdir -p bin
|
# TODO : Check if network is up (ping)
|
||||||
if [[ ! -x ../bin/ninja ]]
|
if [[ ! -x "${QMCCHEM_PATH}"/bin/ninja ]]
|
||||||
then
|
then
|
||||||
echo "Installing Ninja"
|
echo "Installing Ninja"
|
||||||
./scripts/install_ninja.sh &> _build/ninja.log
|
./scripts/install_ninja.sh &> _build/ninja.log
|
||||||
|
if [[ ! -x "${QMCCHEM_PATH}"/bin/ninja ]]
|
||||||
|
then
|
||||||
|
echo "Installation of Ninja failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
touch _build/ninja.ok
|
touch _build/ninja.ok
|
||||||
fi
|
fi
|
||||||
touch ../{src,ocaml}/ls_md5
|
touch "${QMCCHEM_PATH}"/{src,ocaml}/ls_md5
|
||||||
exec ../bin/ninja "$@"
|
exec "${QMCCHEM_PATH}"/bin/ninja "$@"
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,11 +4,9 @@ TARGET=ezfio
|
|||||||
|
|
||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
|
cd .. ; QMCCHEM_PATH="$PWD" ; cd -
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
cd ..
|
|
||||||
QMCCHEM_PATH="$PWD"
|
|
||||||
cd -
|
|
||||||
rm -rf "${QMCCHEM_PATH}"/EZFIO
|
rm -rf "${QMCCHEM_PATH}"/EZFIO
|
||||||
cd "${BUILD}"/config
|
cd "${BUILD}"/config
|
||||||
rm -f -- qmc.config properties.config
|
rm -f -- qmc.config properties.config
|
||||||
|
@ -3,16 +3,17 @@
|
|||||||
TARGET=f77_zmq
|
TARGET=f77_zmq
|
||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
|
cd .. ; QMCCHEM_PATH="$PWD" ; cd -
|
||||||
set +u
|
set +u
|
||||||
export C_INCLUDE_PATH=$C_INCLUDE_PATH:../../../lib
|
export C_INCLUDE_PATH="${C_INCLUDE_PATH}":../../../lib
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
cd "${BUILD}"
|
cd "${BUILD}"
|
||||||
export ZMQ_H=../../../lib/zmq.h
|
export ZMQ_H="${QMCCHEM_PATH}"/lib/zmq.h
|
||||||
cp "${ZMQ_H}" .
|
cp "${ZMQ_H}" .
|
||||||
make -j
|
make -j 8
|
||||||
cd -
|
cd -
|
||||||
rm -f -- "../src/ZMQ/f77_zmq.h" "../lib/libf77zmq.a" "../lib/libf77zmq.so"
|
rm -f -- "${QMCCHEM_PATH}"/src/ZMQ/f77_zmq.h "${QMCCHEM_PATH}"/lib/libf77zmq.a "${QMCCHEM_PATH}"/lib/libf77zmq.so
|
||||||
cp "${BUILD}"/libf77zmq.{a,so} ../lib/
|
cp "${BUILD}"/libf77zmq.{a,so} ../lib/
|
||||||
cp "${BUILD}"/f77_zmq.h ../src/ZMQ/
|
cp "${BUILD}"/f77_zmq.h ../src/ZMQ/
|
||||||
return 0
|
return 0
|
||||||
|
@ -3,22 +3,23 @@
|
|||||||
TARGET=irpf90
|
TARGET=irpf90
|
||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
|
cd .. ; QMCCHEM_PATH="$PWD" ; cd -
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
make -C "${BUILD}" -j
|
make -C "${BUILD}" -j 8
|
||||||
rm -rf -- ../irpf90
|
rm -rf -- "${QMCCHEM_PATH}"/irpf90
|
||||||
mv "${BUILD}" ../
|
mv "${BUILD}" "${QMCCHEM_PATH}"
|
||||||
# Check the build is OK
|
# Check the build is OK
|
||||||
[[ -x ../irpf90/bin/irpf90 ]]
|
[[ -x "${QMCCHEM_PATH}"/irpf90/bin/irpf90 ]]
|
||||||
[[ -x ../irpf90/bin/irpman ]]
|
[[ -x "${QMCCHEM_PATH}"/irpf90/bin/irpman ]]
|
||||||
for i in irpf90 irpman
|
for i in irpf90 irpman
|
||||||
do
|
do
|
||||||
rm -rf -- ../bin/$i
|
rm -rf -- "${QMCCHEM_PATH}"/bin/$i
|
||||||
cat << EOF > ../bin/$i
|
cat << EOF > ../bin/$i
|
||||||
#!/bin/bash -u
|
#!/bin/bash -u
|
||||||
exec "\${QMCCHEM_PATH}"/irpf90/bin/$i "\$@"
|
exec "\${QMCCHEM_PATH}"/irpf90/bin/$i "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x ../bin/$i
|
chmod +x "${QMCCHEM_PATH}"/bin/$i
|
||||||
done
|
done
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -8,12 +8,13 @@ URL="http://github.com/martine/ninja/archive/v1.5.3.tar.gz"
|
|||||||
|
|
||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
|
cd .. ; QMCCHEM_PATH="$PWD" ; cd -
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
cd "${BUILD}"
|
cd "${BUILD}"
|
||||||
./configure.py --bootstrap
|
./configure.py --bootstrap
|
||||||
cd -
|
cd -
|
||||||
mv "${BUILD}/ninja" ../bin/
|
mv "${BUILD}/ninja" "${QMCCHEM_PATH}"/bin/
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
set -u
|
set -u
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
cd .. ; QMCCHEM_PATH="$PWD" ; cd -
|
||||||
PACKAGES="core cryptokit ocamlfind sexplib"
|
PACKAGES="core cryptokit ocamlfind sexplib"
|
||||||
|
|
||||||
declare -i i
|
declare -i i
|
||||||
@ -13,7 +14,7 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source ../qmcchemrc
|
source "${QMCCHEM_PATH}"/qmcchemrc
|
||||||
cd Downloads
|
cd Downloads
|
||||||
chmod +x opam_installer.sh
|
chmod +x opam_installer.sh
|
||||||
|
|
||||||
@ -41,7 +42,7 @@ 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 ${PACKAGES}
|
||||||
rm ../_build/ocaml.log
|
rm "${QMCCHEM_PATH}"/install/_build/ocaml.log
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,18 +1,33 @@
|
|||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
|
|
||||||
|
cd .. ; QMCCHEM_PATH="$PWD" ; cd -
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
|
|
||||||
|
# Check GCC version
|
||||||
declare -i i
|
declare -i i
|
||||||
i=$(gcc -dumpversion | cut -d '.' -f 2)
|
i=$(gcc -dumpversion | cut -d '.' -f 1)
|
||||||
if [[ i -lt 6 ]]
|
if [[ i -lt 4 ]]
|
||||||
then
|
then
|
||||||
echo "GCC version $(gcc -dumpversion) too old. GCC >= 4.6 required."
|
echo "GCC version $(gcc -dumpversion) too old. GCC >= 4.6 required."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ i -eq 4 ]]
|
||||||
|
then
|
||||||
|
i=$(gcc -dumpversion | cut -d '.' -f 2)
|
||||||
|
if [[ i -lt 6 ]]
|
||||||
|
then
|
||||||
|
echo "GCC version $(gcc -dumpversion) too old. GCC >= 4.6 required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# End check GCC version
|
||||||
|
|
||||||
|
|
||||||
set +u
|
set +u
|
||||||
source ../qmcchemrc
|
source "${QMCCHEM_PATH}"/qmcchemrc
|
||||||
set -u
|
set -u
|
||||||
opam install zmq
|
opam install zmq
|
||||||
rm -f _build/ocaml_zmq.log
|
rm -f _build/ocaml_zmq.log
|
||||||
|
@ -11,7 +11,7 @@ export QMCCHEM_MPIRUN="mpirun"
|
|||||||
export QMCCHEM_MPIRUN_FLAGS="--bind-to-core"
|
export QMCCHEM_MPIRUN_FLAGS="--bind-to-core"
|
||||||
#export QMCCHEM_NIC=ib0
|
#export QMCCHEM_NIC=ib0
|
||||||
source \${QMCCHEM_PATH}/irpf90/bin/irpman
|
source \${QMCCHEM_PATH}/irpf90/bin/irpman
|
||||||
source \${QMCCHEM_PATH}/EZFIO/Bash/ezfio.sh
|
#source \${QMCCHEM_PATH}/EZFIO/Bash/ezfio.sh
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cd -
|
cd -
|
||||||
|
@ -4,6 +4,7 @@ TARGET=zmq
|
|||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
LIBVERSION=4
|
LIBVERSION=4
|
||||||
|
cd .. ; QMCCHEM_PATH="$PWD" ; cd -
|
||||||
set +u
|
set +u
|
||||||
export C_INCLUDE_PATH="${C_INCLUDE_PATH}":./
|
export C_INCLUDE_PATH="${C_INCLUDE_PATH}":./
|
||||||
set -e
|
set -e
|
||||||
@ -12,13 +13,13 @@ function _install()
|
|||||||
./configure --without-libsodium
|
./configure --without-libsodium
|
||||||
make -j 8
|
make -j 8
|
||||||
cd -
|
cd -
|
||||||
rm -f -- ../lib/libzmq.a ../lib/libzmq.so ../lib/libzmq.so.$LIBVERSION
|
rm -f -- "${QMCCHEM_PATH}"/lib/libzmq.{a,so,so.$LIBVERSION}
|
||||||
# cp "${BUILD}"/.libs/libzmq.a ../lib/
|
# cp "${BUILD}"/.libs/libzmq.a "${QMCCHEM_PATH}"/lib/
|
||||||
# cp "${BUILD}"/.libs/libzmq.so ../lib/libzmq.so.$LIBVERSION
|
# cp "${BUILD}"/.libs/libzmq.so "${QMCCHEM_PATH}"/lib/libzmq.so.$LIBVERSION
|
||||||
cp "${BUILD}"/src/.libs/libzmq.a ../lib/
|
cp "${BUILD}"/src/.libs/libzmq.a "${QMCCHEM_PATH}"/lib/
|
||||||
cp "${BUILD}"/src/.libs/libzmq.so ../lib/libzmq.so.$LIBVERSION
|
cp "${BUILD}"/src/.libs/libzmq.so "${QMCCHEM_PATH}"/lib/libzmq.so.$LIBVERSION
|
||||||
cp "${BUILD}"/include/{zmq,zmq_utils}.h ../lib/
|
cp "${BUILD}"/include/{zmq,zmq_utils}.h "${QMCCHEM_PATH}"/lib/
|
||||||
cd ../lib
|
cd "${QMCCHEM_PATH}"/lib
|
||||||
ln libzmq.so.$LIBVERSION libzmq.so || cp libzmq.so.$LIBVERSION libzmq.so
|
ln libzmq.so.$LIBVERSION libzmq.so || cp libzmq.so.$LIBVERSION libzmq.so
|
||||||
cd -
|
cd -
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user