! !-------------------------------------------------------- subroutine readwfc ( ipool, recn, evc0 ) !-------------------------------------------------------- ! ! open wfc files as direct access, read, ad close again ! ! Feliciano Giustino, UC Berkeley ! !------------------------------------------------------------- ! #include "f_defs.h" use io_files, only : prefix, tmp_dir use units_ph, only : lrwfc, iuwfc use kinds, only : DP use wvfct, only : npwx use pwcom #ifdef __PARA use mp_global,only : nproc, nproc_pool, me_pool, mpime use para, only : nprocp, mypool use mp_global,only : npool #endif ! implicit none integer :: recn, ipool ! kpoint number ! poolfile to be read (not used in serial case) complex(kind=DP) :: evc0 ( npwx, nbnd ) character (len=3) :: nd_nmbr0 ! node number for shuffle ! integer :: unf_recl character (len=256) :: tempfile ! ! open the wfc file, read and close ! call set_ndnmbr ( ipool, me_pool, nprocp, npool, nd_nmbr0) tempfile = trim(tmp_dir) // trim(prefix) // '.wfc' // nd_nmbr0 unf_recl = DIRECT_IO_FACTOR * lrwfc ! open (iuwfc, file = tempfile, form = 'unformatted', & access = 'direct', recl = unf_recl) read (iuwfc, rec = recn) evc0 close (iuwfc, status = 'keep') ! ! return end subroutine readwfc !-------------------------------------------------------- !