
! 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 putvnorm(ik,vnorm)
use modmain
use modphonon
implicit none
! arguments
integer, intent(in) :: ik
real(8), intent(in) :: vnorm(nstsv)
! local variables
integer recl
! find the record length
inquire(iolength=recl) vkl(:,ik),nstsv,vnorm
!$OMP CRITICAL(u324)
open(324,file='VNORM.OUT',form='UNFORMATTED',access='DIRECT',recl=recl)
write(324,rec=ik) vkl(:,ik),nstsv,vnorm
close(324)
!$OMP END CRITICAL(u324)
end subroutine

