#!/bin/csh
#
set echo
#
f77 -c type.f >& compiler.txt
if ( $status != 0 ) then
  echo "Errors compiling type.f"
  exit
endif
rm compiler.txt
#
f77 type.o -lmpi
if ( $status != 0 ) then
  echo "Errors linking and loading type.o"
  exit
endif
rm type.o
#
mv a.out type
mpirun -v -np 4 ./type > type_output.txt
if ( $status != 0 ) then
  echo "Errors running type"
  exit
endif
rm type
#
echo "The type test problem has been executed."
