diff --git a/install/build.ninja b/install/build.ninja index ecca938..fb73ea2 100644 --- a/install/build.ninja +++ b/install/build.ninja @@ -4,14 +4,11 @@ ###### URL_OPAM ="https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh" -URL_IRPF90="https://github.com/scemama/irpf90/archive/v1.6.7.tar.gz" -URL_EZFIO ="https://gitlab.com/scemama/EZFIO/-/archive/v1.3.3/EZFIO-v1.3.3.tar.gz" -#URL_IRPF90="https://github.com/scemama/irpf90/archive/v1.7.2.tar.gz" +URL_IRPF90="https://github.com/scemama/irpf90/archive/v1.7.2.tar.gz" +URL_EZFIO ="https://github.com/scemama/EZFIO/archive/v1.3.2.tar.gz" -URL_ZMQ ="http://download.zeromq.org/zeromq-4.1.4.tar.gz" -URL_F77ZMQ="https://github.com/scemama/f77_zmq/archive/4.1.4.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" +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" # Rules ####### @@ -52,7 +49,6 @@ build _build/irpf90.ok ../bin/irpman ../bin/irpf90: install | Downloads/irpf90.t target = 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.4 ../lib/libzmq.so ../lib/zmq.h ../lib/zmq_utils.h: install | Downloads/zmq.tar.gz target = zmq descr = ZeroMQ diff --git a/install/scripts/install_f77_zmq.sh b/install/scripts/install_f77_zmq.sh index cff0c7b..d859a6c 100755 --- a/install/scripts/install_f77_zmq.sh +++ b/install/scripts/install_f77_zmq.sh @@ -15,8 +15,7 @@ function _install() cd - 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}"/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 } diff --git a/install/scripts/install_zmq.sh b/install/scripts/install_zmq.sh index e2fab9c..be26568 100755 --- a/install/scripts/install_zmq.sh +++ b/install/scripts/install_zmq.sh @@ -10,20 +10,11 @@ function _install() set -e set -u cd "${BUILD}" - ./autogen.sh - ./configure --without-libsodium --prefix=${QMCCHEM_PATH} --disable-libunwind + rm -f -- "${QMCCHEM_PATH}"/lib/libzmq.{a,so,so.$LIBVERSION} + ./configure --without-libsodium --enable-libunwind=no --prefix="${QMCCHEM_PATH}" make -j 8 make install 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 } diff --git a/ocaml/.merlin b/ocaml/.merlin index ddf2226..5f0f9d7 100644 --- a/ocaml/.merlin +++ b/ocaml/.merlin @@ -1,3 +1,3 @@ -PKG core cryptokit str ZMQ +PKG core cryptokit str zmq S . diff --git a/ocaml/Qmcchem_config.ml b/ocaml/Qmcchem_config.ml index d9f302d..3a82387 100644 --- a/ocaml/Qmcchem_config.ml +++ b/ocaml/Qmcchem_config.ml @@ -83,7 +83,7 @@ let hostname = lazy ( try Unix.gethostname () with - | _ -> "localhost" + | _ -> "127.0.0.1" ) diff --git a/ocaml/Qmcchem_run.ml b/ocaml/Qmcchem_run.ml index 7c66abb..574f42c 100644 --- a/ocaml/Qmcchem_run.ml +++ b/ocaml/Qmcchem_run.ml @@ -35,7 +35,7 @@ let full_run ?(start_dataserver=true) ezfio_filename = if (start_dataserver) then begin (* 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 *) diff --git a/src/SAMPLING/pdmc_step.irp.f b/src/SAMPLING/pdmc_step.irp.f index 740730c..af9b09f 100644 --- a/src/SAMPLING/pdmc_step.irp.f +++ b/src/SAMPLING/pdmc_step.irp.f @@ -10,7 +10,7 @@ t = """ &BEGIN_PROVIDER [ $T, $X_2_pdmc_block_walk_kahan $D2 ] implicit none 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 $X_pdmc_block_walk = 0.d0 $X_pdmc_block_walk_kahan = 0.d0 @@ -32,9 +32,9 @@ END_SHELL - 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_pdmc_block_walk_kahan, (3) ] + 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_pdmc_block_walk_kahan , (3) ] &BEGIN_PROVIDER [ double precision, E_loc_2_pdmc_block_walk_kahan, (3) ] implicit none include '../types.F' diff --git a/src/SAMPLING/reconfigure.irp.f b/src/SAMPLING/reconfigure.irp.f index 6c92502..84cb4a7 100644 --- a/src/SAMPLING/reconfigure.irp.f +++ b/src/SAMPLING/reconfigure.irp.f @@ -11,7 +11,6 @@ subroutine reconfigure(ipos,w) tmp = 0.d0 do k=1,walk_num - ipos(k) = k tmp = tmp + w(k) enddo dwalk_num = dble(walk_num)/tmp diff --git a/src/SAMPLING/srmc_step.irp.f b/src/SAMPLING/srmc_step.irp.f index 02441fe..79690f7 100644 --- a/src/SAMPLING/srmc_step.irp.f +++ b/src/SAMPLING/srmc_step.irp.f @@ -297,6 +297,10 @@ END_SHELL ! Reconfiguration 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) do k=1,walk_num diff --git a/src/SAMPLING/vmc_step.irp.f b/src/SAMPLING/vmc_step.irp.f index f1c6f23..16ee78c 100644 --- a/src/SAMPLING/vmc_step.irp.f +++ b/src/SAMPLING/vmc_step.irp.f @@ -152,7 +152,6 @@ END_SHELL double precision :: factor factor = 1.d0/block_weight - SOFT_TOUCH block_weight BEGIN_SHELL [ /usr/bin/env python2 ] from properties import * t = """ @@ -165,7 +164,7 @@ for p in properties: print t.replace("$X",p[1]) END_SHELL - SOFT_TOUCH elec_coord_full + SOFT_TOUCH elec_coord_full block_weight END_PROVIDER diff --git a/src/TOOLS/random.irp.f b/src/TOOLS/random.irp.f index 65bed3e..aa99839 100644 --- a/src/TOOLS/random.irp.f +++ b/src/TOOLS/random.irp.f @@ -3,24 +3,24 @@ double precision function qmc_ranf() ! generators', Math. of Comput., 68, 261-269. implicit none integer*8 :: b(2) - b(1) = ISHFT( IEOR( ISHFT(seed(1),1), seed(1)), -53) - b(2) = ISHFT( IAND(seed(1),-2_8), 10) + b(1) = SHIFTR( IEOR( ISHFT(seed(1),1), seed(1)), 53) + b(2) = SHIFTL( IAND(seed(1),-2_8), 10) seed(1) = IEOR( b(2), b(1)) - b(1) = ISHFT( IEOR( ISHFT(seed(2),24), seed(2)), -50) - b(2) = ISHFT( IAND(seed(2),-512_8), 5) + b(1) = SHIFTR( IEOR( ISHFT(seed(2),24), seed(2)), 50) + b(2) = SHIFTL( IAND(seed(2),-512_8), 5) seed(2) = IEOR( b(2), b(1)) - b(1) = ISHFT( IEOR( ISHFT(seed(3),3), seed(3)), -23) - b(2) = ISHFT( IAND(seed(3),-4096_8), 29) + b(1) = SHIFTR( IEOR( ISHFT(seed(3),3), seed(3)), 23) + b(2) = SHIFTL( IAND(seed(3),-4096_8), 29) seed(3) = IEOR( b(2), b(1)) - b(1) = ISHFT( IEOR( ISHFT(seed(4),5), seed(4)), -24) - b(2) = ISHFT( IAND(seed(4),-131072_8), 23) + b(1) = SHIFTR( IEOR( ISHFT(seed(4),5), seed(4)), 24) + b(2) = SHIFTL( IAND(seed(4),-131072_8), 23) seed(4) = IEOR( b(2), b(1)) - b(1) = ISHFT( IEOR( ISHFT(seed(5),3), seed(5)), -33) - b(2) = ISHFT( IAND(seed(5),-8388608_8), 8) + b(1) = SHIFTR( IEOR( ISHFT(seed(5),3), seed(5)), 33) + b(2) = SHIFTL( IAND(seed(5),-8388608_8), 8) seed(5) = IEOR( b(2), b(1)) 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 integer*8 :: pid8 read(current_PID,*) pid8 - pid8 = iand( ishft(pid8, 32), pid8) + pid8 = iand( shiftl(pid8, 32), pid8) do i=1,12 clock(i) = i enddo @@ -65,7 +65,7 @@ BEGIN_PROVIDER [ integer*8, seed, (5) ] seed(i) = (r-0.5d0)*huge(1_8) seed(i) = ieor( seed(i), pid8) do j=1,16 - seed(i) = ishft(seed(i),1)+1 + seed(i) = shiftl(seed(i),1)+1 enddo enddo diff --git a/src/TOOLS/sort.irp.f b/src/TOOLS/sort.irp.f index eb6ccc7..05e52c7 100644 --- a/src/TOOLS/sort.irp.f +++ b/src/TOOLS/sort.irp.f @@ -54,7 +54,7 @@ BEGIN_TEMPLATE endif endif i=l - j = ishft(l,1) + j = shiftl(l,1) do while (j 0 ) ddet = det_alpha_value_curr @@ -1297,7 +1297,7 @@ END_PROVIDER enddo 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 ) ddet = det_beta_value_curr @@ -1509,7 +1509,7 @@ END_PROVIDER DaC = 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)) !DIR$ VECTOR ALIGNED diff --git a/src/mo.irp.f b/src/mo.irp.f index 4b9bba7..ffd87c1 100644 --- a/src/mo.irp.f +++ b/src/mo.irp.f @@ -718,8 +718,8 @@ subroutine sparse_full_mv(A,LDA, & C5(j) = 0. enddo - kmax2 = ishft(indices(0),-2) - kmax2 = ishft(kmax2,2) + kmax2 = shiftr(indices(0),2) + kmax2 = shiftl(kmax2,2) kmax3 = indices(0) do kao=1,kmax2,4 diff --git a/src/properties.py b/src/properties.py index fa0d4fa..0f02810 100755 --- a/src/properties.py +++ b/src/properties.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/env python2 import string import os diff --git a/src/wf.irp.f b/src/wf.irp.f index 5e117f5..86c1b64 100644 --- a/src/wf.irp.f +++ b/src/wf.irp.f @@ -352,8 +352,8 @@ subroutine list_to_bitstring( string, list, n_elements, Nint) string = 0_8 do i=1,n_elements - iint = ishft(list(i)-1,-6) + 1 - ipos = list(i)-ishft((iint-1),6)-1 + iint = shiftr(list(i)-1,6) + 1 + ipos = list(i)-shiftl((iint-1),6)-1 string(iint) = ibset( string(iint), ipos ) enddo