Commit 3438f9bc authored by Uliana Alekseeva's avatar Uliana Alekseeva

Merge branch 'develop' of ifflinux.iff.kfa-juelich.de:fleur into develop

parents 746928da 2ee011e1
build:
image: ubuntu:16.10
stage: build
cache:
paths:
- build
script:
- apt-get update -qq && apt-get install -y -qq build-essential gfortran gfortran-6 g++-6 gcc-6 binutils-gold git cmake libxml2-dev liblapack-dev libblas-dev doxygen
- cd /builds/fleur/fleur; ./configure.sh AUTO; cd build; make
test:
image: ubuntu:16.10
stage: test
cache:
paths:
- build
script:
- apt-get update -qq && apt-get install -y -qq build-essential gfortran gfortran-6 g++-6 gcc-6 binutils-gold git cmake libxml2-dev liblapack-dev libblas-dev doxygen
- cd /builds/fleur/fleur/build;ctest
......@@ -3,7 +3,7 @@ MODULE m_cdnval
CONTAINS
SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atoms,enpara,stars,&
vacuum,dimension, sphhar, sym,obsolete, igq_fft,vr, vz, oneD, n_mmp,results, qpw,rhtxy,&
rho,rht,cdom,cdomvz,cdomvxy,qa21, chmom,clmom)
rho,rht,cdom,cdomvz,cdomvxy,qvac,qvlay,qa21, chmom,clmom)
!
! ***********************************************************
! this subroutin is a modified version of cdnval.F.
......@@ -123,6 +123,8 @@ CONTAINS
REAL, INTENT (OUT) :: chmom(atoms%ntype,dimension%jspd),clmom(3,atoms%ntype,dimension%jspd)
REAL, INTENT (INOUT) :: rho(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd)
REAL, INTENT (INOUT) :: rht(vacuum%nmzd,2,dimension%jspd)
REAL, INTENT (INOUT) :: qvac(dimension%neigd,2,kpts%nkpt,dimension%jspd)
REAL, INTENT (INOUT) :: qvlay(dimension%neigd,vacuum%layerd,2,kpts%nkpt,dimension%jspd)
COMPLEX, INTENT(INOUT) :: n_mmp(-3:3,-3:3,atoms%n_u)
#ifdef CPP_MPI
......@@ -158,7 +160,7 @@ CONTAINS
REAL, ALLOCATABLE :: volintsl(:)
REAL, ALLOCATABLE :: qintsl(:,:),qmtsl(:,:)
REAL, ALLOCATABLE :: orbcomp(:,:,:),qmtp(:,:)
REAL, ALLOCATABLE :: qis(:,:,:),qvac(:,:,:,:),qvlay(:,:,:,:,:)
REAL, ALLOCATABLE :: qis(:,:,:)
!-new_sl
!-dw
INTEGER, ALLOCATABLE :: gvac1d(:),gvac2d(:) ,kveclo(:)
......@@ -349,10 +351,7 @@ CONTAINS
aclo(:,:,:) = 0.0 ; bclo(:,:,:) = 0.0 ; ccnmt(:,:,:,:,:) = 0.0
acnmt(:,:,:,:,:)=0.0 ; bcnmt(:,:,:,:,:)=0.0 ; cclo(:,:,:,:)=0.0
ALLOCATE ( qis(dimension%neigd,kpts%nkpt,dimension%jspd), &
qvac(dimension%neigd,2,kpts%nkpt,dimension%jspd), &
qvlay(dimension%neigd,vacuum%layerd,2,kpts%nkpt,dimension%jspd) )
qvac(:,:,:,:)=0.0 ; qvlay(:,:,:,:,:)=0.0
ALLOCATE ( qis(dimension%neigd,kpts%nkpt,dimension%jspd))
skip_tt = dot_product(enpara%skiplo(:atoms%ntype,jspin),atoms%neq(:atoms%ntype))
IF (noco%l_soc.OR.noco%l_noco) skip_tt = 2 * skip_tt
......@@ -919,6 +918,7 @@ CONTAINS
ener(0,1,ispin),sqal(0,1,ispin),&
enerlo(1,1,ispin),&
sqlo(1,1,ispin))
CALL w_enpara(&
atoms,jspin,input%film,&
enpara,16)
......
......@@ -4,7 +4,7 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "14.1.0.0")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -openmp")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -qopenmp")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -qopenmp -mt_mpi")
endif()
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xHost -O4")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -ftrapuv -check uninit -check pointers -CB ")
......
......@@ -4,4 +4,4 @@ set(CMAKE_Fortran_COMPILER mpiifort)
#Add include pathes
#set(FLEUR_Fortran_FLAGS "")
#Add linker stuff
set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} "-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64")
set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} "-lxml2;-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64")
......@@ -49,12 +49,13 @@
INTEGER ios,istep0, binSize, maxBinSize
INTEGER locBinDim(3), secondAtom(natin)
INTEGER binDim(3), iBin(3)
INTEGER trIndices(natin)
CHARACTER(len=30) :: filen
REAL posr(3,natin),rtau(3),tr(3),disp(3,natin)
REAL ttau(3,nop48),trs(3,natin)
REAL eps7
REAL trVecs(3,natin), trIndices(natin)
REAL trVecs(3,natin)
LOGICAL lnew,lclose, foundOne, boundary(3)
LOGICAL l_exist
......
......@@ -116,10 +116,11 @@
CALL read_record(infh,xl_buffer,bfh,nline,nbuffer,buffer,ios)
ENDIF
oldfleurset = .FALSE.
l_hyb = .FALSE.
IF ( buffer(1:6)=='&input' ) THEN ! get namelist 'input'
READ (bfh,input)
l_hyb = hybrid
oldfleurset = .false.
IF ( index(buffer,'oldfleur')>0 ) oldfleurset = .true.
op = 0
IF ( op > 0 ) THEN
......
......@@ -855,22 +855,27 @@
END IF
DO ieq=1,atoms%neq(n)
na = na + 1
scpos = 1.0
DO i = 2,100
rest = ABS(i*atoms%taual(1,na) - NINT(i*atoms%taual(1,na)) )&
& + ABS(i*atoms%taual(2,na) - NINT(i*atoms%taual(2,na)) )
IF (.not.input%film) THEN
rest = rest + ABS(i*atoms%taual(3,na) - NINT(i*atoms%taual(3,na)) )
END IF
IF (rest.LT.(i*0.000001)) THEN
scpos = real(i)
EXIT
END IF
DO i = 2,9
rest = ABS(i*atoms%taual(1,na) - NINT(i*atoms%taual(1,na)) )&
+ ABS(i*atoms%taual(2,na) - NINT(i*atoms%taual(2,na)) )
IF (rest.LT.(i*0.000001)) EXIT
ENDDO
IF (i.LT.10) scpos = real(i) ! common factor found (x,y)
IF (.NOT.input%film) THEN ! now check z-coordinate
DO i = 2,9
rest = ABS(i*atoms%taual(3,na) - NINT(i*atoms%taual(3,na)) )
IF (rest.LT.(i*scpos*0.000001)) THEN
scpos = i*scpos
EXIT
ENDIF
ENDDO
ENDIF
DO i = 1,2
atoms%taual(i,na) = atoms%taual(i,na)*scpos
ENDDO
IF (.not.input%film) atoms%taual(3,na) = atoms%taual(3,na)*scpos
IF (.NOT.input%film) atoms%taual(3,na) = atoms%taual(3,na)*scpos
IF (input%film) atoms%taual(3,na) = a3(3)*atoms%taual(3,na)/scale
!+odim in 1D case all the coordinates are given in cartesian YM
IF (oneD%odd%d1) THEN
......
......@@ -76,6 +76,7 @@
INTEGER,ALLOCATABLE :: igq_fft(:)
REAL ,ALLOCATABLE :: vz(:,:,:),vr(:,:,:,:)
REAL ,ALLOCATABLE :: rht(:,:,:),rho(:,:,:,:)
REAL ,ALLOCATABLE :: qvac(:,:,:,:),qvlay(:,:,:,:,:)
COMPLEX,ALLOCATABLE :: vpw(:,:),vzxy(:,:,:,:)
COMPLEX,ALLOCATABLE :: qpw(:,:),rhtxy(:,:,:,:)
COMPLEX,ALLOCATABLE :: n_mmp(:,:,:,:)
......@@ -124,14 +125,18 @@
INQUIRE(file='enpara',exist=l_enpara)
IF (l_enpara) OPEN (40,file ='enpara',form = 'formatted',status ='unknown')
ENDIF
ALLOCATE ( cdom(stars%ng3),cdomvz(vacuum%nmzd,2),cdomvxy(vacuum%nmzxyd,oneD%odi%n2d-1,2) )
ALLOCATE ( qa21(atoms%ntype) )
ALLOCATE ( igq_fft(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1) )
ALLOCATE (cdom(stars%ng3),cdomvz(vacuum%nmzd,2),cdomvxy(vacuum%nmzxyd,oneD%odi%n2d-1,2))
ALLOCATE (qa21(atoms%ntype))
ALLOCATE (qvac(dimension%neigd,2,kpts%nkpt,dimension%jspd))
ALLOCATE (qvlay(dimension%neigd,vacuum%layerd,2,kpts%nkpt,dimension%jspd))
ALLOCATE (igq_fft(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1))
!
!
!---> initialize density arrays with zero
!
qa21(:) = cmplx(0.0,0.0)
qvac(:,:,:,:) = 0.0
qvlay(:,:,:,:,:) = 0.0
rho(:,:,:,:) = 0.0
qpw(:,:) = cmplx(0.0,0.0)
cdom(:) = cmplx(0.0,0.0)
......@@ -176,7 +181,7 @@
CALL cdnval(eig_id,&
mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atoms,enpara,stars, vacuum,dimension,&
sphhar, sym,obsolete, igq_fft, vr,vz(:,:,jspin), oneD,&
n_mmp(-3:,-3:,:,jspin),results, qpw,rhtxy,rho,rht,cdom,cdomvz,cdomvxy,qa21, chmom,clmom)
n_mmp(-3:,-3:,:,jspin),results, qpw,rhtxy,rho,rht,cdom,cdomvz,cdomvxy,qvac,qvlay,qa21, chmom,clmom)
CALL timestop("cdngen: cdnval")
!-fo
END DO
......@@ -506,7 +511,7 @@
rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
ENDIF
DEALLOCATE (cdom,cdomvz,cdomvxy,qa21)
DEALLOCATE (cdom,cdomvz,cdomvxy,qvac,qvlay,qa21)
DEALLOCATE (qpw,rhtxy,rho,rht,igq_fft)
IF (sliceplot%slice) CALL juDFT_end("sliceplot%slice OK",mpi%irank)
......
......@@ -136,9 +136,20 @@ CONTAINS
INTEGER ierr(3)
CALL MPI_INIT_THREAD(MPI_THREAD_SERIALIZED,i,ierr)
CALL MPI_COMM_RANK(MPI_COMM_WORLD,irank,ierr)
!$ IF (i<MPI_THREAD_SERIALIZED) call &
!$ juDFT_error("MPI not usable with OpenMP")
!Select the io-mode from the command-line
IF(irank.EQ.0) THEN
!$ IF (i<MPI_THREAD_SERIALIZED) THEN
!$ WRITE(*,*) ""
!$ WRITE(*,*) "Linked MPI version does not support OpenMP."
!$ WRITE(*,*) ""
!$ WRITE(*,*) "To solve this problem please do one of:"
!$ WRITE(*,*) " 1. Link an adequate MPI version."
!$ WRITE(*,*) " 2. Use fleur without MPI."
!$ WRITE(*,*) " 3. Compile and use fleur without OpenMP."
!$ WRITE(*,*) ""
!$ CALL juDFT_error("MPI not usable with OpenMP")
!$ END IF
!Select the io-mode from the command-line
END IF
#endif
IF (irank==0) THEN
CALL fleur_help()
......
......@@ -150,7 +150,6 @@ CONTAINS
& exc,bf2,&
& excz(ip,ivac),rhti,excxy(ip,1,ivac),&
& vacuum%nmzxyd,-1)
ENDIF
ENDDO
......@@ -201,7 +200,7 @@ CONTAINS
CALL excall&
& (6,xcpot%icorr,input%krla,input%jspins,&
& vacuum%nmzd,nmzdiff,af2,&
& excz( +1,ivac))
& excz(vacuum%nmzxy+1,ivac))
END IF
ENDDO
IF (noco%l_noco) THEN
......
......@@ -60,7 +60,7 @@ c----------------------------------------------------------------------
+ .OR. icorr.EQ.icorr_hseloc .OR. icorr.EQ.icorr_vhse ) THEN
uk=0.8040
ELSE
WRITE(6,'(//'' icorr error. icorr='',i5)'),icorr
WRITE(6,'(//'' icorr error. icorr='',i5)') icorr
CALL judft_error("icorr is not correctly transferred",
+ calledby="exchpbe.F")
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