#! /bin/bash
#
gfortran -c -g -Wall upc_code_test.f90
if [ $? -ne 0 ]; then
  echo "Compile error."
  exit
fi
#
gfortran upc_code_test.o $HOME/lib/upc_code.o
if [ $? -ne 0 ]; then
  echo "Load error."
  exit
fi
rm upc_code_test.o
#
mv a.out upc_code_test
./upc_code_test > upc_code_test.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
rm upc_code_test
#
echo "Normal end of execution."
