! --------------------------------------------------------- !
      subroutine mm_sdat_ms(msgtype,exec)
! --------------------------------------------------------- !
! Purpose: Reading in of data for multi-component 
!          calculations and spawning of atomic kinetic 
!          elements.
! --------------------------------------------------------- !
      use communicate
      use gmm
      use ttime
      use stopwatch

      implicit none
      integer, intent(in) :: msgtype
      character(len=30), intent(in) :: exec 
      character(len=10) :: cmytid
      integer :: unitnum
      character(len=70) :: envstring
      character(len=30) :: ctemp

      include 'fpvm3.h'
      external fbuff

      cmytid = get_cmytid()
      call pk(idiag)
      call pk(maxiter)
!     call pk(fdna)
      call pk(hnu1)
      call pk(hnu2)
      call pk(fwhm)
      call pk(eps)
      call pk(elmt,66)
      call pk(itd)
      if(itd.eq.1)then
         call pk(time)
         envstring = 'WORKDIR'
         unitnum = 25
         ctemp = 'td_data.out'//cmytid
         call openf(unitnum,ctemp,envstring) 
      endif
      call destin( msgtype, exec )

      end
