Commit 1fe28a01 authored by Daniel Wortmann's avatar Daniel Wortmann

Updated broadcast of stars datatype

parent 930c4c10
......@@ -278,6 +278,8 @@
END IF
END IF
ALLOCATE (stars%igq_fft(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1))
ALLOCATE (stars%igq2_fft(0:stars%kq1_fft*stars%kq2_fft-1))
#ifdef CPP_MPI
CALL mpi_bc_all(&
& mpi,stars,sphhar,atoms,obsolete,&
......@@ -288,8 +290,6 @@
! Set up pointer for backtransformation from g-vector in positive
! domain of carge density fftibox into stars
ALLOCATE (stars%igq_fft(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1))
ALLOCATE (stars%igq2_fft(0:stars%kq1_fft*stars%kq2_fft-1))
CALL prp_qfft_map(stars,sym,input,stars%igq2_fft,stars%igq_fft)
atoms%nlotot = 0
......
......@@ -14,5 +14,7 @@ if (${FLEUR_USE_MPI})
mpi/mpi_reduce_potden.F90
mpi/mpi_make_groups.F90
mpi/mpi_dist_forcetheorem.F90
mpi/mpi_bc_tool.F90
)
endif()
......@@ -46,6 +46,8 @@ CONTAINS
#ifdef CPP_MPI
EXTERNAL MPI_BCAST
call priv_mpi_bc_stars(mpi,stars)
IF (mpi%irank.EQ.0) THEN
i(1)=1 ; i(2)=input%coretail_lmax;i(3)=atoms%ntype ; i(5)=1 ; i(6)=input%isec1
i(7)=stars%ng2 ; i(8)=stars%ng3 ; i(9)=vacuum%nmz ; i(10)=vacuum%nmzxy ; i(11)=obsolete%lepr
......@@ -134,7 +136,7 @@ CONTAINS
CALL MPI_BCAST (field%efield%C2,n,MPI_REAL,0,mpi%mpi_comm,ierr)
END IF
CALL MPI_BCAST(stars%ustep,stars%ng3,MPI_DOUBLE_COMPLEX,0,mpi%mpi_comm,ierr)
n = sphhar%memd*(sphhar%nlhd+1)*sphhar%ntypsd
CALL MPI_BCAST(sphhar%clnu,n,MPI_DOUBLE_COMPLEX,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(sphhar%mlh,n,MPI_INTEGER,0,mpi%mpi_comm,ierr)
......@@ -152,17 +154,14 @@ CONTAINS
CALL MPI_BCAST(sym%invsatnr,atoms%nat,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%ngopr,atoms%nat,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(sym%mrot,9*sym%nop,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%ig2,stars%ng3,MPI_INTEGER,0,mpi%mpi_comm,ierr)
n = (2*stars%mx1+1)*(2*stars%mx2+1)*(2*stars%mx3+1)
CALL MPI_BCAST(stars%ig,n,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%rgphs,n,MPI_DOUBLE_COMPLEX,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%ellow,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%elup,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%rkmax,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%rmt,atoms%ntype,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%volmts,atoms%ntype,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%dx,atoms%ntype,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%sk3,stars%ng3,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(enpara%evac0,2*dimension%jspd*1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(cell%amat,9,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(cell%bmat,9,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
......@@ -193,20 +192,8 @@ CONTAINS
CALL MPI_BCAST(sym%invarind,atoms%nat,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(sym%invtab,sym%nop,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(sym%invsatnr,atoms%nat,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%kq2_fft,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%kq3_fft,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%kv2,2*stars%ng2,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%kv3,3*stars%ng3,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%ng3_fft,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(vacuum%izlay,vacuum%layerd*2,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%nstr,stars%ng3,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%nstr2,stars%ng2,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%igfft,size(stars%igfft),MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%kq1_fft,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%kmxq_fft,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%pgfft,size(stars%pgfft),MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%igfft2,size(stars%igfft2),MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%zatom,atoms%ntype,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(field%efield%sig_b,2,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%zelec,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
......@@ -238,10 +225,8 @@ CONTAINS
n = 7*7*3*sym%nop
CALL MPI_BCAST(sym%d_wgn,n,MPI_DOUBLE_COMPLEX,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(oneD%nstr1,oneD%odd%n2d,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%sk2,stars%ng2,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(oneD%tau1,3*oneD%odd%nop,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
IF (oneD%odd%d1) THEN
CALL MPI_BCAST(stars%phi2,stars%ng2,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(oneD%tau1,3*oneD%odd%nop,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(oneD%mrot1,9*oneD%odd%nop,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(oneD%kv1,2*oneD%odd%n2d,MPI_INTEGER,0,mpi%mpi_comm,ierr)
......@@ -282,4 +267,50 @@ CONTAINS
RETURN
#endif
END SUBROUTINE mpi_bc_all
SUBROUTINE priv_mpi_bc_stars(mpi,stars)
USE m_types
USE m_mpi_bc_tool
IMPLICIT NONE
TYPE(t_mpi),INTENT(in)::mpi
TYPE(t_stars),INTENT(inout)::stars
include 'mpif.h'
INTEGER :: i(18),ierr,ft2_gf_dim
i(1)=stars%ng2 ; i(2)=stars%ng3 ; i(3)=stars%mx1 ; i(4)=stars%mx2 ; i(5)=stars%mx3
i(6) = stars%kimax ; i(7) = stars%kimax2 ; i(8)=size(stars%ft2_gfy)
i(9) = stars%kq1_fft;i(10) = stars%kq2_fft;i(11) = stars%kq3_fft;i(12)=stars%kmxq_fft
i(13)= stars%kxc1_fft;i(14)= stars%kxc2_fft;i(15)= stars%kxc3_fft
i(16)= stars%ng3_fft;i(17)= stars%kmxxc_fft;i(18)= stars%nxc3_fft
CALL MPI_BCAST(i,SIZE(i),MPI_INTEGER,0,mpi%mpi_comm,ierr)
stars%ng2=i(1) ; stars%ng3=i(2) ; stars%mx1=i(3) ; stars%mx2=i(4) ; stars%mx3=i(5)
stars%kimax=i(6) ; stars%kimax2=i(7) ; ft2_gf_dim=i(8)
stars%kq1_fft=i(9);stars%kq2_fft=i(10); stars%kq3_fft=i(11);stars%kmxq_fft=i(12)
stars%kxc1_fft=i(13);stars%kxc2_fft=i(14);stars%kxc3_fft=i(15)
stars%ng3_fft=i(16);stars%kmxxc_fft=i(17);stars%nxc3_fft=i(18)
CALL mpi_bc(stars%ustep,0,mpi%mpi_comm)
CALL mpi_bc(stars%ig2,0,mpi%mpi_comm)
CALL mpi_bc(stars%ig,0,mpi%mpi_comm)
CALL mpi_bc(stars%rgphs,0,mpi%mpi_comm)
CALL mpi_bc(stars%sk3,0,mpi%mpi_comm)
CALL mpi_bc(stars%kv2,0,mpi%mpi_comm)
CALL mpi_bc(stars%kv3,0,mpi%mpi_comm)
CALL mpi_bc(stars%nstr,0,mpi%mpi_comm)
CALL mpi_bc(stars%nstr2,0,mpi%mpi_comm)
CALL mpi_bc(stars%igfft,0,mpi%mpi_comm)
CALL mpi_bc(stars%pgfft,0,mpi%mpi_comm)
CALL mpi_bc(stars%igfft2,0,mpi%mpi_comm)
CALL mpi_bc(stars%sk2,0,mpi%mpi_comm)
CALL mpi_bc(stars%phi2,0,mpi%mpi_comm)
CALL mpi_bc(stars%ufft,0,mpi%mpi_comm)
CALL mpi_bc(stars%igq2_fft,0,mpi%mpi_comm)
CALL mpi_bc(stars%igq_fft,0,mpi%mpi_comm)
CALL mpi_bc(stars%pgfft2,0,mpi%mpi_comm)
CALL mpi_bc(stars%ft2_gfx,0,mpi%mpi_comm)
CALL mpi_bc(stars%ft2_gfy,0,mpi%mpi_comm)
END SUBROUTINE priv_mpi_bc_stars
END MODULE m_mpi_bc_all
This diff is collapsed.
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