From ee3efbf909d9e1afc16cb0692d132a2a43f07e61 Mon Sep 17 00:00:00 2001 From: dalcorso Date: Sun, 5 Aug 2012 09:39:33 +0000 Subject: [PATCH] Bug fix: ph.x with images was not working any more. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@9252 c92efa57-630b-4861-b058-cf58834340f0 --- PHonon/PH/check_initial_status.f90 | 20 +++++++++++--------- PHonon/PH/dynmatrix.f90 | 1 + PHonon/PH/phq_setup.f90 | 6 +++++- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/PHonon/PH/check_initial_status.f90 b/PHonon/PH/check_initial_status.f90 index d507c0a3a..32e04fe20 100644 --- a/PHonon/PH/check_initial_status.f90 +++ b/PHonon/PH/check_initial_status.f90 @@ -186,8 +186,8 @@ SUBROUTINE check_initial_status(auxdyn) lgamma = ( x_q(1,iq) == 0.D0 .AND. x_q(2,iq) == 0.D0 .AND. & x_q(3,iq) == 0.D0 ) ! - ! ... each q /= gamma works on a different directory. We create them - ! here and copy the charge density inside + ! ... with lqdir=.true. each q /= gamma works on a different directory. + ! We create them here and copy the charge density inside ! IF ((.NOT.lgamma.OR. newgrid).AND.lqdir) THEN tmp_dir_phq= TRIM (tmp_dir_ph) //TRIM(prefix)//& @@ -366,7 +366,7 @@ SUBROUTINE check_initial_status(auxdyn) ! directories and created by the diffent images in the phsave directory ! of the image 0 ! - USE io_files, ONLY : tmp_dir, xmlpun, prefix + USE io_files, ONLY : tmp_dir, xmlpun_base, prefix USE control_ph, ONLY : tmp_dir_ph USE save_ph, ONLY : tmp_dir_save USE disp, ONLY : nqs, comp_irr_iq, rep_iq @@ -389,15 +389,17 @@ SUBROUTINE check_initial_status(auxdyn) DO iq=1,nqs DO irr=0, rep_iq(iq) IF (comp_irr_iq(irr,iq)==1.and.ionode) THEN - file_input=TRIM( tmp_dir_ph ) // & - & TRIM( prefix ) // '.phsave' // '/' // TRIM( xmlpun ) & + file_input=TRIM( tmp_dir_ph ) // '/' // & + & TRIM( prefix ) // '.phsave/' // & + & TRIM( xmlpun_base ) & & // '.' // TRIM(int_to_char(iq))& - & // '.' // TRIM(int_to_char(irr)) + & // '.' // TRIM(int_to_char(irr)) // '.xml' - file_output=TRIM( tmp_dir_save ) // '/' // '_ph0' // & - & TRIM( prefix ) // '.phsave' // '/' // TRIM( xmlpun ) & + file_output=TRIM( tmp_dir_save ) // '/_ph0/' // & + & TRIM( prefix ) // '.phsave/' // & + & TRIM( xmlpun_base ) & & // '.' // TRIM(int_to_char(iq))& - & // '.' // TRIM(int_to_char(irr)) + & // '.' // TRIM(int_to_char(irr)) // '.xml' INQUIRE (FILE = TRIM(file_input), EXIST = exst) IF (exst) CALL copy_file(file_input, file_output) diff --git a/PHonon/PH/dynmatrix.f90 b/PHonon/PH/dynmatrix.f90 index 3bcf60ece..d6374ccc5 100644 --- a/PHonon/PH/dynmatrix.f90 +++ b/PHonon/PH/dynmatrix.f90 @@ -138,6 +138,7 @@ subroutine dynmatrix(iq_) RETURN ENDIF ENDDO + ldiag_loc=.TRUE. ENDIF ! ! Generates the star of q diff --git a/PHonon/PH/phq_setup.f90 b/PHonon/PH/phq_setup.f90 index de3a0c13e..26ad5da12 100644 --- a/PHonon/PH/phq_setup.f90 +++ b/PHonon/PH/phq_setup.f90 @@ -550,7 +550,11 @@ subroutine phq_setup ! ! Initialize done_irr, find max dimension of the irreps ! - all_comp = nat_todo.eq.nat.or.lgamma_gamma + all_comp=.true. + DO irr=1,nirr + IF (comp_irr(irr)==0) all_comp=.false. + ENDDO + all_comp = all_comp.OR.lgamma_gamma all_done = .FALSE. npertx = 0 done_irr = 0