mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 12:23:48 +01:00
Forgot file
This commit is contained in:
parent
e837d7d2ad
commit
7bb866e8ad
10
plugins/mrcepa0/dress_types.f90
Normal file
10
plugins/mrcepa0/dress_types.f90
Normal file
@ -0,0 +1,10 @@
|
||||
module dress_types
|
||||
type dress_buffer
|
||||
double precision, pointer :: buf(:,:,:), buf0(:,:), coef(:)
|
||||
double precision :: N
|
||||
integer, pointer :: det_to_buf(:), buf_to_det(:)
|
||||
integer :: free_under, pos, N_slot
|
||||
logical :: full
|
||||
endtype
|
||||
end module
|
||||
|
@ -4,6 +4,14 @@ BEGIN_PROVIDER [ integer, fragment_first ]
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer, mrcc_stoch_istate ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! State considered
|
||||
END_DOC
|
||||
mrcc_stoch_istate = 1
|
||||
END_PROVIDER
|
||||
|
||||
subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
use dress_types
|
||||
use f77_zmq
|
||||
@ -14,7 +22,7 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
|
||||
integer(ZMQ_PTR) :: zmq_to_qp_run_socket, zmq_socket_pull
|
||||
integer, external :: omp_get_thread_num
|
||||
double precision, intent(in) :: relative_error, E
|
||||
double precision, intent(in) :: relative_error, E(N_states)
|
||||
double precision, intent(out) :: mrcc(N_states)
|
||||
double precision, intent(out) :: delta(N_states, N_det_non_ref)
|
||||
double precision, intent(out) :: delta_s2(N_states, N_det_non_ref)
|
||||
@ -67,6 +75,7 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
! end do
|
||||
|
||||
integer(ZMQ_PTR), external :: new_zmq_to_qp_run_socket
|
||||
integer, external :: add_task_to_taskserver, zmq_set_running
|
||||
integer :: ipos
|
||||
ipos=1
|
||||
do i=1,N_mrcc_jobs
|
||||
@ -152,7 +161,6 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
integer(ZMQ_PTR) :: zmq_to_qp_run_socket
|
||||
|
||||
integer(ZMQ_PTR), external :: new_zmq_pull_socket
|
||||
integer(ZMQ_PTR) :: zmq_socket_pull
|
||||
|
||||
integer :: more
|
||||
integer :: i, j, k, i_state, N, ntask
|
||||
@ -191,7 +199,6 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
actually_computed = .false.
|
||||
|
||||
zmq_to_qp_run_socket = new_zmq_to_qp_run_socket()
|
||||
zmq_socket_pull = new_zmq_pull_socket()
|
||||
allocate(task_id(N_det_generators), ind(1))
|
||||
more = 1
|
||||
if (time0 < 0.d0) then
|
||||
@ -340,7 +347,6 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
|
||||
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
|
||||
|
||||
call end_zmq_pull_socket(zmq_socket_pull)
|
||||
end subroutine
|
||||
|
||||
|
||||
|
@ -195,12 +195,12 @@ BEGIN_PROVIDER [ double precision, psi_coef, (psi_det_size,N_states) ]
|
||||
exists = (label == mo_label)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if (exists) then
|
||||
|
||||
double precision, allocatable :: psi_coef_read(:,:)
|
||||
allocate (psi_coef_read(N_det,N_states))
|
||||
print *, 'Read psi_coef', N_det, N_states
|
||||
call ezfio_get_determinants_psi_coef(psi_coef_read)
|
||||
do k=1,N_states
|
||||
do i=1,N_det
|
||||
@ -208,14 +208,14 @@ BEGIN_PROVIDER [ double precision, psi_coef, (psi_det_size,N_states) ]
|
||||
enddo
|
||||
enddo
|
||||
deallocate(psi_coef_read)
|
||||
print *, 'Read psi_coef'
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
IRP_IF MPI
|
||||
include 'mpif.h'
|
||||
integer :: ierr
|
||||
call MPI_BCAST( psi_coef, N_states*psi_det_size, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
|
||||
call MPI_BCAST( psi_coef, size(psi_coef), MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
|
||||
if (ierr /= MPI_SUCCESS) then
|
||||
stop 'Unable to read psi_coef with MPI'
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user