#!/bin/csh
# This is the main MMSQ procedure.
#
#----------------------------------------------------------------------
#
if !(-f square.his) then
	echo square.his file must be present
	exit
endif 
if !(-f square.bin) then
	echo square.bin file must be present
	exit
endif 
if !(-f square.dat) then
	echo square.dat file must be present
	exit
endif 
set mm_version=$1
while (1)
	if (-f please.stop) exit
	set newjob="nojob"
	mmstart
        if (-f symbols.csh) then
		source ./symbols.csh
		rm symbols.csh
	endif
	if ($newjob == "nojob") exit
	mmins $newjob
	rm $newjob.dat
	mmrun $newjob $mm_version
	rm $newjob.ins
	mmfinish $newjob $jobi $jobj
end
