aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryye00 <yye00@fc86f234-e40e-4302-a95b-5e02f8c343c9>2004-04-19 18:38:03 +0000
committeryye00 <yye00@fc86f234-e40e-4302-a95b-5e02f8c343c9>2004-04-19 18:38:03 +0000
commitb809c2a8d9139e2342c430584242af7570af6d5f (patch)
tree93e2bcc4f7490eec93ba53a0090da2085128182a
parentc65bb5ac5c23ed40974b04313c311032be0d2914 (diff)
Added error message support
git-svn-id: http://svn.cactuscode.org/arrangements/CactusExternal/PETSc/trunk@4 fc86f234-e40e-4302-a95b-5e02f8c343c9
-rwxr-xr-xpetsc.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/petsc.sh b/petsc.sh
index ff2472f..c898fb4 100755
--- a/petsc.sh
+++ b/petsc.sh
@@ -51,6 +51,9 @@ choose_petsc=`echo $PETSC | tr '[:upper:]' '[:lower:]'`
if [ -z "$PETSC_DIR" ]; then
CCTK_Search PETSC_DIR '/usr /usr/local /usr/local/petsc /usr/local/packages/petsc /usr/local/apps/petsc' include/petsc.h
if [ -z "$PETSC_DIR" ] ; then
+ echo "BEGIN MESSAGE"
+ echo "Unable to locate the PETSC directory, please set PETSC_DIR."
+ echo "END MESSAGE"
exit 2
fi
fi
@@ -59,6 +62,9 @@ fi
# Check what architecture is available
if [ -z "$PETSC_ARCH" ]; then
if [ ! -d "$PETSC_DIR/lib/libg" ]; then
+ echo "BEGIN MESSAGE"
+ echo "Unable to determine arch, please set PETSC_ARCH."
+ echo "END MESSAGE"
exit 2
fi
PETSC_ARCH=`/bin/ls -1 $PETSC_DIR/lib/libg | head -n1`
@@ -74,8 +80,10 @@ if [ -z "$PETSC_ARCH_LIBS" ]; then
linux-gnu) PETSC_ARCH_LIBS='mkl_lapack mkl_def guide' ;;
linux64_intel) PETSC_ARCH_LIBS='mkl_lapack mkl guide' ;;
rs6000_64) PETSC_ARCH_LIBS='essl' ;;
- *) echo " No PETSc support for architecture '$PETSC_ARCH' !"
- echo ' Please file a bug report to cactusmaint@cactuscode.org.'
+ *) echo "BEGIN MESSAGE"
+ echo "No PETSc support for architecture '$PETSC_ARCH' !"
+ echo 'Please file a bug report to cactusmaint@cactuscode.org.'
+ echo "END MESSAGE"
exit 2
esac
fi