Commit 9b06c35b authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop

parents 7a09599d a4ee8ae0
......@@ -104,6 +104,7 @@ CONTAINS
END DO ! lo = 1,atoms%nlo
i_u = i_u + 1
IF(i_u.GT.atoms%n_u) EXIT
END DO
END SUBROUTINE force_a21_U
......
......@@ -41,6 +41,7 @@ CONTAINS
USE m_constants
USE m_rinpXML
USE m_winpXML
USE m_init_wannier_defaults
IMPLICIT NONE
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_cell),INTENT(IN) :: cell
......@@ -228,11 +229,13 @@ CONTAINS
input_temp%comment)
ELSE
kpts_temp%ntet = 1
kpts_temp%numSpecialPoints = 1
ALLOCATE(kpts_temp%specialPoints(3,kpts_temp%numSpecialPoints))
ALLOCATE(noel_temp(1),atomTypeSpecies(1),speciesRepAtomType(1))
ALLOCATE(xmlElectronStates(1,1),xmlPrintCoreStates(1,1))
ALLOCATE(xmlCoreOccs(1,1,1))
CALL initWannierDefaults(wann_temp)
CALL r_inpXML(atoms_temp,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,&
banddos_temp,dimension_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,Jij_temp,&
oneD_temp,hybrid_temp,kpts_temp,enpara_temp,coreSpecInput_temp,wann_temp,noel_temp,&
......@@ -240,7 +243,8 @@ CONTAINS
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,l_kpts_temp)
numSpecies = SIZE(speciesRepAtomType)
filename = 'inp_new.xml'
input_temp%l_f = input%l_f
input_temp = input
!input_temp%l_f = input%l_f
input_temp%gw_neigd = dimension_temp%neigd
div(:) = MIN(kpts_temp%nkpt3(:),1)
stars_temp%gmax = stars_temp%gmaxInit
......
......@@ -45,6 +45,7 @@ MODULE m_types
REAL :: z
COMPLEX :: p,m
END TYPE t_orblo
TYPE t_lapw
INTEGER :: nv(2)
INTEGER :: nv_tot
......
......@@ -53,6 +53,10 @@ SUBROUTINE writeOutParameters(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,&
CALL writeXMLElementFormPoly('density',(/'ng3','ng2'/),&
attributes(:2),reshape((/7,6,8,8/),(/2,2/)))
WRITE(attributes(1),'(i0)') dimension%neigd
CALL writeXMLElementFormPoly('bands',(/'numbands'/),&
attributes(:1),reshape((/9,8/),(/1,2/)))
CALL closeXMLElement('numericalParameters')
END SUBROUTINE writeOutParameters
......
......@@ -48,6 +48,7 @@ MODULE m_xmlOutput
USE m_constants
USE m_utility
USE m_compile_descr
!$ use omp_lib
IMPLICIT NONE
......@@ -56,6 +57,7 @@ MODULE m_xmlOutput
INTEGER :: err, isize
#endif
INTEGER :: numFlags
INTEGER :: nOMPThreads
CHARACTER(LEN=8) :: date
CHARACTER(LEN=10) :: time
CHARACTER(LEN=10) :: zone
......@@ -66,6 +68,7 @@ MODULE m_xmlOutput
CHARACTER(LEN=20) :: structureSpecifiers(11)
CHARACTER(LEN=50) :: gitdesc,githash,gitbranch,compile_date,compile_user,compile_host
CHARACTER(LEN=50) :: compile_flags,link_flags
CHARACTER(LEN=20) :: attributes(7)
maxNumElements = 10
ALLOCATE(elementList(maxNumElements))
......@@ -104,10 +107,24 @@ MODULE m_xmlOutput
CALL writeXMLElementNoAttributes('additionalCompilerFlags',flags(1:numFlags))
END IF
CALL closeXMLElement('programVersion')
CALL openXMLElementNoAttributes('parallelSetup')
nOMPThreads = -1
!$ nOMPThreads=omp_get_max_threads()
IF(nOMPThreads.NE.-1) THEN
WRITE(attributes(1),'(i0)') nOMPThreads
CALL writeXMLElementFormPoly('openMP',(/'ompThreads'/),&
attributes(:1),reshape((/10,8/),(/1,2/)))
END IF
#ifdef CPP_MPI
CALL MPI_COMM_SIZE(MPI_COMM_WORLD,isize,err)
CALL writeXMLElementPoly('parallelizationParameters',(/'mpiPEs'/),(/isize/))
WRITE(attributes(1),'(i0)') isize
CALL writeXMLElementFormPoly('mpi',(/'mpiProcesses'/),&
attributes(:1),reshape((/13,8/),(/1,2/)))
#endif
CALL closeXMLElement('parallelSetup')
CALL writeXMLElement('startDateAndTime',(/'date','time','zone'/),(/dateString,timeString,zone/))
END SUBROUTINE startXMLOutput
......
......@@ -63,6 +63,7 @@ CONTAINS
! Local Scalars
INTEGER :: i,j,it,k,nit,iread,nmaph, mit, historyLength
INTEGER :: relIndex
REAL :: vFMetProd,alphan,coeff,vNorm
LOGICAL :: l_pot, l_exist
......@@ -128,6 +129,12 @@ CONTAINS
! save F_m and rho_m for next iteration
nit = mit +1
! Comment out the following code line to switch to continuous restart mode
! Note: The continuous restart mode is not good at the moment. It produces undesired and
! bad convergence behavior. But it is tested and seems to be correct.
IF (nit > input%maxiter+1) nit = 1
CALL writeLastIterInAndDiffDen(hybrid,nmap,nit,input%alpha,sm,fm,smMet,fmMet)
IF (mit.EQ.1) THEN
......@@ -158,18 +165,10 @@ CONTAINS
dNdFLast = 0.0
dFdNLast = 0.0
! WRITE(1400,*) '========================================'
! WRITE(1400,*) '========================================'
! WRITE(1400,*) '========================================'
! WRITE(1400,*) 'mit: ', mit
! WRITE(1400,*) 'iread, historyLength: ', iread, historyLength
DO it = 2, iread
CALL readDeltaNVec(input,hybrid,nmap,it-iread-1,mit,deltaN_i)
CALL readDeltaFVec(input,hybrid,nmap,it-iread-1,mit,deltaF_i)
! WRITE(1400,'(4i7)') it,mit,it-iread-1,mit+(it-iread-1)
! WRITE(1400,'(a,5f15.8)') 'deltaN_i: ', deltaN_i(1), deltaN_i(2), deltaN_i(3), deltaN_i(4), deltaN_i(5)
! WRITE(1400,'(a,5f15.8)') 'deltaF_i: ', deltaF_i(1), deltaF_i(2), deltaF_i(3), deltaF_i(4), deltaF_i(5)
relIndex = it-iread-1
CALL readDeltaNVec(input,hybrid,nmap,relIndex,mit,deltaN_i)
CALL readDeltaFVec(input,hybrid,nmap,relIndex,mit,deltaF_i)
dNdNLast(it-1) = CPP_BLAS_sdot(nmap,deltaN_i,1,dNMet,1)
dFdFLast(it-1) = CPP_BLAS_sdot(nmap,deltaF_i,1,dFMet,1)
......@@ -182,11 +181,6 @@ CONTAINS
dNdFLast(historyLength) = CPP_BLAS_sdot(nmap,dNVec,1,dFMet,1)
dFdNLast(historyLength) = CPP_BLAS_sdot(nmap,dFVec,1,dNMet,1)
! WRITE(1400,*) 'last overlaps:'
! DO i = 1, historyLength
! WRITE(1400,'(i7,4f20.13)') i,dNdNLast(i),dFdFLast(i),dNdFLast(i),dFdNLast(i)
! END DO
CALL writeBroydenOverlapExt(input,hybrid,mit,historyLength,&
dNdNLast,dFdFLast,dNdFLast,dFdNLast)
......@@ -198,14 +192,6 @@ CONTAINS
CALL readBroydenOverlaps(input,hybrid,mit,historyLength,&
dNdNMat,dFdFMat,dNdFMat,dFdNMat)
! WRITE(1400,*) 'all overlaps'
! DO i = 1, historyLength
! DO j = 1, historyLength
! WRITE(1400,'(2i7,4f20.13)') i,j,dNdNMat(j,i),dFdFMat(j,i),dNdFMat(j,i),dFdNMat(j,i)
! END DO
! END DO
! WRITE(1400,*) '-----------------------------'
! Extend overlap matrices <delta n(i) | delta n(j)>, <delta F(i) | delta F(j)>,
! <delta n(i) | delta F(j)>, <delta F(i) | delta n(j)> -end-
......@@ -347,8 +333,9 @@ CONTAINS
vVec = 0.0
DO it = 2, iread
CALL readDeltaNVec(input,hybrid,nmap,it-iread-1,mit,deltaN_i)
CALL readDeltaFVec(input,hybrid,nmap,it-iread-1,mit,deltaF_i)
relIndex = it-iread-1
CALL readDeltaNVec(input,hybrid,nmap,relIndex,mit,deltaN_i)
CALL readDeltaFVec(input,hybrid,nmap,relIndex,mit,deltaF_i)
DO k = 1, nmap
uVec(k) = uVec(k) + uDNTableau(it-1,historyLength)*deltaN_i(k)
......
......@@ -78,8 +78,10 @@ CONTAINS
ENDDO
ENDIF
! ----> g.ne.0 components
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(cp,pylm,nat,n,sbf,nd,lh,&
!$OMP& sm,jm,m,lm,l) REDUCTION(+:vtl)
! I commented out the OMP parallelization for the following loop since
! it produced wrong results with the ifort 18 compiler.
!!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(cp,pylm,nat,n,sbf,nd,lh,&
!!$OMP& sm,jm,m,lm,l) REDUCTION(+:vtl)
DO k = mpi%irank+2, stars%ng3, mpi%isize
cp = vpw(k,1)*stars%nstr(k)
IF (.NOT.oneD%odi%d1) THEN
......@@ -113,7 +115,7 @@ CALL od_phasy(&
nat = nat + atoms%neq(n)
ENDDO
ENDDO
!$OMP END PARALLEL DO
!!$OMP END PARALLEL DO
#ifdef CPP_MPI
n1 = (sphhar%nlhd+1)*atoms%ntype
ALLOCATE(c_b(n1))
......
......@@ -152,7 +152,7 @@ CONTAINS
DO 200 n = n_start,atoms%ntype,n_stride
IF (xcpot%lda_atom(n))THEN
IF((.NOT.xcpot%is_name("pw91"))) CALL judft_error("Using locally LDA only possible with pw91 functional")
IF((.NOT.xcpot%is_name("pw91"))) CALL judft_warn("Using locally LDA only possible with pw91 functional")
CALL xcpot_tmp%init("l91",.FALSE.)
ENDIF
nat=sum(atoms%neq(:n-1))+1
......
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