diff --git a/PHonon/PH/alpha2f.f90 b/PHonon/PH/alpha2f.f90 index ddf4f0207..d77691e32 100644 --- a/PHonon/PH/alpha2f.f90 +++ b/PHonon/PH/alpha2f.f90 @@ -380,7 +380,7 @@ PROGRAM alpha2f USE mp_global, ONLY : mp_startup, mp_global_end USE environment, ONLY : environment_start, environment_end USE elph_tetra_mod, ONLY : in_alpha2f - USE io_global, ONLY : ionode + USE io_global, ONLY : qestdin, ionode ! USE alpha2f_vals, ONLY : nfreq USE alpha2f_routines, ONLY : read_lam, compute_a2f, compute_lambda, read_polarization @@ -388,6 +388,7 @@ PROGRAM alpha2f implicit none ! CHARACTER (LEN=256) :: auxdyn + INTEGER :: ios ! NAMELIST /INPUTA2F/ nfreq ! @@ -399,7 +400,7 @@ PROGRAM alpha2f ! CALL phq_readin() ! - IF(ionode) READ( 5, INPUTA2F) + IF(ionode) READ( qestdin, INPUTA2F ) ! CALL check_initial_status(auxdyn) ! diff --git a/PHonon/PH/phq_readin.f90 b/PHonon/PH/phq_readin.f90 index 9e98aaf49..af47abb8b 100644 --- a/PHonon/PH/phq_readin.f90 +++ b/PHonon/PH/phq_readin.f90 @@ -927,9 +927,9 @@ SUBROUTINE phq_readin() ENDIF nat_todo_input=nat_todo ! - ! end of reading, close unit qestdin, remove tenporary input file if existing - ! - IF (meta_ionode) ios = close_input_file () + ! end of reading, close unit qestdin, remove temporary input file if existing + ! FIXME: closing input file here breaks alpha2F.x that reads what follows + !!! IF (meta_ionode) ios = close_input_file () IF (epsil.AND.(lgauss .OR. ltetra)) & CALL errore ('phq_readin', 'no elec. field with metals', 1)