! ------------------------------------------------------------- ! 
      subroutine x_skflg_c(msgtype, nproc, tids) 
! ------------------------------------------------------------- ! 
! Purpose: Sends kill flag to child process
! ------------------------------------------------------------- !

      implicit none
      include 'fpvm3.h'
      integer :: i 
      integer :: info
      integer :: istat
      integer :: msgtype
      integer :: nproc
      integer, dimension(0:32) :: tids

!     Sending kill command to slaves (istat=0)
      istat=0
      do i=0,(nproc-1)
         call pvmfinitsend( PVMDEFAULT, info )
         call pvmfpack( INTEGER4, istat, 1, 1, info )
         call pvmfsend( tids(i), msgtype, info )
         print*,'Kill notice from proc =',i,' has been sent!'
      enddo

      end

