Commit 637b12ee authored by Gregor Michalicek's avatar Gregor Michalicek

Some minor bugfixes for MPI + xc changes and MPI + SOC scaling

parent e187695e
...@@ -66,7 +66,8 @@ SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,& ...@@ -66,7 +66,8 @@ SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,&
REAL :: sumWeight, rmtmax, zp, radius, dr REAL :: sumWeight, rmtmax, zp, radius, dr
REAL :: kmax1, dtild1, dvac1 REAL :: kmax1, dtild1, dvac1
REAL :: bk(3) REAL :: bk(3)
LOGICAL :: l_vca, l_test,l_gga LOGICAL :: l_vca, l_test,l_gga, l_krla
CHARACTER(len=4) :: namex
INTEGER, ALLOCATABLE :: lmx1(:), nq1(:), nlhtp1(:) INTEGER, ALLOCATABLE :: lmx1(:), nq1(:), nlhtp1(:)
INTEGER, ALLOCATABLE :: jri1(:), lmax1(:) INTEGER, ALLOCATABLE :: jri1(:), lmax1(:)
...@@ -558,20 +559,31 @@ SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,& ...@@ -558,20 +559,31 @@ SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,&
CALL prp_xcfft(stars,input,cell,xcpot) CALL prp_xcfft(stars,input,cell,xcpot)
namex = xcpot%get_name()
l_krla = xcpot%krla.EQ.1
END IF !(mpi%irank.EQ.0) END IF !(mpi%irank.EQ.0)
#ifdef CPP_MPI #ifdef CPP_MPI
CALL MPI_BCAST(namex,4,MPI_CHARACTER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(l_krla,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(sliceplot%iplot,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr) CALL MPI_BCAST(sliceplot%iplot,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
#endif #endif
IF (mpi%irank.NE.0) THEN
CALL xcpot%init(namex,l_krla)
END IF
IF (.NOT.sliceplot%iplot) THEN IF (.NOT.sliceplot%iplot) THEN
CALL stepf(sym,stars,atoms,oneD,input,cell,vacuum,mpi) CALL stepf(sym,stars,atoms,oneD,input,cell,vacuum,mpi)
IF (mpi%irank.EQ.0) THEN IF (mpi%irank.EQ.0) THEN
CALL convn(DIMENSION,atoms,stars) CALL convn(DIMENSION,atoms,stars)
CALL efield(atoms,DIMENSION,stars,sym,vacuum,cell,input) CALL efield(atoms,DIMENSION,stars,sym,vacuum,cell,input)
END IF !(mpi%irank.EQ.0) END IF !(mpi%irank.EQ.0)
END IF END IF
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! End of input postprocessing (calculate missing parameters) !!! End of input postprocessing (calculate missing parameters)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
CHARACTER(LEN=20) :: filename CHARACTER(LEN=20) :: filename
REAL :: a1(3),a2(3),a3(3) REAL :: a1(3),a2(3),a3(3)
REAL :: scale, dtild, phi_add REAL :: scale, dtild, phi_add
LOGICAL :: l_found, l_kpts, l_exist LOGICAL :: l_found, l_kpts, l_exist, l_krla
#ifdef CPP_MPI #ifdef CPP_MPI
INCLUDE 'mpif.h' INCLUDE 'mpif.h'
...@@ -298,23 +298,20 @@ ...@@ -298,23 +298,20 @@
!+t3e !+t3e
IF (mpi%irank.EQ.0) THEN IF (mpi%irank.EQ.0) THEN
!-t3e !-t3e
CALL inped( & CALL inped(atoms,obsolete,vacuum,&
& atoms,obsolete,vacuum,& input,banddos,xcpot,sym,&
& input,banddos,xcpot,sym,& cell,sliceplot,noco,&
& cell,sliceplot,noco,& stars,oneD,jij,hybrid,kpts,scale,a1,a2,a3,namex,relcor)
& stars,oneD,jij,hybrid,kpts,scale,a1,a2,a3,namex,relcor)
! !
IF (xcpot%is_gga()) THEN IF (xcpot%is_gga()) THEN
ALLOCATE (stars%ft2_gfx(0:DIMENSION%nn2d-1),stars%ft2_gfy(0:DIMENSION%nn2d-1)) ALLOCATE (stars%ft2_gfx(0:DIMENSION%nn2d-1),stars%ft2_gfy(0:DIMENSION%nn2d-1))
!-odim
ALLOCATE (oneD%pgft1x(0:oneD%odd%nn2d-1),oneD%pgft1xx(0:oneD%odd%nn2d-1),& ALLOCATE (oneD%pgft1x(0:oneD%odd%nn2d-1),oneD%pgft1xx(0:oneD%odd%nn2d-1),&
& oneD%pgft1xy(0:oneD%odd%nn2d-1),& oneD%pgft1xy(0:oneD%odd%nn2d-1),&
& oneD%pgft1y(0:oneD%odd%nn2d-1),oneD%pgft1yy(0:oneD%odd%nn2d-1)) oneD%pgft1y(0:oneD%odd%nn2d-1),oneD%pgft1yy(0:oneD%odd%nn2d-1))
ELSE ELSE
ALLOCATE (stars%ft2_gfx(0:1),stars%ft2_gfy(0:1)) ALLOCATE (stars%ft2_gfx(0:1),stars%ft2_gfy(0:1))
!-odim
ALLOCATE (oneD%pgft1x(0:1),oneD%pgft1xx(0:1),oneD%pgft1xy(0:1),& ALLOCATE (oneD%pgft1x(0:1),oneD%pgft1xx(0:1),oneD%pgft1xy(0:1),&
& oneD%pgft1y(0:1),oneD%pgft1yy(0:1)) oneD%pgft1y(0:1),oneD%pgft1yy(0:1))
ENDIF ENDIF
oneD%odd%nq2 = oneD%odd%n2d oneD%odd%nq2 = oneD%odd%n2d
oneD%odi%nq2 = oneD%odd%nq2 oneD%odi%nq2 = oneD%odd%nq2
...@@ -326,12 +323,24 @@ ...@@ -326,12 +323,24 @@
IF ((sliceplot%iplot).OR.(input%strho).OR.(input%swsp).OR.& IF ((sliceplot%iplot).OR.(input%strho).OR.(input%swsp).OR.&
& (input%lflip).OR.(obsolete%l_f2u).OR.(obsolete%l_u2f).OR.(input%l_bmt)) l_opti = .TRUE. & (input%lflip).OR.(obsolete%l_f2u).OR.(obsolete%l_u2f).OR.(input%l_bmt)) l_opti = .TRUE.
! !
namex=xcpot%get_name()
l_krla = xcpot%krla.EQ.1
END IF ! mpi%irank.eq.0 END IF ! mpi%irank.eq.0
CALL setup(&
& mpi,atoms,kpts,DIMENSION,sphhar,& #ifdef CPP_MPI
& obsolete,sym,stars,oneD,input,noco,& CALL MPI_BCAST(namex,4,MPI_CHARACTER,0,mpi%mpi_comm,ierr)
& vacuum,cell,xcpot,& CALL MPI_BCAST(l_krla,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
& sliceplot,enpara,l_opti) #endif
IF (mpi%irank.NE.0) THEN
CALL xcpot%init(namex,l_krla)
END IF
CALL setup(mpi,atoms,kpts,DIMENSION,sphhar,&
obsolete,sym,stars,oneD,input,noco,&
vacuum,cell,xcpot,&
sliceplot,enpara,l_opti)
IF (mpi%irank.EQ.0) THEN IF (mpi%irank.EQ.0) THEN
! !
stars%ng3=stars%ng3 ; stars%ng2=stars%ng2 stars%ng3=stars%ng3 ; stars%ng2=stars%ng2
......
...@@ -42,7 +42,6 @@ CONTAINS ...@@ -42,7 +42,6 @@ CONTAINS
INTEGER i(39),ierr(3) INTEGER i(39),ierr(3)
REAL r(30) REAL r(30)
LOGICAL l(43) LOGICAL l(43)
CHARACTER(len=4)::namex
! .. ! ..
! .. External Subroutines.. ! .. External Subroutines..
#ifdef CPP_MPI #ifdef CPP_MPI
...@@ -268,16 +267,12 @@ CONTAINS ...@@ -268,16 +267,12 @@ CONTAINS
END IF END IF
!--- HF> !--- HF>
IF (mpi%irank==0) THEN
namex=xcpot%get_name()
ENDIF
CALL MPI_BCAST(namex,4,MPI_CHARACTER,0,mpi%mpi_comm,ierr)
IF (mpi%irank>0) THEN IF (mpi%irank>0) THEN
call xcpot%init(namex,i(4)==1) ALLOCATE(xcpot%lda_atom(atoms%ntype))
allocate(xcpot%lda_atom(atoms%ntype)) ALLOCATE(noco%socscale(atoms%ntype))
ENDIF ENDIF
CALL MPI_BCAST(xcpot%lda_atom,atoms%ntype,MPI_LOGICAL,0,mpi%mpi_comm,ierr) CALL MPI_BCAST(xcpot%lda_atom,atoms%ntype,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%socscale,atoms%ntype,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
IF(input%l_inpXML) THEN IF(input%l_inpXML) THEN
n = dimension%nstd*atoms%ntype n = dimension%nstd*atoms%ntype
......
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