
c=====================================================================
c ==================================================
c         Copyright And License Agreement
c ==================================================
c
c MMSQ Version 1.0, 4th of april 1991.
c
c You may copy and distribute copies of the complete MMSQ source
c code as you receive it, in any medium, provided that you
c conspicuously and appropriately publish on each file a valid
c copyright notice "Copyright (C) 1991 Rob Hooft, Utrecht
c University"; keep intact the notices on all files that refer to
c this License Agreement and give other recipients of MMSQ a copy
c of this license agreement along with the program. You may charge
c a distribution fee for the physical act of transferring a copy. 
c
c You may copy and distribute MMSQ in object code or executable
c form under the terms mentioned above provided that you also
c accompany it with the complete corresponding machine-readable
c source code, which must also be distributed under the terms
c mentioned above.
c
c You may not copy, sublicense, distribute or transfer MMSQ except 
c as expressly provided under this license agreement.
c
c (This license agreement has been modelled after the 
c GNU GENERAL PUBLIC LICENSE)
c
c=====================================================================
      program mmstart
      character*3 k1s,k2s
      logical not_busy1,not_busy2,not_busy3,not_busy4

c======== Variables and Readin of SQUARE.DAT parameters.==========

      include 'square.inc'

c=================Now create next job input.======================

      call waitbinfile(2)

      energy_low=max_energy
      k1=-1
      k2=-1
      kk1=-1
      kk2=-1
      do j1=0,i1
        do j2=0,i2
          nr=(i2+1)*j1+j2+1
          read(2,rec=nr) rec
          write(*,*) 'Record ',nr,j1,j2
          write(*,*) ' Busy : ',rec.busy1h,rec.busy1l
          write(*,*) ' Done : ',rec.done1h,rec.done1l
          write(*,*) ' Ener : ',rec.total_energy
        enddo
      enddo
      end
