Commit 894fb095 authored by Daniel Wortmann's avatar Daniel Wortmann

Several changes:

- made l_zref a local variable no longer in type sym
- changed the setup of the parallelization (mpi/mpimakegroups is obsolete)
- added new command line switches yet to be documented :-)
parent b90c36e8
......@@ -30,9 +30,8 @@ include(vgen/CMakeLists.txt)
include(inpgen/CMakeLists.txt)
include(docs/CMakeLists.txt)
include(tests/CMakeLists.txt)
if (${FLEUR_USE_MPI})
include(mpi/CMakeLists.txt)
endif()
include(mpi/CMakeLists.txt)
#include(wannier/CMakeLists.txt)
......
......@@ -17,6 +17,7 @@ MODULE m_eigen_diag
USE m_elpa
#endif
IMPLICIT NONE
PRIVATE
#ifdef CPP_ELPA
INTEGER,PARAMETER:: diag_elpa=1
#else
......@@ -39,9 +40,15 @@ MODULE m_eigen_diag
#endif
INTEGER,PARAMETER:: diag_lapack=4
INTEGER,PARAMETER:: diag_lapack2=5
PUBLIC eigen_diag,parallel_solver_available
CONTAINS
LOGICAL FUNCTION parallel_solver_available()
parallel_solver_available=any((/diag_elpa,diag_elemental,diag_scalapack/)>0)
END FUNCTION parallel_solver_available
SUBROUTINE eigen_diag(jsp,eig_id,it,atoms,dimension,matsize,mpi, n_rank,n_size,ne,nk,lapw,input,nred,sub_comm,&
sym,matind,kveclo, noco,cell,bkpt,el,jij,l_wu,oneD,td,ud, eig,ne_found,hamOvlp,zMat,realdata)
sym,l_zref,matind,kveclo, noco,cell,bkpt,el,jij,l_wu,oneD,td,ud, eig,ne_found,hamOvlp,zMat,realdata)
USE m_zsymsecloc
USE m_aline
USE m_alinemuff
......@@ -81,7 +88,7 @@ CONTAINS
INTEGER,INTENT(IN) :: ne
INTEGER,INTENT(OUT) :: ne_found
REAL,INTENT(IN) :: el(:,:,:)
LOGICAL, INTENT(IN) :: l_wu
LOGICAL, INTENT(IN) :: l_wu,l_zref
REAL,INTENT(INOUT) :: bkpt(3)
TYPE(t_tlmplm),INTENT(IN) :: td
TYPE(t_usdus),INTENT(IN) :: ud
......@@ -189,14 +196,14 @@ CONTAINS
if (noco%l_ss) call juDFT_error("zsymsecloc not tested with noco%l_ss")
if (input%gw>1) call juDFT_error("zsymsecloc not tested with input%gw>1")
IF (l_real) THEN
CALL zsymsecloc(jsp,input,lapw,bkpt,atoms,kveclo, sym,cell, dimension,matsize,ndim,&
CALL zsymsecloc(jsp,input,lapw,bkpt,atoms,kveclo, sym,l_zref,cell, dimension,matsize,ndim,&
jij,matind,nred,eig,ne_found,hamOvlp%a_r,hamOvlp%b_r,zMat%z_r)
else
CALL zsymsecloc(jsp,input,lapw,bkpt,atoms,kveclo, sym,cell, dimension,matsize,ndim,&
CALL zsymsecloc(jsp,input,lapw,bkpt,atoms,kveclo, sym,l_zref,cell, dimension,matsize,ndim,&
jij,matind,nred,eig,ne_found,hamOvlp%a_c,hamOvlp%b_c,zMat%z_c)
endif
CASE (diag_lapack)
CALL franza(dimension%nbasfcn,ndim, lapw%nmat,(sym%l_zref.AND.(atoms%nlotot.EQ.0)),&
CALL franza(dimension%nbasfcn,ndim, lapw%nmat,(l_zref.AND.(atoms%nlotot.EQ.0)),&
jij%l_j,matind,nred,input%gw,eig,ne_found,hamOvlp,zMat)
CASE DEFAULT
!This should only happen if you select a solver by hand which was not compiled against
......@@ -256,6 +263,7 @@ CONTAINS
END FUNCTION priv_select_solver
SUBROUTINE priv_solver_error(diag_solver,parallel)
IMPLICIT NONE
INTEGER,INTENT(IN):: diag_solver
......
......@@ -26,13 +26,13 @@ MODULE m_zsymsecloc
MODULE procedure zsymsecloc_r,zsymsecloc_c
END INTERFACE zsymsecloc
CONTAINS
SUBROUTINE zsymsecloc_r(jsp,input,lapw,bkpt,atoms, kveclo, sym,cell, dimension,matsize, nsize, jij,matind,nred,eig,ne, a,b, z)
SUBROUTINE zsymsecloc_r(jsp,input,lapw,bkpt,atoms, kveclo, sym,l_zref,cell, dimension,matsize, nsize, jij,matind,nred,eig,ne, a,b, z)
#define CPP_REALDATA
#include "zsymsecloc_cpp.F90"
END SUBROUTINE zsymsecloc_r
SUBROUTINE zsymsecloc_c(jsp,input,lapw,bkpt,atoms, kveclo, sym,cell, dimension,matsize, nsize, jij,matind,nred,eig,ne, a,b, z)
SUBROUTINE zsymsecloc_c(jsp,input,lapw,bkpt,atoms, kveclo, sym,l_zref,cell, dimension,matsize, nsize, jij,matind,nred,eig,ne, a,b, z)
#undef CPP_REALDATA
#include "zsymsecloc_cpp.F90"
......
......@@ -23,6 +23,7 @@
TYPE(t_lapw),INTENT(IN) :: lapw
real,intent(in) ::bkpt(3)
integer,intent(in)::kveclo(atoms%nlotot)
logical,intent(in) :: l_zref
! ..
! .. Scalar Arguments ..
......@@ -82,7 +83,7 @@
!******************************************
! l_zref=.false. => simply call eigensolver
!******************************************
if(.not.sym%l_zref)then
if(.not.l_zref)then
#ifdef CPP_REALDATA
call geneigprobl(dimension%nbasfcn, nsize,dimension%neigd,jij%l_j,eig,ne,a,b,z)
#else
......@@ -512,6 +513,6 @@
allocate(a(dimension%nbasfcn*(dimension%nbasfcn+1)/2))
allocate(b(dimension%nbasfcn*(dimension%nbasfcn+1)/2))
endif !sym%l_zref
endif !l_zref
deallocate ( z1,z2,etemp1,etemp2,evensort )
......@@ -13,7 +13,7 @@ MODULE m_apws
!*********************************************************************
CONTAINS
SUBROUTINE apws(dimension,input,noco,kpts,&
nk,cell,sym,n_size,jspin, bkpt,lapw,matind,nred)
nk,cell,l_zref,n_size,jspin, bkpt,lapw,matind,nred)
USE m_types
USE m_sort
......@@ -23,7 +23,6 @@ CONTAINS
TYPE(t_dimension),INTENT(IN) :: dimension
TYPE(t_input),INTENT(IN) :: input
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_kpts),INTENT(IN) :: kpts
TYPE(t_lapw),INTENT(INOUT) :: lapw
......@@ -31,6 +30,7 @@ CONTAINS
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: nk,n_size,jspin
INTEGER, INTENT (OUT) :: nred
LOGICAL, INTENT (IN) :: l_zref
! ..
! .. Array Arguments ..
INTEGER, INTENT (OUT) :: matind(dimension%nbasfcn,2)
......@@ -153,7 +153,7 @@ CONTAINS
!+gu
!---> determine pairs of K-vectors, where K_z = K'_-z to use
!---> z-reflection
IF (sym%l_zref) THEN
IF (l_zref) THEN
n=0
DO i=1,lapw%nv(ispin)
DO j=1,i
......
......@@ -46,9 +46,6 @@ CONTAINS
USE m_util
USE m_icorrkeys
USE m_eig66_io, ONLY : open_eig, write_eig, close_eig,read_eig
#ifdef CPP_MPI
USE m_mpimakegroups
#endif
USE m_xmlOutput
IMPLICIT NONE
......@@ -65,7 +62,7 @@ CONTAINS
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_banddos),INTENT(IN) :: banddos
TYPE(t_jij),INTENT(IN) :: jij
TYPE(t_sym),INTENT(INOUT) :: sym !l_zref will be modified in EVP
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_kpts),INTENT(IN) :: kpts
......@@ -88,7 +85,7 @@ CONTAINS
INTEGER iter,ne,matsize ,nrec,lh0
INTEGER nspins,isp,l,i,j,err,gwc
INTEGER mlotot,mlolotot,mlot_d,mlolot_d,nlot_d
LOGICAL l_wu,lcal_qsgw,l_file,l_real
LOGICAL l_wu,lcal_qsgw,l_file,l_real,l_zref
REAL evac_sv(dimension%jspd)
INTEGER ::eig_id_hf=-1
INTEGER :: nu=8
......@@ -114,8 +111,7 @@ CONTAINS
TYPE(t_zMat) :: zMat
TYPE(t_hamOvlp) :: hamOvlp
!
INTEGER n_start,n_groups,n_rank,n_size,n,n_stride
INTEGER SUB_COMM,fh
INTEGER fh,nn,n
INTEGER ierr(3)
!
......@@ -188,9 +184,9 @@ CONTAINS
! determine the total number of lo's : nlotot
!
mlotot = 0 ; mlolotot = 0
DO n = 1, atoms%ntype
mlotot = mlotot + atoms%nlo(n)
mlolotot = mlolotot + atoms%nlo(n)*(atoms%nlo(n)+1)/2
DO nn = 1, atoms%ntype
mlotot = mlotot + atoms%nlo(nn)
mlolotot = mlolotot + atoms%nlo(nn)*(atoms%nlo(nn)+1)/2
ENDDO
nlot_d = atoms%nlotot !max(atoms%nlotot,1)
ALLOCATE ( kveclo(nlot_d) )
......@@ -265,9 +261,9 @@ CONTAINS
lh0 = 0 ! for a input%gw-calculation, we
! now evaluate matrix elements
DO jsp = 1,input%jspins ! with the coulomb potential
DO n = 1,atoms%ntype ! but with explicit kinetic energy
DO j = 1,atoms%jri(n)
vr(j,0,n,jsp) = vr(j,0,n,jsp)-vr0(j,n,jsp)*sfp_const/atoms%rmsh(j,n)
DO nn = 1,atoms%ntype ! but with explicit kinetic energy
DO j = 1,atoms%jri(nn)
vr(j,0,nn,jsp) = vr(j,0,nn,jsp)-vr0(j,nn,jsp)*sfp_const/atoms%rmsh(j,nn)
ENDDO
ENDDO
ENDDO
......@@ -290,49 +286,37 @@ CONTAINS
!---> set up and solve the eigenvalue problem
!---> loop over energy windows
!check if z-reflection trick can be used
#if ( defined(CPP_MPI))
!#if ( defined(CPP_MPI) && defined(CPP_EVP) )
!
IF ( hybrid%l_calhf ) THEN
n_start = 1
n_stride = 1
ELSE
CALL mpi_make_groups(mpi,dimension,kpts, input,atoms,noco, mlotot,mlolotot,&
n_start,n_groups,n,matsize,ne, n_rank,n_size,SUB_COMM)
n_stride = kpts%nkpt/n_groups
IF (n_size > 1) sym%l_zref = .false.
END IF
!
#else
n_rank = 0
n_size = 1
l_zref=(sym%zrfs.AND.(SUM(ABS(kpts%bk(3,:kpts%nkptd))).LT.1e-9).and..not.noco%l_noco)
#ifdef CPP_MPI
IF ( mpi%isize > kpts%nkpt ) THEN
CALL juDFT_error("no. processors must be <= no. kpts")
END IF
#if ( defined(CPP_MPI))
IF (mpi%n_size > 1) l_zref = .false.
IF ( hybrid%l_calhf ) THEN
n_start = 1
n_stride = 1
ELSE
n_start = mpi%irank + 1
n_stride = mpi%isize
call judft_error("BUG parallelization in HF case must be fixed")
!n_start = 1
!n_stride = 1
END IF
#else
n_start = 1
n_stride = 1
#endif
n = dimension%nbasfcn/n_size
matsize = dimension%nbasfcn * (dimension%nbasfcn+1)/2
ne = dimension%neigd
#endif
!Count number of matrix columns on this PE
n=0
DO i=1+mpi%n_rank,dimension%nbasfcn,mpi%n_size
n=n+1
enddo
IF (mpi%n_size>1) THEN
matsize = dimension%nbasfcn * n
ELSE
matsize = (dimension%nbasfcn+1)*dimension%nbasfcn/2
ENDIF
ne = max(5,dimension%neigd)
if (l_hybrid.or.hybrid%l_calhf) THEN
eig_id_hf=eig_id
endif
eig_id=open_eig(&
mpi%mpi_comm,dimension%nbasfcn,dimension%neigd,kpts%nkpt,dimension%jspd,atoms%lmaxd,&
atoms%nlod,atoms%ntypd,atoms%nlotot,noco%l_noco,.true.,l_real,noco%l_soc,.false.,n_size,layers=vacuum%layers,nstars=vacuum%nstars,ncored=dimension%nstd,nsld=atoms%natd,nat=atoms%natd,l_dos=banddos%dos.or.input%cdinf,l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
atoms%nlod,atoms%ntypd,atoms%nlotot,noco%l_noco,.true.,l_real,noco%l_soc,.false.,mpi%n_size,layers=vacuum%layers,nstars=vacuum%nstars,ncored=dimension%nstd,nsld=atoms%natd,nat=atoms%natd,l_dos=banddos%dos.or.input%cdinf,l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
IF (l_real) THEN
ALLOCATE ( hamOvlp%a_r(matsize), stat = err )
......@@ -372,7 +356,7 @@ CONTAINS
READ(15)
READ(15)
READ(15)
WRITE(15) n_start,n_stride,n_rank,n_size,dimension%nvd,&
WRITE(15) mpi%n_start,mpi%n_stride,mpi%n_rank,mpi%n_size,dimension%nvd,&
& dimension%nbasfcn,atoms%nlotot
CLOSE(15)
END IF
......@@ -436,7 +420,7 @@ CONTAINS
IF ( hybrid%l_calhf ) CALL MPI_WAITALL(sndreqd,sndreq,MPI_STATUSES_IGNORE,ierr)
#endif
k_loop:DO nk = n_start,kpts%nkpt,n_stride
k_loop:DO nk = mpi%n_start,kpts%nkpt,mpi%n_stride
#if defined(CPP_MPI)&&defined(CPP_NEVER)
IF ( hybrid%l_calhf ) THEN
! jump to next k-point if this process is not present in communicator
......@@ -447,13 +431,13 @@ CONTAINS
#endif
nrec = kpts%nkpt*(jsp-1) + nk
nrec = n_size*(nrec-1) + n_rank + 1
nrec = mpi%n_size*(nrec-1) + mpi%n_rank + 1
!
!---> set up lapw list
!
call timestart("Setup of LAPW")
lapw%rk = 0 ; lapw%k1 = 0 ; lapw%k2 = 0 ; lapw%k3 = 0
CALL apws(dimension,input,noco, kpts,nk,cell,sym, n_size,jsp, bkpt,lapw,matind,nred)
CALL apws(dimension,input,noco, kpts,nk,cell,l_zref, mpi%n_size,jsp, bkpt,lapw,matind,nred)
call timestop("Setup of LAPW")
IF (noco%l_noco) THEN
......@@ -465,7 +449,7 @@ CONTAINS
!---> set up interstitial hamiltonian and overlap matrices
!
call timestart("Interstitial Hamiltonian&Overlap")
CALL hsint(input,noco,jij,stars, vpw(:,jsp),lapw,jsp, n_size,n_rank,kpts%bk(:,nk),cell,atoms,l_real,hamOvlp)
CALL hsint(input,noco,jij,stars, vpw(:,jsp),lapw,jsp, mpi%n_size,mpi%n_rank,kpts%bk(:,nk),cell,atoms,l_real,hamOvlp)
call timestop("Interstitial Hamiltonian&Overlap")
!
......@@ -473,7 +457,7 @@ CONTAINS
!
IF (.not.l_wu) THEN
call timestart("MT Hamiltonian&Overlap")
CALL hsmt(dimension,atoms,sphhar,sym,enpara, SUB_COMM,n_size,n_rank,jsp,input,mpi,&
CALL hsmt(dimension,atoms,sphhar,sym,enpara, mpi%SUB_COMM,mpi%n_size,mpi%n_rank,jsp,input,mpi,&
lmaxb,gwc, noco,cell, lapw, bkpt,vr, vs_mmp, oneD,ud, kveclo,td,l_real,hamOvlp)
call timestop("MT Hamiltonian&Overlap")
ENDIF
......@@ -483,7 +467,7 @@ CONTAINS
CALL hsfock(nk,atoms,lcutm,obsolete,lapw, dimension,kpts,jsp,input,hybrid,maxbasm,&
maxindxp,maxlcutm,maxindxm,nindxm, basm,bas1,bas2,bas1_MT,drbas1_MT,ne_eig,eig_irr,&
n_size,sym,cell, noco,noco,oneD, nbasp,nbasm, results,results,it,nbands(nk),maxbands,nobd,&
mpi%n_size,sym,cell, noco,noco,oneD, nbasp,nbasm, results,results,it,nbands(nk),maxbands,nobd,&
mnobd,xcpot, core1,core2,nindxc,maxindxc,lmaxc, lmaxcd, kveclo_eig,maxfac,fac,sfac,gauntarr,&
nindxp,prod,prodm,gwc, mpi,irank2(nk),isize2(nk),comm(nk), a)
......@@ -503,11 +487,11 @@ CONTAINS
call timestart("Vacuum Hamiltonian&Overlap")
IF (input%film .AND. .NOT.oneD%odi%d1) THEN
CALL hsvac(vacuum,stars,dimension, atoms, jsp,input,vzxy(1,1,1,jsp),vz,enpara%evac0,cell, &
bkpt,lapw,sym, noco,jij, n_size,n_rank,nv2,l_real,hamOvlp)
bkpt,lapw,sym, noco,jij, mpi%n_size,mpi%n_rank,nv2,l_real,hamOvlp)
ELSEIF (oneD%odi%d1) THEN
CALL od_hsvac(vacuum,stars,dimension, oneD,atoms, jsp,input,vzxy(1,1,1,jsp),vz, &
enpara%evac0,cell, bkpt,lapw, oneD%odi%M,oneD%odi%mb,oneD%odi%m_cyl,oneD%odi%n2d, &
n_size,n_rank,sym,noco,jij,nv2,l_real,hamOvlp)
mpi%n_size,mpi%n_rank,sym,noco,jij,nv2,l_real,hamOvlp)
END IF
call timestop("Vacuum Hamiltonian&Overlap")
......@@ -546,8 +530,8 @@ CONTAINS
endif
CALL eigen_diag(jsp,eig_id,it,atoms,dimension,matsize,mpi, n_rank,n_size,ne,nk,lapw,input,&
nred,sub_comm, sym,matind,kveclo, noco,cell,bkpt,enpara%el0,jij,l_wu,&
CALL eigen_diag(jsp,eig_id,it,atoms,dimension,matsize,mpi, mpi%n_rank,mpi%n_size,ne,nk,lapw,input,&
nred,mpi%sub_comm, sym,l_zref,matind,kveclo, noco,cell,bkpt,enpara%el0,jij,l_wu,&
oneD,td,ud, eig,ne_found,hamOvlp,zMat)
!
......@@ -557,7 +541,7 @@ CONTAINS
ne_all=ne_found
#if defined(CPP_MPI)
!Collect number of all eigenvalues
CALL MPI_ALLREDUCE(ne_found,ne_all,1,MPI_INTEGER,MPI_SUM, sub_comm,ierr)
CALL MPI_ALLREDUCE(ne_found,ne_all,1,MPI_INTEGER,MPI_SUM, mpi%sub_comm,ierr)
#endif
!jij%eig_l = 0.0 ! need not be used, if hdf-file is present
if (.not.l_real) THEN
......@@ -571,12 +555,12 @@ CONTAINS
CALL write_eig(eig_id, nk,jsp,ne_found,ne_all,lapw%nv(jsp),lapw%nmat,&
lapw%k1(:lapw%nv(jsp),jsp),lapw%k2 (:lapw%nv(jsp),jsp),lapw%k3(:lapw%nv(jsp),jsp),&
bkpt, kpts%wtkpt(nk),eig(:ne_found),enpara%el0(0:,:,jsp), enpara%ello0(:,:,jsp),enpara%evac0(:,jsp),&
atoms%nlotot,kveclo,n_size,n_rank,z=zMat%z_r(:,:ne_found))
atoms%nlotot,kveclo,mpi%n_size,mpi%n_rank,z=zMat%z_r(:,:ne_found))
else
CALL write_eig(eig_id, nk,jsp,ne_found,ne_all,lapw%nv(jsp),lapw%nmat,&
lapw%k1(:lapw%nv(jsp),jsp),lapw%k2 (:lapw%nv(jsp),jsp),lapw%k3(:lapw%nv(jsp),jsp),&
bkpt, kpts%wtkpt(nk),eig(:ne_found),enpara%el0(0:,:,jsp), enpara%ello0(:,:,jsp),enpara%evac0(:,jsp),&
atoms%nlotot,kveclo,n_size,n_rank,z=zMat%z_c(:,:ne_found))
atoms%nlotot,kveclo,mpi%n_size,mpi%n_rank,z=zMat%z_c(:,:ne_found))
endif
IF (noco%l_noco) THEN
CALL write_eig(eig_id, nk,2,ne_found,ne_all,lapw%nv(2),lapw%nmat,&
......@@ -695,9 +679,9 @@ endif
IF (l_hybrid.or.hybrid%l_calhf) THEN
open(unit=120,file='vr0',form='unformatted')
DO isp=1,dimension%jspd
DO n=1,atoms%ntypd
DO nn=1,atoms%ntypd
DO i=1,atoms%jmtd
WRITE(120) vr0(i,n,isp)
WRITE(120) vr0(i,nn,isp)
END DO
END DO
END DO
......
......@@ -76,14 +76,14 @@ MODULE m_tlmplm
!---> generate the wavefunctions for each l
!
l_write=mpi%irank==0
!$ l_write=.false.
!$ call gaunt2(atoms%lmaxd)
!$OMP PARALLEL DO DEFAULT(NONE)&
!$OMP PRIVATE(indt,dvd,dvu,uvd,uvu,f,g,x,flo,uuilon,duilon,ulouilopn)&
!$OMP PRIVATE(cil,temp,wronk,i,l,l2,lamda,lh,lm,lmin,lmin0,lmp,lmpl)&
!$OMP PRIVATE(lmplm,lmx,lmxx,lp,lp1,lpl,m,mem,mems,mp,mu,n,nh,noded)&
!$OMP PRIVATE(nodeu,nsym,na)&
!$OMP SHARED(dimension,atoms,gwc,lh0,jspin,jsp,sphhar,enpara,td,ud,l_write,ci,vr,mpi,input)
!!$ l_write=.false.
!!$ call gaunt2(atoms%lmaxd)
!!$OMP PARALLEL DO DEFAULT(NONE)&
!!$OMP PRIVATE(indt,dvd,dvu,uvd,uvu,f,g,x,flo,uuilon,duilon,ulouilopn)&
!!$OMP PRIVATE(cil,temp,wronk,i,l,l2,lamda,lh,lm,lmin,lmin0,lmp,lmpl)&
!!$OMP PRIVATE(lmplm,lmx,lmxx,lp,lp1,lpl,m,mem,mems,mp,mu,n,nh,noded)&
!!$OMP PRIVATE(nodeu,nsym,na)&
!!$OMP SHARED(dimension,atoms,gwc,lh0,jspin,jsp,sphhar,enpara,td,ud,l_write,ci,vr,mpi,input)
DO n = 1,atoms%ntype
na=sum(atoms%neq(:n-1))+1
......@@ -250,7 +250,7 @@ MODULE m_tlmplm
ENDIF
ENDDO
!$OMP END PARALLEL DO
!!$OMP END PARALLEL DO
END SUBROUTINE tlmplm
......
......@@ -710,7 +710,6 @@
LOGICAL ::invs
!Z-refls. sym
LOGICAL ::zrfs
LOGICAL :: l_zref
!No of sym ops
INTEGER ::nop
!No of 2D-sym ops
......@@ -756,6 +755,12 @@
INTEGER :: mpi_comm !< replaces MPI_COMM_WORLD
INTEGER :: irank !< rank of task in mpi_comm
INTEGER :: isize !< no of tasks in mpi_comm
INTEGER :: n_start !< no of first k-point to calculate on this PE
INTEGER :: n_stride !< stride for k-loops
INTEGER :: n_size !< PE per kpoint, i.e. "isize" for eigenvalue parallelization
INTEGER :: n_groups !< No of k-loops per PE
INTEGER :: sub_comm !< Sub-Communicator for eigenvalue parallelization (all PE working on same k-point)
INTEGER :: n_rank !< rank in sub_comm
END TYPE
TYPE t_zMat
......
......@@ -7,7 +7,7 @@
IMPLICIT NONE
CONTAINS
SUBROUTINE fleur_init(mpi,&
input,dimension,atoms,sphhar,cell,stars,sym,noco,vacuum,&
input,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,&
sliceplot,banddos,obsolete,enpara,xcpot,results,jij,kpts,hybrid,&
oneD,l_opti)
USE m_judft
......@@ -25,6 +25,7 @@
USE m_InitParallelProcesses
USE m_xmlOutput
USE m_winpXML
USE m_setupMPI
#ifdef CPP_MPI
USE m_mpi_bc_all, ONLY : mpi_bc_all
#endif
......@@ -32,7 +33,7 @@
! Types, these variables contain a lot of data!
TYPE(t_mpi) ,INTENT(INOUT):: mpi
TYPE(t_input) ,INTENT(OUT):: input
TYPE(t_dimension),INTENT(OUT):: dimension
TYPE(t_dimension),INTENT(OUT):: DIMENSION
TYPE(t_atoms) ,INTENT(OUT):: atoms
TYPE(t_sphhar) ,INTENT(OUT):: sphhar
TYPE(t_cell) ,INTENT(OUT):: cell
......@@ -118,12 +119,12 @@
a3 = 0.0
scale = 1.0
CALL r_inpXML(&
atoms,obsolete,vacuum,input,stars,sliceplot,banddos,dimension,&
atoms,obsolete,vacuum,input,stars,sliceplot,banddos,DIMENSION,&
cell,sym,xcpot,noco,Jij,oneD,hybrid,kpts,enpara,sphhar,l_opti,&
noel,namex,relcor,a1,a2,a3,scale,dtild,xmlElectronStates,&
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType)
ALLOCATE (results%force(3,atoms%ntype,dimension%jspd))
ALLOCATE (results%force(3,atoms%ntype,DIMENSION%jspd))
ALLOCATE (results%force_old(3,atoms%ntype))
results%force(:,:,:) = 0.0
......@@ -142,7 +143,7 @@
#ifdef CPP_MPI
CALL initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,&
dimension,cell,sym,xcpot,noco,jij,oneD,hybrid,&
DIMENSION,cell,sym,xcpot,noco,jij,oneD,hybrid,&
kpts,enpara,sphhar,mpi,results,obsolete)
#endif
......@@ -152,13 +153,13 @@
& mpi,input,&
& sym,stars,&
& atoms,sphhar,&
& dimension,vacuum,&
& DIMENSION,vacuum,&
& obsolete,kpts,&
& oneD,hybrid,Jij)
dimension%nn2d= (2*stars%k1d+1)* (2*stars%k2d+1)
dimension%nn3d= (2*stars%k1d+1)* (2*stars%k2d+1)* (2*stars%k3d+1)
DIMENSION%nn2d= (2*stars%k1d+1)* (2*stars%k2d+1)
DIMENSION%nn3d= (2*stars%k1d+1)* (2*stars%k2d+1)* (2*stars%k3d+1)
!-odim
IF (oneD%odd%d1) THEN
oneD%odd%k3 = stars%k3d
......@@ -177,7 +178,7 @@
ALLOCATE ( atoms%ncv(atoms%ntypd),atoms%neq(atoms%ntypd),atoms%ngopr(atoms%natd) )
ALLOCATE ( sphhar%nlh(sphhar%ntypsd),sphhar%nmem(0:sphhar%nlhd,sphhar%ntypsd) )
ALLOCATE ( stars%nstr2(stars%n2d),atoms%ntypsy(atoms%natd),stars%nstr(stars%n3d) )
ALLOCATE ( stars%igfft(0:dimension%nn3d-1,2),stars%igfft2(0:dimension%nn2d-1,2),atoms%nflip(atoms%ntypd) )
ALLOCATE ( stars%igfft(0:DIMENSION%nn3d-1,2),stars%igfft2(0:DIMENSION%nn2d-1,2),atoms%nflip(atoms%ntypd) )
ALLOCATE ( atoms%ncst(atoms%ntypd) )
ALLOCATE ( vacuum%izlay(vacuum%layerd,2) )
ALLOCATE ( sym%invarop(atoms%natd,sym%nop),sym%invarind(atoms%natd) )
......@@ -188,24 +189,24 @@
ALLOCATE ( atoms%rmsh(atoms%jmtd,atoms%ntypd),atoms%rmt(atoms%ntypd),stars%sk2(stars%n2d),stars%sk3(stars%n3d) )
ALLOCATE ( stars%phi2(stars%n2d) )
ALLOCATE ( atoms%taual(3,atoms%natd),atoms%volmts(atoms%ntypd),atoms%zatom(atoms%ntypd) )
ALLOCATE ( enpara%el0(0:atoms%lmaxd,atoms%ntypd,dimension%jspd) )
ALLOCATE ( enpara%evac0(2,dimension%jspd),stars%rgphs(-stars%k1d:stars%k1d,-stars%k2d:stars%k2d,-stars%k3d:stars%k3d) )
ALLOCATE ( results%force(3,atoms%ntypd,dimension%jspd) )
ALLOCATE ( enpara%el0(0:atoms%lmaxd,atoms%ntypd,DIMENSION%jspd) )
ALLOCATE ( enpara%evac0(2,DIMENSION%jspd),stars%rgphs(-stars%k1d:stars%k1d,-stars%k2d:stars%k2d,-stars%k3d:stars%k3d) )
ALLOCATE ( results%force(3,atoms%ntypd,DIMENSION%jspd) )
ALLOCATE ( results%force_old(3,atoms%ntypd) )
ALLOCATE ( kpts%bk(3,kpts%nkptd),kpts%wtkpt(kpts%nkptd) )
ALLOCATE ( stars%pgfft(0:dimension%nn3d-1),stars%pgfft2(0:dimension%nn2d-1) )
ALLOCATE ( stars%pgfft(0:DIMENSION%nn3d-1),stars%pgfft2(0:DIMENSION%nn2d-1) )
ALLOCATE ( stars%ufft(0:27*stars%k1d*stars%k2d*stars%k3d-1) )
ALLOCATE ( atoms%bmu(atoms%ntypd),atoms%vr0(atoms%ntypd) )
ALLOCATE ( enpara%lchange(0:atoms%lmaxd,atoms%ntypd,dimension%jspd) )
ALLOCATE ( enpara%lchg_v(2,dimension%jspd),atoms%l_geo(atoms%ntypd) )
ALLOCATE ( atoms%nlo(atoms%ntypd),atoms%llo(atoms%nlod,atoms%ntypd),enpara%skiplo(atoms%ntypd,dimension%jspd) )
ALLOCATE ( enpara%ello0(atoms%nlod,atoms%ntypd,dimension%jspd),enpara%llochg(atoms%nlod,atoms%ntypd,dimension%jspd) )
ALLOCATE ( enpara%lchange(0:atoms%lmaxd,atoms%ntypd,DIMENSION%jspd) )
ALLOCATE ( enpara%lchg_v(2,DIMENSION%jspd),atoms%l_geo(atoms%ntypd) )
ALLOCATE ( atoms%nlo(atoms%ntypd),atoms%llo(atoms%nlod,atoms%ntypd),enpara%skiplo(atoms%ntypd,DIMENSION%jspd) )
ALLOCATE ( enpara%ello0(atoms%nlod,atoms%ntypd,DIMENSION%jspd),enpara%llochg(atoms%nlod,atoms%ntypd,DIMENSION%jspd) )
ALLOCATE ( atoms%lo1l(0:atoms%llod,atoms%ntypd),atoms%nlol(0:atoms%llod,atoms%ntypd),atoms%lapw_l(atoms%ntypd) )
ALLOCATE ( noco%alphInit(atoms%ntypd),noco%alph(atoms%ntypd),noco%beta(atoms%ntypd),noco%l_relax(atoms%ntypd) )
ALLOCATE ( jij%alph1(atoms%ntypd),jij%l_magn(atoms%ntypd),jij%M(atoms%ntypd) )
ALLOCATE ( jij%magtype(atoms%ntypd),jij%nmagtype(atoms%ntypd) )
ALLOCATE ( noco%b_con(2,atoms%ntypd),atoms%lda_u(atoms%ntypd),atoms%l_dulo(atoms%nlod,atoms%ntypd) )
ALLOCATE ( enpara%enmix(dimension%jspd),sym%d_wgn(-3:3,-3:3,3,sym%nop) )
ALLOCATE ( enpara%enmix(DIMENSION%jspd),sym%d_wgn(-3:3,-3:3,3,sym%nop) )
ALLOCATE ( atoms%ulo_der(atoms%nlod,atoms%ntypd) )
ALLOCATE ( noco%soc_opt(atoms%ntypd+2) )
ALLOCATE ( atoms%numStatesProvided(atoms%ntypd))
......@@ -223,7 +224,7 @@
ALLOCATE ( hybrid%nindx(0:atoms%lmaxd,atoms%ntypd) )
ALLOCATE ( hybrid%select1(4,atoms%ntypd),hybrid%lcutm1(atoms%ntypd),&
& hybrid%select2(4,atoms%ntypd),hybrid%lcutm2(atoms%ntypd),hybrid%lcutwf(atoms%ntypd) )
ALLOCATE ( hybrid%ddist(dimension%jspd) )
ALLOCATE ( hybrid%ddist(DIMENSION%jspd) )
hybrid%ddist = 1.
!
......@@ -252,7 +253,7 @@
& stars,oneD,jij,hybrid,kpts)
!
IF (xcpot%igrd.NE.0) 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),&
& oneD%pgft1xy(0:oneD%odd%nn2d-1),&
......@@ -267,8 +268,8 @@
!-odim
!+t3e
INQUIRE(file="cdn1",exist=l_opti)
if (noco%l_noco) INQUIRE(file="rhomat_inp",exist=l_opti)
l_opti=.not.l_opti
IF (noco%l_noco) INQUIRE(file="rhomat_inp",exist=l_opti)
l_opti=.NOT.l_opti
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.
......@@ -280,7 +281,7 @@
ENDIF
!
CALL setup(&