      subroutine exact_init ! Bernd Berg Apr 07 2012.
C Initialization of scalar field MCMC simulation.
      include '../../Libs/Fortran/implicit.sta'
      character cd*1,clx*3,clt*3
      include '../../Libs/Fortran/constants.par'
      include '../../Libs/Fortran_par/lat.par'
      include '../../Libs/Fortran_par/mc.par'
      parameter(miuo=-iuo)
      include '../../Libs/Fortran_par/common_exactl.f'
      include '../../Libs/Scalar_par/common_scalar.f'
      dimension ix(nd)
      ltest=.true.
      ltest=.false.
C     if(ltest) stop "exact_init: ltest."
C
      write(iuo,'(/,2X,"exact_init: ")')
      write(iuo,'(4x,"parameters (lat.dat,lat.par):")')
      write(iuo,'(6x,"lattice dimension:",I10)') nd
      write(iuo,'(6x,"# lattice sites:  ",I10)') ms
      write(iuo,'(6x,"nla:",8I6)') nla
      write(iuo,'(6x,"mlink,np:",2I12)') mlink,np
      ns=nsfun(nla,nd)
      if(ns.ne.ms) stop "exact_init: lat.par and lat.dat mismatch."
      write(iuo,'(4x,"parameters (mc.par):")')
      write(iuo,'(6x,"nequi:         ",4I10)') nequi
      write(iuo,'(6x,"nrpt,nmeas,nsw:",3I10)') nrpt,nmeas,nsw
      write(iuo,'(6x,"xm,xm2,xmfactor =",5X,3F12.6)') xm,xm2,xmfactor
      a2=sqrt(two*xmfactor)
      write(iuo,'(6x,"a2=sqrt(2*xmfactor) =",F10.6)') a2
      write(iuo,'(6x,"iuo,iud1:",2I4,2I7)') iuo,iud1
C
      write(cd,'(I1.1)') nd
      write(clx,'(I3.3)') nla(1)
      write(clt,'(I3.3)') nla(nd)
c Prepare file name:
      write(cfile,'(A,"d",A,"x",A,"t")') cd,clx,clt
      write(iuo,'(4X,"Data filename: ",2A,".D")') cfln,cfile
C
      call lat_init(ms,nd,ipf,ipb,nla,ix) ! lattice.
C
      write(iuo,'(2X,"scalar_init: initialization done.",/)')
      return
      end