things from the tower

parent 72cf92d2
......@@ -132,7 +132,11 @@ CONTAINS
END DO
END DO
CALL timestop("Calculation of non-local HF potential")
#ifdef CPP_MPI
call timestart("Hybrid imbalance")
call MPI_Barrier(mpi%mpi_comm, err)
call timestop("Hybrid imbalance")
#endif
CALL timestop("hybrid code")
CONTAINS
subroutine first_iteration_alloc(fi, hybdat)
......
......@@ -228,7 +228,7 @@ CONTAINS
IF (mat_ex%l_real) THEN
CALL wavefproducts_inv(ibando, ibando + psize - 1, input, jsp, atoms, &
lapw, kpts, ik, iq, hybdat, mpdata, hybinp, cell, sym, &
lapw, kpts, mpi, ik, iq, hybdat, mpdata, hybinp, cell, sym, &
noco,nococonv, oneD, nkqpt, cprod_vv_r)
ELSE
CALL wavefproducts_noinv(ibando, ibando + psize - 1, ik, iq, input, jsp, &
......
......@@ -14,7 +14,7 @@ module m_wavefproducts_inv
CONTAINS
SUBROUTINE wavefproducts_inv(bandoi, bandof, input,&
jsp, atoms, lapw, kpts, nk, iq, hybdat, mpdata, hybinp,&
jsp, atoms, lapw, kpts, mpi, nk, iq, hybdat, mpdata, hybinp,&
cell, sym, noco, nococonv, oneD, nkqpt, cprod)
......@@ -29,6 +29,7 @@ CONTAINS
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_mpi), intent(in) :: mpi
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_lapw), INTENT(IN) :: lapw
TYPE(t_hybdat), INTENT(INOUT) :: hybdat
......@@ -65,7 +66,7 @@ CONTAINS
call wavefproducts_inv_IS(bandoi, bandof, input,&
jsp, atoms, lapw, kpts, nk, iq, g_t, hybdat, mpdata, hybinp,&
jsp, atoms, lapw, kpts, mpi, nk, iq, g_t, hybdat, mpdata, hybinp,&
cell, sym, noco,nococonv, nkqpt, z_k_p, c_phase_k, z_kqpt_p, c_phase_kqpt, cprod)
call wavefproducts_inv_MT(bandoi, bandof,&
......@@ -77,7 +78,7 @@ CONTAINS
END SUBROUTINE wavefproducts_inv
subroutine wavefproducts_inv_IS(bandoi, bandof, input,&
jsp, atoms, lapw, kpts, nk, iq, g_t, hybdat, mpdata, hybinp,&
jsp, atoms, lapw, kpts, mpi, nk, iq, g_t, hybdat, mpdata, hybinp,&
cell, sym, noco,nococonv, nkqpt, z_k_p, c_phase_k, z_kqpt_p, c_phase_kqpt, cprod)
implicit NONE
......@@ -91,6 +92,7 @@ CONTAINS
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_lapw), INTENT(IN) :: lapw
TYPE(t_mpi), intent(in) :: mpi
TYPE(t_hybdat), INTENT(INOUT) :: hybdat
TYPE(t_mat), intent(inout) :: z_k_p, z_kqpt_p
! - scalars -
......@@ -104,7 +106,7 @@ CONTAINS
! - local scalars -
INTEGER :: ic, ig, ig2, ig1, ok, igptm, iigptm
INTEGER :: ngpt0, n1, n2, nbasfcn
INTEGER :: ngpt0, n1, n2, nbasfcn, ierr
REAL :: rdum, rdum1
TYPE(t_lapw) :: lapw_nkqpt
type(t_mat) :: z_k, z_kqpt
......@@ -139,6 +141,7 @@ CONTAINS
c_phase=c_phase_k, parent_z=z_k_p)
call read_z(atoms, cell, hybdat, kpts, sym, noco, nococonv, input, nkqpt, jsp, z_kqpt, &
c_phase=c_phase_kqpt, parent_z=z_kqpt_p)
call MPI_Barrier(mpi%mpi_comm, ierr)
g = maxval(abs(lapw%gvec(:, :lapw%nv(jsp), jsp)), dim=2) &
+ maxval(abs(lapw_nkqpt%gvec(:, :lapw_nkqpt%nv(jsp), jsp)), dim=2)&
......
......@@ -213,23 +213,41 @@ CONTAINS
if (zmat%l_real) THEN
if (.not.d%l_real) THEN
call timestart("MPI_WIN_LOCK")
CALL MPI_WIN_LOCK(MPI_LOCK_SHARED,pe,0,d%zc_handle,e)
call timestop("MPI_WIN_LOCK")
call timestart("MPI_GET")
CALL MPI_GET(tmp_cmplx,tmp_size,MPI_DOUBLE_COMPLEX,pe,slot,tmp_size,MPI_DOUBLE_COMPLEX,d%zc_handle,e)
call timestop("MPI_GET")
call timestart("MPI_WIN_UNLOCK")
CALL MPI_WIN_UNLOCK(pe,d%zc_handle,e)
call timestop("MPI_WIN_UNLOCK")
!print *, nk,jspin,n1,"r PE:",pe," Slot: ",slot," Size:",tmp_size,tmp_cmplx(1)
zmat%data_r(:,n)=REAL(tmp_cmplx)
else
call timestart("MPI_WIN_LOCK")
CALL MPI_WIN_LOCK(MPI_LOCK_SHARED,pe,0,d%zr_handle,e)
call timestop("MPI_WIN_LOCK")
call timestart("MPI_GET")
CALL MPI_GET(tmp_real,tmp_size,MPI_DOUBLE_PRECISION,pe,slot,tmp_size,MPI_DOUBLE_PRECISION,d%zr_handle,e)
call timestop("MPI_GET")
call timestart("MPI_WIN_UNLOCK")
CALL MPI_WIN_UNLOCK(pe,d%zr_handle,e)
call timestop("MPI_WIN_UNLOCK")
!print *, nk,jspin,n1,"r PE:",pe," Slot: ",slot," Size:",tmp_size,tmp_real(1)
zmat%data_r(:,n)=tmp_real
endif
ELSE
if (d%l_real) call judft_error("Could not read complex data, only real data is stored",calledby="eig66_mpi%read_eig")
call timestart("MPI_WIN_LOCK")
CALL MPI_WIN_LOCK(MPI_LOCK_SHARED,pe,0,d%zc_handle,e)
call timestop("MPI_WIN_LOCK")
call timestart("MPI_GET")
CALL MPI_GET(tmp_cmplx,tmp_size,MPI_DOUBLE_COMPLEX,pe,slot,tmp_size,MPI_DOUBLE_COMPLEX,d%zc_handle,e)
call timestop("MPI_GET")
call timestart("MPI_WIN_UNLOCK")
CALL MPI_WIN_UNLOCK(pe,d%zc_handle,e)
call timestop("MPI_WIN_UNLOCK")
!print *, nk,jspin,n1,"r PE:",pe," Slot: ",slot," Size:",tmp_size,tmp_cmplx(1)
zmat%data_c(:,n)=tmp_cmplx
ENDIF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment