
! Copyright (C) 2021 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

subroutine putxnorm(iq,xnorm)
use modmain
use modphonon
implicit none
! arguments
integer, intent(in) :: iq
real(8), intent(in) :: xnorm(nbph)
! local variables
integer recl
! find the record length
inquire(iolength=recl) vql(:,iq),nbph,xnorm
!$OMP CRITICAL(u334)
open(334,file='XNORM.OUT',form='UNFORMATTED',access='DIRECT',recl=recl)
write(334,rec=iq) vql(:,iq),nbph,xnorm
close(334)
!$OMP END CRITICAL(u334)
end subroutine

