mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
Working on MPI
This commit is contained in:
parent
ce35cfe2bb
commit
7bb54e2a43
@ -13,7 +13,8 @@ addons:
|
||||
packages:
|
||||
- gfortran
|
||||
- gcc
|
||||
- liblapack-dev
|
||||
# - liblapack-dev
|
||||
- libatlas-dev
|
||||
- graphviz
|
||||
# - zlib1g-dev
|
||||
# - libgmp3-dev
|
||||
|
@ -10,6 +10,7 @@ type t =
|
||||
|Na|Mg |Al|Si|P |S |Cl|Ar
|
||||
|K |Ca|Sc|Ti|V |Cr|Mn|Fe|Co|Ni|Cu|Zn|Ga|Ge|As|Se|Br|Kr
|
||||
|Rb|Sr|Y |Zr|Nb|Mo|Tc|Ru|Rh|Pd|Ag|Cd|In|Sn|Sb|Te|I |Xe
|
||||
|Pt
|
||||
with sexp
|
||||
|
||||
let of_string x =
|
||||
|
@ -54,9 +54,7 @@ subroutine run_wf
|
||||
if (is_mpi_master) then
|
||||
call zmq_get_psi(zmq_to_qp_run_socket,1,energy,N_states)
|
||||
endif
|
||||
IRP_IF MIP
|
||||
call MPI_BCAST(n,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr)
|
||||
IRP_ENDIF
|
||||
call mpi_bcast_psi()
|
||||
|
||||
!$OMP PARALLEL PRIVATE(i)
|
||||
i = omp_get_thread_num()
|
||||
@ -70,7 +68,10 @@ subroutine run_wf
|
||||
! --------
|
||||
|
||||
print *, 'Davidson'
|
||||
call zmq_get_psi(zmq_to_qp_run_socket,1,energy,N_states)
|
||||
if (is_mpi_master) then
|
||||
call zmq_get_psi(zmq_to_qp_run_socket,1,energy,N_states)
|
||||
endif
|
||||
call mpi_bcast_psi()
|
||||
call omp_set_nested(.True.)
|
||||
call davidson_slave_tcp(0)
|
||||
call omp_set_nested(.False.)
|
||||
@ -82,7 +83,10 @@ subroutine run_wf
|
||||
! ---
|
||||
|
||||
print *, 'PT2'
|
||||
call zmq_get_psi(zmq_to_qp_run_socket,1,energy,N_states)
|
||||
if (is_mpi_master) then
|
||||
call zmq_get_psi(zmq_to_qp_run_socket,1,energy,N_states)
|
||||
endif
|
||||
call mpi_bcast_psi()
|
||||
|
||||
logical :: lstop
|
||||
lstop = .False.
|
||||
|
@ -1 +1 @@
|
||||
|
||||
Bitmask
|
||||
|
@ -2,7 +2,7 @@ subroutine mpi_bcast_psi()
|
||||
use f77_zmq
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Put the wave function on the qp_run scheduler
|
||||
! Broadcast the wave function coming from the qp_run scheduler
|
||||
END_DOC
|
||||
integer(ZMQ_PTR), intent(in) :: zmq_to_qp_run_socket
|
||||
integer, intent(in) :: worker_id
|
||||
@ -18,29 +18,7 @@ subroutine mpi_bcast_psi()
|
||||
|
||||
call MPI_BCast(psi_det, N_det, MPI_INTEGER8, 0, MPI_COMM_WORLD, ierr)
|
||||
call MPI_BCast(psi_coef, psi_det_size, MPI_DOUBLE_PRECISION* N_states, 0, MPI_COMM_WORLD, ierr)
|
||||
|
||||
|
||||
rc8 = f77_zmq_recv8(zmq_to_qp_run_socket,psi_coef,int(psi_det_size*N_states*8_8,8),0)
|
||||
if (rc8 /= psi_det_size*N_states*8_8) then
|
||||
print *, '77_zmq_recv8(zmq_to_qp_run_socket,psi_coef,psi_det_size*N_states*8,ZMQ_SNDMORE)'
|
||||
stop 'error'
|
||||
endif
|
||||
TOUCH psi_det psi_coef
|
||||
|
||||
rc = f77_zmq_recv(zmq_to_qp_run_socket,energy,size_energy*8,0)
|
||||
if (rc /= size_energy*8) then
|
||||
print *, '77_zmq_recv(zmq_to_qp_run_socket,energy,size_energy*8,0)'
|
||||
stop 'error'
|
||||
endif
|
||||
|
||||
if (N_det_generators_read > 0) then
|
||||
N_det_generators = N_det_generators_read
|
||||
TOUCH N_det_generators
|
||||
endif
|
||||
if (N_det_selectors_read > 0) then
|
||||
N_det_selectors = N_det_selectors_read
|
||||
TOUCH N_det_selectors
|
||||
endif
|
||||
IRP_ENDIF
|
||||
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user