Commit 32e0fc4c authored by Lorenzo Paulatto's avatar Lorenzo Paulatto

Merge branch 'develop' of gitlab.com:QEF/q-e into develop

parents 36cac41c 3484fbfc
This diff is collapsed.
...@@ -99,6 +99,8 @@ ...@@ -99,6 +99,8 @@
!! Check wheter this is the first cycle after a restart. !! Check wheter this is the first cycle after a restart.
LOGICAL :: first_time LOGICAL :: first_time
!! Check wheter this is the first timeafter a restart. !! Check wheter this is the first timeafter a restart.
LOGICAL :: homogeneous
!! Check if the k and q grids are homogenous and commensurate.
! !
CHARACTER (len=256) :: filint CHARACTER (len=256) :: filint
!! Name of the file to write/read !! Name of the file to write/read
...@@ -840,46 +842,45 @@ ...@@ -840,46 +842,45 @@
! Determines which q-points falls within the fsthick windows ! Determines which q-points falls within the fsthick windows
! Store the result in the selecq.fmt file ! Store the result in the selecq.fmt file
! If the file exists, automatically restart from the file ! If the file exists, automatically restart from the file
! This is only done in the case of homogeneous grids.
! ----------------------------------------------------------------------- ! -----------------------------------------------------------------------
!
! Check if the grids are homogeneous and commensurate
homogeneous = .FALSE.
IF ( (nkf1 /= 0) .AND. (nkf2 /= 0) .AND. (nkf3 /= 0) .AND. &
(nqf1 /= 0) .AND. (nqf2 /= 0) .AND. (nqf3 /= 0) .AND. &
(MOD(nkf1,nqf1) == 0) .AND. (MOD(nkf2,nqf2) == 0) .AND. (MOD(nkf3,nqf3) == 0) ) THEN
homogeneous = .TRUE.
ELSE
homogeneous = .FALSE.
ENDIF
!
totq = 0 totq = 0
! Check if the file has been pre-computed
IF (mpime == ionode_id) THEN
INQUIRE(FILE='selecq.fmt',EXIST=exst)
ENDIF
CALL mp_bcast(exst, ionode_id, world_comm)
! !
IF ( (nkf1 /= 0) .AND. (nkf2 /= 0) .AND. (nkf3 /= 0) .AND. (nqf1 /= 0) .AND. (nqf2 /= 0) .AND. (nqf3 /= 0) ) THEN IF (exst) THEN
! IF (selecqread) THEN
! Check if the file has been pre-computed WRITE(stdout,'(5x,a)')' '
IF (mpime == ionode_id) THEN WRITE(stdout,'(5x,a)')'Reading selecq.fmt file. '
INQUIRE(FILE='selecq.fmt',EXIST=exst) CALL qwindow(exst, nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq, homogeneous)
ELSE
WRITE(stdout,'(5x,a)')' '
WRITE(stdout,'(5x,a)')'A selecq.fmt file was found but re-created because selecqread == .false. '
CALL qwindow(.FALSE., nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq, homogeneous)
ENDIF ENDIF
CALL mp_bcast(exst, ionode_id, world_comm) ELSE ! exst
! IF (selecqread) THEN
IF (exst) THEN CALL errore( 'ephwann_shuffle', 'Variable selecqread == .true. but file selecq.fmt not found.',1 )
IF (selecqread) THEN ELSE
WRITE(stdout,'(5x,a)')' ' CALL qwindow(exst, nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq, homogeneous)
WRITE(stdout,'(5x,a)')'Reading selecq.fmt file. '
CALL qwindow(exst, nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq)
ELSE
WRITE(stdout,'(5x,a)')' '
WRITE(stdout,'(5x,a)')'A selecq.fmt file was found but re-created because selecqread == .false. '
CALL qwindow(.FALSE., nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq)
ENDIF
ELSE ! exst
IF (selecqread) THEN
CALL errore( 'ephwann_shuffle', 'Variable selecqread == .true. but file selecq.fmt not found.',1 )
ELSE
CALL qwindow(exst, nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq)
ENDIF
ENDIF ENDIF
! ENDIF
WRITE(stdout,'(5x,a,i8,a)')'We only need to compute ',totq, ' q-points' !
WRITE(stdout,'(5x,a)')' ' WRITE(stdout,'(5x,a,i8,a)')'We only need to compute ',totq, ' q-points'
ELSE WRITE(stdout,'(5x,a)')' '
! If Random points or points read from files, then take all.
totq = nqf
ALLOCATE(selecq(totq))
DO iq = 1, totq
selecq(iq) = iq
ENDDO
ENDIF ! homogeneous grids
! !
! ----------------------------------------------------------------------- ! -----------------------------------------------------------------------
! Possible restart during step 1) ! Possible restart during step 1)
......
...@@ -100,6 +100,8 @@ ...@@ -100,6 +100,8 @@
!! Check wheter this is the first cycle after a restart. !! Check wheter this is the first cycle after a restart.
LOGICAL :: first_time LOGICAL :: first_time
!! Check wheter this is the first timeafter a restart. !! Check wheter this is the first timeafter a restart.
LOGICAL :: homogeneous
!! Check if the k and q grids are homogenous and commensurate.
! !
CHARACTER (len=256) :: filint CHARACTER (len=256) :: filint
!! Name of the file to write/read !! Name of the file to write/read
...@@ -809,45 +811,46 @@ ...@@ -809,45 +811,46 @@
! Determines which q-points falls within the fsthick windows ! Determines which q-points falls within the fsthick windows
! Store the result in the selecq.fmt file ! Store the result in the selecq.fmt file
! If the file exists, automatically restart from the file ! If the file exists, automatically restart from the file
! This is only done in the case of homogeneous grids.
! ----------------------------------------------------------------------- ! -----------------------------------------------------------------------
!
! Check if the grids are homogeneous and commensurate
homogeneous = .FALSE.
IF ( (nkf1 /= 0) .AND. (nkf2 /= 0) .AND. (nkf3 /= 0) .AND. &
(nqf1 /= 0) .AND. (nqf2 /= 0) .AND. (nqf3 /= 0) .AND. &
(MOD(nkf1,nqf1) == 0) .AND. (MOD(nkf2,nqf2) == 0) .AND. (MOD(nkf3,nqf3) == 0) ) THEN
homogeneous = .TRUE.
ELSE
homogeneous = .FALSE.
ENDIF
!
totq = 0 totq = 0
! !
IF ( (nkf1 /= 0) .AND. (nkf2 /= 0) .AND. (nkf3 /= 0) .AND. (nqf1 /= 0) .AND. (nqf2 /= 0) .AND. (nqf3 /= 0) ) THEN ! Check if the file has been pre-computed
! IF (mpime == ionode_id) THEN
! Check if the file has been pre-computed INQUIRE(FILE='selecq.fmt',EXIST=exst)
IF (mpime == ionode_id) THEN ENDIF
INQUIRE(FILE='selecq.fmt',EXIST=exst) CALL mp_bcast(exst, ionode_id, world_comm)
!
IF (exst) THEN
IF (selecqread) THEN
WRITE(stdout,'(5x,a)')' '
WRITE(stdout,'(5x,a)')'Reading selecq.fmt file. '
CALL qwindow(exst, nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq, homogeneous)
ELSE
WRITE(stdout,'(5x,a)')' '
WRITE(stdout,'(5x,a)')'A selecq.fmt file was found but re-created because selecqread == .false. '
CALL qwindow(.FALSE., nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq, homogeneous)
ENDIF ENDIF
CALL mp_bcast(exst, ionode_id, world_comm) ELSE ! exst
! IF (selecqread) THEN
IF (exst) THEN CALL errore( 'ephwann_shuffle', 'Variable selecqread == .true. but file selecq.fmt not found.',1 )
IF (selecqread) THEN ELSE
WRITE(stdout,'(5x,a)')' ' CALL qwindow(exst, nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq, homogeneous)
WRITE(stdout,'(5x,a)')'Reading selecq.fmt file. '
CALL qwindow(exst, nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq)
ELSE
WRITE(stdout,'(5x,a)')' '
WRITE(stdout,'(5x,a)')'A selecq.fmt file was found but re-created because selecqread == .false. '
CALL qwindow(.FALSE., nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq)
ENDIF
ELSE ! exst
IF (selecqread) THEN
CALL errore( 'ephwann_shuffle', 'Variable selecqread == .true. but file selecq.fmt not found.',1 )
ELSE
CALL qwindow(exst, nrr_k, dims, totq, selecq, irvec_r, ndegen_k, cufkk, cufkq)
ENDIF
ENDIF ENDIF
! ENDIF
WRITE(stdout,'(5x,a,i8,a)')'We only need to compute ',totq, ' q-points' !
WRITE(stdout,'(5x,a)')' ' WRITE(stdout,'(5x,a,i8,a)')'We only need to compute ',totq, ' q-points'
ELSE WRITE(stdout,'(5x,a)')' '
totq = nqf
ALLOCATE(selecq(totq))
DO iq = 1, totq
selecq(iq) = iq
ENDDO
ENDIF ! homogeneous grids
! !
! ----------------------------------------------------------------------- ! -----------------------------------------------------------------------
! Possible restart during step 1) ! Possible restart during step 1)
......
This diff is collapsed.
...@@ -525,7 +525,7 @@ SUBROUTINE punch_plottable_bands ( filband, nks1tot, nks2tot, nkstot, nbnd, & ...@@ -525,7 +525,7 @@ SUBROUTINE punch_plottable_bands ( filband, nks1tot, nks2tot, nkstot, nbnd, &
IMPLICIT NONE IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: filband CHARACTER(LEN=*), INTENT(IN) :: filband
INTEGER, INTENT(IN) :: nks1tot, nks2tot, nkstot, nbnd INTEGER, INTENT(IN) :: nks1tot, nks2tot, nkstot, nbnd
REAL(dp), INTENT(IN) :: xk(3,nkstot), et(nbnd,nks1tot) REAL(dp), INTENT(IN) :: xk(3,nkstot), et(nbnd,nkstot)
! !
INTEGER, PARAMETER :: max_lines = 100, stdout=6, iunpun0=18 INTEGER, PARAMETER :: max_lines = 100, stdout=6, iunpun0=18
INTEGER:: ios, i, n, nlines, npoints(max_lines), point(max_lines) INTEGER:: ios, i, n, nlines, npoints(max_lines), point(max_lines)
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
phonselfen = .false. phonselfen = .false.
a2f = .false. a2f = .false.
fsthick = 1.2 ! eV fsthick = 2.0 ! eV
eptemp = 1 ! K eptemp = 1 ! K
degaussw = 0.05 ! eV degaussw = 0.05 ! eV
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
phonselfen = .false. phonselfen = .false.
a2f = .false. a2f = .false.
fsthick = 1.2 ! eV fsthick = 2.0 ! eV
eptemp = 1 ! K eptemp = 1 ! K
degaussw = 0.05 ! eV degaussw = 0.05 ! eV
......
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