#/usr/cs/bin/csh
date >results/witness
who | cat >>results/witness
ps -a | cat >> results/witness

set nproc = (2 5 12 1)
set exampconst_otl = ()
#set exampconst_otl = (ex_from_TraDon89/Arnborg5 ex_from_BGK86/Trinks1 ex_from_BGK86/Trinks2 ex_from_BGK86/Katsura4 )
set exampconst_otr = ()
#set exampconst_otr = (ex_from_TraDon89/Arnborg5 ex_from_BGK86/Trinks1 ex_from_BGK86/Trinks2 ex_from_BGK86/Butcher ex_from_TraDon89/Valla)
set exampconst_ol = (ex_from_TraDon89/Arnborg4 ex_from_BGK86/Trinks1 ex_from_BGK86/Trinks2 ex_from_TraDon89/Robbiano)
#set exampconst_ol = ()

set ex = ($exampconst_otl)
while ($#ex > 0)
	set np = ($nproc)	
	while ($#np > 0)
		bin/gbas_p -otl -v0 -a0 -w${np[1]} <examples/$ex[1] > results/$ex[1].otl.a0.w$np[1]
		shift np
	end

	set np = ($nproc)
	while ($#np > 0)
		bin/gbas_p -otl -v0 -a1 -w${np[1]} <examples/$ex[1] > results/$ex[1].otl.a1.w$np[1]
		shift np
	end

	shift ex
end



set ex = ($exampconst_otr)

while ($#ex > 0)

	set np = ($nproc)
	while ($#np > 0)
		bin/gbas_p -otr -v0 -a0 -w${np[1]} <examples/$ex[1] > results/$ex[1].otr.a0.w$np[1]
		shift np
	end

	set np = ($nproc)
	while ($#np > 0)
		bin/gbas_p -otr -v0 -a1 -w${np[1]} <examples/$ex[1] > results/$ex[1].otr.a1.w$np[1]
		shift np
	end

	shift ex
end


set ex = ($exampconst_ol)

while ($#ex > 0)

	set np = ($nproc)
	while ($#np > 0)
		bin/gbas_p -ol -v0 -a0 -w${np[1]} <examples/$ex[1] > results/$ex[1].ol.a0.w$np[1]
		shift np
	end

	set np = ($nproc)
	while ($#np > 0)
		bin/gbas_p -ol -v0 -a1 -w${np[1]} <examples/$ex[1] > results/$ex[1].ol.a1.w$np[1]
		shift np
	end

	shift ex
end


unset nproc
unset np
unset exampconst_otl
unset ex
	
