10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-11-09 07:33:39 +01:00

Compare commits

..

2 Commits

Author SHA1 Message Date
5befb6dfe9 Fixing 2019-07-01 13:19:27 +02:00
7088c263be Updates 2019-07-01 11:32:01 +02:00
19 changed files with 69 additions and 65 deletions

View File

@ -3,15 +3,12 @@
# 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.6.7.tar.gz" URL_IRPF90="https://gitlab.com/scemama/irpf90/-/archive/v1.7.2/irpf90-v1.7.2.tar.gz"
URL_EZFIO ="https://gitlab.com/scemama/EZFIO/-/archive/v1.3.3/EZFIO-v1.3.3.tar.gz" URL_EZFIO ="https://gitlab.com/scemama/EZFIO/-/archive/master/EZFIO-master.tar.gz"
#URL_IRPF90="https://github.com/scemama/irpf90/archive/v1.7.2.tar.gz"
URL_ZMQ ="http://download.zeromq.org/zeromq-4.1.4.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/4.1.4.tar.gz" URL_F77ZMQ="https://github.com/scemama/f77_zmq/archive/v4.2.5.tar.gz"
#URL_ZMQ ="https://github.com/zeromq/libzmq/archive/v4.2.5.tar.gz"
#URL_F77ZMQ="https://github.com/scemama/f77_zmq/archive/v4.2.5.tar.gz"
# Rules # Rules
####### #######
@ -52,8 +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.5 ../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
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
target = zmq target = zmq
descr = ZeroMQ descr = ZeroMQ

View File

@ -15,8 +15,7 @@ function _install()
cd - cd -
rm -f -- "${QMCCHEM_PATH}"/src/ZMQ/f77_zmq.h "${QMCCHEM_PATH}"/lib/libf77zmq.a "${QMCCHEM_PATH}"/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_free.h ../src/ZMQ/f77_zmq.h
# cp "${BUILD}"/f77_zmq_free.h ../src/ZMQ/f77_zmq.h
return 0 return 0
} }

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

@ -10,20 +10,11 @@ function _install()
set -e set -e
set -u set -u
cd "${BUILD}" cd "${BUILD}"
./autogen.sh rm -f -- "${QMCCHEM_PATH}"/lib/libzmq.{a,so,so.$LIBVERSION}
./configure --without-libsodium --prefix=${QMCCHEM_PATH} --disable-libunwind ./configure --without-libsodium --enable-libunwind=no --prefix="${QMCCHEM_PATH}"
make -j 8 make -j 8
make install make install
cd - cd -
rm -f -- "${QMCCHEM_PATH}"/lib/libzmq.{a,so,so.$LIBVERSION}
cp "${BUILD}"/.libs/libzmq.a "${QMCCHEM_PATH}"/lib/
cp "${BUILD}"/.libs/libzmq.so "${QMCCHEM_PATH}"/lib/libzmq.so.$LIBVERSION
# cp "${BUILD}"/src/.libs/libzmq.a "${QMCCHEM_PATH}"/lib/
# cp "${BUILD}"/src/.libs/libzmq.so "${QMCCHEM_PATH}"/lib/libzmq.so.$LIBVERSION
cp "${BUILD}"/include/{zmq,zmq_utils}.h "${QMCCHEM_PATH}"/lib/
cd "${QMCCHEM_PATH}"/lib
ln libzmq.so.$LIBVERSION libzmq.so || cp libzmq.so.$LIBVERSION libzmq.so
cd -
return 0 return 0
} }

View File

@ -1,3 +1,3 @@
PKG core cryptokit str ZMQ PKG core cryptokit str zmq
S . S .

View File

@ -83,7 +83,7 @@ let hostname = lazy (
try try
Unix.gethostname () Unix.gethostname ()
with with
| _ -> "localhost" | _ -> "127.0.0.1"
) )

View File

@ -35,7 +35,7 @@ let full_run ?(start_dataserver=true) ezfio_filename =
if (start_dataserver) then if (start_dataserver) then
begin begin
(* Reset socket address in EZFIO *) (* Reset socket address in EZFIO *)
Ezfio.set_simulation_http_server "tcp://localhost:65534"; Ezfio.set_simulation_http_server "tcp://127.0.0.1:65534";
(* Start the data server *) (* Start the data server *)

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"

View File

@ -10,7 +10,7 @@ t = """
&BEGIN_PROVIDER [ $T, $X_2_pdmc_block_walk_kahan $D2 ] &BEGIN_PROVIDER [ $T, $X_2_pdmc_block_walk_kahan $D2 ]
implicit none implicit none
BEGIN_DOC BEGIN_DOC
! pdMC averages of $X. Computed in E_loc_pdmc_block_walk ! PDMC averages of $X. Computed in E_loc_pdmc_block_walk
END_DOC END_DOC
$X_pdmc_block_walk = 0.d0 $X_pdmc_block_walk = 0.d0
$X_pdmc_block_walk_kahan = 0.d0 $X_pdmc_block_walk_kahan = 0.d0
@ -34,7 +34,7 @@ END_SHELL
BEGIN_PROVIDER [ double precision, E_loc_pdmc_block_walk ] BEGIN_PROVIDER [ double precision, E_loc_pdmc_block_walk ]
&BEGIN_PROVIDER [ double precision, E_loc_2_pdmc_block_walk ] &BEGIN_PROVIDER [ double precision, E_loc_2_pdmc_block_walk ]
&BEGIN_PROVIDER [ double precision, E_loc_pdmc_block_walk_kahan, (3) ] &BEGIN_PROVIDER [ double precision, E_loc_pdmc_block_walk_kahan , (3) ]
&BEGIN_PROVIDER [ double precision, E_loc_2_pdmc_block_walk_kahan, (3) ] &BEGIN_PROVIDER [ double precision, E_loc_2_pdmc_block_walk_kahan, (3) ]
implicit none implicit none
include '../types.F' include '../types.F'

View File

@ -11,7 +11,6 @@ subroutine reconfigure(ipos,w)
tmp = 0.d0 tmp = 0.d0
do k=1,walk_num do k=1,walk_num
ipos(k) = k
tmp = tmp + w(k) tmp = tmp + w(k)
enddo enddo
dwalk_num = dble(walk_num)/tmp dwalk_num = dble(walk_num)/tmp

View File

@ -297,6 +297,10 @@ END_SHELL
! Reconfiguration ! Reconfiguration
integer :: ipos(walk_num) integer :: ipos(walk_num)
do k=1,walk_num
ipos(k) = k
enddo
call dsort(srmc_weight,ipos,walk_num)
call reconfigure(ipos,srmc_weight) call reconfigure(ipos,srmc_weight)
do k=1,walk_num do k=1,walk_num

View File

@ -152,7 +152,6 @@ END_SHELL
double precision :: factor double precision :: factor
factor = 1.d0/block_weight factor = 1.d0/block_weight
SOFT_TOUCH block_weight
BEGIN_SHELL [ /usr/bin/env python2 ] BEGIN_SHELL [ /usr/bin/env python2 ]
from properties import * from properties import *
t = """ t = """
@ -165,7 +164,7 @@ for p in properties:
print t.replace("$X",p[1]) print t.replace("$X",p[1])
END_SHELL END_SHELL
SOFT_TOUCH elec_coord_full SOFT_TOUCH elec_coord_full block_weight
END_PROVIDER END_PROVIDER

View File

@ -3,24 +3,24 @@ double precision function qmc_ranf()
! generators', Math. of Comput., 68, 261-269. ! generators', Math. of Comput., 68, 261-269.
implicit none implicit none
integer*8 :: b(2) integer*8 :: b(2)
b(1) = ISHFT( IEOR( ISHFT(seed(1),1), seed(1)), -53) b(1) = SHIFTR( IEOR( ISHFT(seed(1),1), seed(1)), 53)
b(2) = ISHFT( IAND(seed(1),-2_8), 10) b(2) = SHIFTL( IAND(seed(1),-2_8), 10)
seed(1) = IEOR( b(2), b(1)) seed(1) = IEOR( b(2), b(1))
b(1) = ISHFT( IEOR( ISHFT(seed(2),24), seed(2)), -50) b(1) = SHIFTR( IEOR( ISHFT(seed(2),24), seed(2)), 50)
b(2) = ISHFT( IAND(seed(2),-512_8), 5) b(2) = SHIFTL( IAND(seed(2),-512_8), 5)
seed(2) = IEOR( b(2), b(1)) seed(2) = IEOR( b(2), b(1))
b(1) = ISHFT( IEOR( ISHFT(seed(3),3), seed(3)), -23) b(1) = SHIFTR( IEOR( ISHFT(seed(3),3), seed(3)), 23)
b(2) = ISHFT( IAND(seed(3),-4096_8), 29) b(2) = SHIFTL( IAND(seed(3),-4096_8), 29)
seed(3) = IEOR( b(2), b(1)) seed(3) = IEOR( b(2), b(1))
b(1) = ISHFT( IEOR( ISHFT(seed(4),5), seed(4)), -24) b(1) = SHIFTR( IEOR( ISHFT(seed(4),5), seed(4)), 24)
b(2) = ISHFT( IAND(seed(4),-131072_8), 23) b(2) = SHIFTL( IAND(seed(4),-131072_8), 23)
seed(4) = IEOR( b(2), b(1)) seed(4) = IEOR( b(2), b(1))
b(1) = ISHFT( IEOR( ISHFT(seed(5),3), seed(5)), -33) b(1) = SHIFTR( IEOR( ISHFT(seed(5),3), seed(5)), 33)
b(2) = ISHFT( IAND(seed(5),-8388608_8), 8) b(2) = SHIFTL( IAND(seed(5),-8388608_8), 8)
seed(5) = IEOR( b(2), b(1)) seed(5) = IEOR( b(2), b(1))
qmc_ranf = IEOR( IEOR( IEOR( IEOR(seed(1),seed(2)), seed(3)), & qmc_ranf = IEOR( IEOR( IEOR( IEOR(seed(1),seed(2)), seed(3)), &
@ -54,7 +54,7 @@ BEGIN_PROVIDER [ integer*8, seed, (5) ]
double precision :: r double precision :: r
integer*8 :: pid8 integer*8 :: pid8
read(current_PID,*) pid8 read(current_PID,*) pid8
pid8 = iand( ishft(pid8, 32), pid8) pid8 = iand( shiftl(pid8, 32), pid8)
do i=1,12 do i=1,12
clock(i) = i clock(i) = i
enddo enddo
@ -65,7 +65,7 @@ BEGIN_PROVIDER [ integer*8, seed, (5) ]
seed(i) = (r-0.5d0)*huge(1_8) seed(i) = (r-0.5d0)*huge(1_8)
seed(i) = ieor( seed(i), pid8) seed(i) = ieor( seed(i), pid8)
do j=1,16 do j=1,16
seed(i) = ishft(seed(i),1)+1 seed(i) = shiftl(seed(i),1)+1
enddo enddo
enddo enddo

View File

@ -54,7 +54,7 @@ BEGIN_TEMPLATE
endif endif
endif endif
i=l i=l
j = ishft(l,1) j = shiftl(l,1)
do while (j<k) do while (j<k)
if ( x(j) < x(j+1) ) then if ( x(j) < x(j+1) ) then
j=j+1 j=j+1
@ -63,7 +63,7 @@ BEGIN_TEMPLATE
x(i) = x(j) x(i) = x(j)
iorder(i) = iorder(j) iorder(i) = iorder(j)
i = j i = j
j = ishft(j,1) j = shiftl(j,1)
else else
j = k+1 j = k+1
endif endif
@ -73,7 +73,7 @@ BEGIN_TEMPLATE
x(i) = x(j) x(i) = x(j)
iorder(i) = iorder(j) iorder(i) = iorder(j)
i = j i = j
j = ishft(j,1) j = shiftl(j,1)
else else
j = k+1 j = k+1
endif endif

View File

@ -1188,7 +1188,7 @@ END_PROVIDER
ddet = 0.d0 ddet = 0.d0
if (n_to_do < ishft(elec_alpha_num,1)) then if (n_to_do < shiftl(elec_alpha_num,1)) then
do while ( n_to_do > 0 ) do while ( n_to_do > 0 )
ddet = det_alpha_value_curr ddet = det_alpha_value_curr
@ -1297,7 +1297,7 @@ END_PROVIDER
enddo enddo
ddet = 0.d0 ddet = 0.d0
if (n_to_do < ishft(elec_beta_num,1)) then if (n_to_do < shiftl(elec_beta_num,1)) then
do while ( n_to_do > 0 ) do while ( n_to_do > 0 )
ddet = det_beta_value_curr ddet = det_beta_value_curr
@ -1509,7 +1509,7 @@ END_PROVIDER
DaC = 0.d0 DaC = 0.d0
CDb = 0.d0 CDb = 0.d0
if (det_num < ishft(det_alpha_num*det_beta_num,-2)) then if (det_num < shiftr(det_alpha_num*det_beta_num,2)) then
det_num4 = iand(det_num,not(3)) det_num4 = iand(det_num,not(3))
!DIR$ VECTOR ALIGNED !DIR$ VECTOR ALIGNED

View File

@ -718,8 +718,8 @@ subroutine sparse_full_mv(A,LDA, &
C5(j) = 0. C5(j) = 0.
enddo enddo
kmax2 = ishft(indices(0),-2) kmax2 = shiftr(indices(0),2)
kmax2 = ishft(kmax2,2) kmax2 = shiftl(kmax2,2)
kmax3 = indices(0) kmax3 = indices(0)
do kao=1,kmax2,4 do kao=1,kmax2,4

View File

@ -1,4 +1,4 @@
#!/usr/bin/python2 #!/usr/bin/env python2
import string import string
import os import os

View File

@ -352,8 +352,8 @@ subroutine list_to_bitstring( string, list, n_elements, Nint)
string = 0_8 string = 0_8
do i=1,n_elements do i=1,n_elements
iint = ishft(list(i)-1,-6) + 1 iint = shiftr(list(i)-1,6) + 1
ipos = list(i)-ishft((iint-1),6)-1 ipos = list(i)-shiftl((iint-1),6)-1
string(iint) = ibset( string(iint), ipos ) string(iint) = ibset( string(iint), ipos )
enddo enddo