10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 20:35:19 +01:00

Fixed read wf

This commit is contained in:
Anthony Scemama 2017-11-29 12:17:01 +01:00
parent 3ac2e2d8c3
commit f7831c033a
2 changed files with 12 additions and 3 deletions

View File

@ -138,6 +138,7 @@ BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,psi_det_size) ]
if (exists) then
call read_dets(psi_det,N_int,N_det)
print *, 'Read psi_det'
else
psi_det = 0_bit_kind
do i=1,N_int
@ -152,7 +153,6 @@ BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,psi_det_size) ]
psi_det(i,2,1) = HF_bitmask(i,2)
enddo
endif
print *, 'Read psi_det'
endif
IRP_IF MPI
include 'mpif.h'

View File

@ -175,11 +175,20 @@ subroutine zmq_get_psi(zmq_to_qp_run_socket, worker_id)
call zmq_get_N_states(zmq_to_qp_run_socket, worker_id)
call zmq_get_N_det(zmq_to_qp_run_socket, worker_id)
call zmq_get_psi_det_size(zmq_to_qp_run_socket, worker_id)
TOUCH psi_det_size N_det N_states
if (size(psi_det) /= N_int*2_8*psi_det_size*bit_kind) then
deallocate(psi_det)
allocate(psi_det(N_int,2,psi_det_size))
endif
if (size(psi_coef) /= psi_det_size*N_states) then
deallocate(psi_coef)
allocate(psi_coef(psi_det_size,N_states))
endif
call zmq_get_psi_det(zmq_to_qp_run_socket, worker_id)
call zmq_get_psi_coef(zmq_to_qp_run_socket, worker_id)
SOFT_TOUCH psi_det psi_coef
SOFT_TOUCH psi_det psi_coef psi_det_size N_det N_states
end