From 8b84095746893269110728f5f0afc939958de3a1 Mon Sep 17 00:00:00 2001 From: falgout Date: Mon, 12 Aug 1996 19:46:08 +0000 Subject: [PATCH] Initial revision. --- seq_linear_solvers/amg/amg/build | 46 ++++++ seq_linear_solvers/amg/build | 28 ++++ seq_linear_solvers/amg/config/build_generic | 138 ++++++++++++++++++ seq_linear_solvers/amg/config/defaults.config | 55 +++++++ seq_linear_solvers/amg/config/getarch | 38 +++++ seq_linear_solvers/amg/config/irix.config | 13 ++ seq_linear_solvers/amg/config/solaris.config | 25 ++++ seq_linear_solvers/amg/config/sunos.config | 25 ++++ seq_ls/amg/amg/build | 46 ++++++ seq_ls/amg/build | 28 ++++ seq_ls/amg/config/build_generic | 138 ++++++++++++++++++ seq_ls/amg/config/defaults.config | 55 +++++++ seq_ls/amg/config/getarch | 38 +++++ seq_ls/amg/config/irix.config | 13 ++ seq_ls/amg/config/solaris.config | 25 ++++ seq_ls/amg/config/sunos.config | 25 ++++ 16 files changed, 736 insertions(+) create mode 100755 seq_linear_solvers/amg/amg/build create mode 100755 seq_linear_solvers/amg/build create mode 100755 seq_linear_solvers/amg/config/build_generic create mode 100644 seq_linear_solvers/amg/config/defaults.config create mode 100755 seq_linear_solvers/amg/config/getarch create mode 100644 seq_linear_solvers/amg/config/irix.config create mode 100644 seq_linear_solvers/amg/config/solaris.config create mode 100644 seq_linear_solvers/amg/config/sunos.config create mode 100755 seq_ls/amg/amg/build create mode 100755 seq_ls/amg/build create mode 100755 seq_ls/amg/config/build_generic create mode 100644 seq_ls/amg/config/defaults.config create mode 100755 seq_ls/amg/config/getarch create mode 100644 seq_ls/amg/config/irix.config create mode 100644 seq_ls/amg/config/solaris.config create mode 100644 seq_ls/amg/config/sunos.config diff --git a/seq_linear_solvers/amg/amg/build b/seq_linear_solvers/amg/amg/build new file mode 100755 index 000000000..fb498f92a --- /dev/null +++ b/seq_linear_solvers/amg/amg/build @@ -0,0 +1,46 @@ +#!/bin/sh + +#=========================================================================== +# This script builds the AMG code +#=========================================================================== + +. $AMG_SRC/config/build_generic + +#============================================================================= +# Build +#============================================================================= + +AMG_PROGRAM=amg + +$AMG_MAKE + +#============================================================================= +# Install +#============================================================================= + +if [ "$AMG_INSTALL_FLAG" ] +then + AMG_BIN=$AMG_DIR/bin + + if [ ! -d $AMG_BIN ] + then + $AMG_MKDIR $AMG_BIN + fi + + $AMG_INSTALL $AMG_SRC/amg/$AMG_PROGRAM $AMG_BIN/. +fi + +#============================================================================= +# Clean +#============================================================================= + +if [ "$AMG_CLEAN_FLAG" ] +then + rm -f *.o +fi + +if [ "$AMG_VERYCLEAN_FLAG" ] +then + rm -f $AMG_PROGRAM +fi + diff --git a/seq_linear_solvers/amg/build b/seq_linear_solvers/amg/build new file mode 100755 index 000000000..38cad5cf0 --- /dev/null +++ b/seq_linear_solvers/amg/build @@ -0,0 +1,28 @@ +#!/bin/sh + +#=========================================================================== +# This script builds all of the code in the AMG directory structure +#=========================================================================== + +. $AMG_SRC/config/build_generic + +#============================================================================= +# Build +#============================================================================= + +DIRS="tools amg" + +for i in $DIRS +do + echo "Building $i" + (cd $AMG_SRC/$i; ./build) +done + +#============================================================================= +# Install +#============================================================================= + +#============================================================================= +# Clean +#============================================================================= + diff --git a/seq_linear_solvers/amg/config/build_generic b/seq_linear_solvers/amg/config/build_generic new file mode 100755 index 000000000..27040de90 --- /dev/null +++ b/seq_linear_solvers/amg/config/build_generic @@ -0,0 +1,138 @@ + +SHELL=/bin/sh +export SHELL + +#============================================================================= +# Parse generic arguments +#============================================================================= + +if [ -n "$1" ] +then + + AMG_ARGS="" + AMG_ALL_FLAG=1 + + while [ -n "$1" ] + do + case $1 in + -h|-help) + echo "$0 [ARGS] [install|clean|all] " + echo "" + echo "all builds but does not install" + echo "install builds and installs" + echo "clean cleans temporary build files (e.g. *.o)" + echo "veryclean cleans everything" + echo "" + echo "ARGS:" + echo "-arch architecture of the machine" + echo "-g debug" + exit 0;; + all) + shift;; + install) + AMG_INSTALL_FLAG=1 + shift;; + clean) + AMG_CLEAN_FLAG=1 + AMG_ALL_FLAG="" + shift;; + veryclean) + AMG_CLEAN_FLAG=1 + AMG_VERYCLEAN_FLAG=1 + AMG_ALL_FLAG="" + shift;; + -arch) + AMG_ARCH=$2 + shift 2;; + -port) + AMG_PORT=$2 + shift 2;; + -g) + AMG_DEBUG_FLAG=1 + shift;; + *) + AMG_ARGS="$AMG_ARGS $1" + shift;; + esac + done + + export \ + AMG_ALL_FLAG \ + AMG_INSTALL_FLAG \ + AMG_CLEAN_FLAG \ + AMG_VERYCLEAN_FLAG \ + AMG_ARCH \ + AMG_DEBUG_FLAG \ + AMG_ARGS + +fi + +#============================================================================= +# Determine the architecture and port +#============================================================================= + +if [ -z "$AMG_ARCH" ] +then + . $AMG_SRC/config/getarch +fi + +if [ -z "$AMG_ARCH" ] +then + echo "I don't know what architecture I am on." + echo "Please specify with the -arch option." + exit 1 +fi + +#============================================================================= +# Record the last arch built on +#============================================================================= + +if [ -f .current_arch ] +then + AMG_OLD_ARCH=`cat .current_arch` +else + AMG_OLD_ARCH="NONE" +fi +echo "$AMG_ARCH" > .current_arch + +export AMG_OLD_ARCH AMG_ARCH + +#============================================================================= +# Set configurations +#============================================================================= + +. $AMG_SRC/config/defaults.config + +if [ -f $AMG_SRC/config/$AMG_ARCH.config ] +then + . $AMG_SRC/config/$AMG_ARCH.config +else + echo "Can't find config file: using the defaults" +fi + +#============================================================================= +# Install +#============================================================================= + +if [ "$AMG_INSTALL_FLAG" ] +then + if [ -z "$AMG_DIR" ]; then + echo "Error: set the AMG_DIR environment variable" + exit 1 + fi + + if [ ! -d $AMG_DIR ] + then + $AMG_MKDIR $AMG_DIR + fi +fi + +#============================================================================= +# Clean +#============================================================================= + +if [ "$AMG_CLEAN_FLAG" ] +then + rm -f .current_arch +fi + diff --git a/seq_linear_solvers/amg/config/defaults.config b/seq_linear_solvers/amg/config/defaults.config new file mode 100644 index 000000000..9611b7c27 --- /dev/null +++ b/seq_linear_solvers/amg/config/defaults.config @@ -0,0 +1,55 @@ +#============================================================================= +# Defaults for everything +# +# If user does not set these in a configuration file then these values +# will be used. +#============================================================================= + +#============================================================================= +# Commands +#============================================================================= + +AMG_INSTALL="cp -p" +AMG_MKDIR="mkdir" + +export AMG_MKDIR AMG_INSTALL + +#============================================================================= +# Tools +#============================================================================= + +AMGTOOLS_CC="cc" +AMGTOOLS_F77="f77" +AMGTOOLS_OPT="-O" +AMGTOOLS_DEBUG="-g" +AMGTOOLS_F77_OPT="-O" +AMGTOOLS_F77_DEBUG="-g" +AMGTOOLS_LIBS="-lm" +AMGTOOLS_INCLUDE="" +AMGTOOLS_MAKE="make" + +export AMGTOOLS_INCLUDE AMGTOOLS_LIBS AMGTOOLS_DEF AMGTOOLS_OPT AMGTOOLS_DEBUG +export AMGTOOLS_MAKE AMGTOOLS_CC AMGTOOLS_F77 + +export AMGTOOLS_CC AMGTOOLS_F77 +export AMGTOOLS_OPT AMGTOOLS_DEBUG AMGTOOLS_F77_OPT AMGTOOLS_F77_DEBUG +export AMGTOOLS_LIBS AMGTOOLS_INCLUDE AMGTOOLS_MAKE + +#============================================================================= +# AMG +#============================================================================= + +AMG_CC="cc" +AMG_F77="f77" +AMG_OPT="-O" +AMG_DEBUG="-g" +AMG_F77_OPT="-O" +AMG_F77_DEBUG="-g" +AMG_LIBS="-lm" +AMG_INCLUDE="" +AMG_MAKE="make" + +export AMG_CC AMG_F77 +export AMG_OPT AMG_DEBUG AMG_F77_OPT AMG_F77_DEBUG +export AMG_LIBS AMG_INCLUDE AMG_MAKE + diff --git a/seq_linear_solvers/amg/config/getarch b/seq_linear_solvers/amg/config/getarch new file mode 100755 index 000000000..0e445543f --- /dev/null +++ b/seq_linear_solvers/amg/config/getarch @@ -0,0 +1,38 @@ +#!/bin/sh + +#============================================================================= +# This Script attempts to determine the architecture to use. +#============================================================================= + +AMG_OS="" +AMG_ARCH="" + +#============================================================================= +# Determine the OS +#============================================================================= + +if [ -f /bin/uname ] +then + AMG_OS="`/bin/uname -s`" + AMG_OS_Release="`/bin/uname -r`" +fi + +#============================================================================= +# Based on what we found from system queries set AMG_ARCH +#============================================================================= + +if [ -z "$AMG_ARCH" ] +then + case "$AMG_OS" in + SunOS) + case "$AMG_OS_Release" in + 4.1.3) AMG_ARCH="sunos";; + 5.4) AMG_ARCH="solaris";; + esac;; + IRIX) + AMG_ARCH="irix";; + esac +fi + +export AMG_ARCH + diff --git a/seq_linear_solvers/amg/config/irix.config b/seq_linear_solvers/amg/config/irix.config new file mode 100644 index 000000000..c32d005ff --- /dev/null +++ b/seq_linear_solvers/amg/config/irix.config @@ -0,0 +1,13 @@ + +#============================================================================= +# Configuration file for Irix systems +#============================================================================= + +#============================================================================= +# Tools +#============================================================================= + +#============================================================================= +# AMG +#============================================================================= + diff --git a/seq_linear_solvers/amg/config/solaris.config b/seq_linear_solvers/amg/config/solaris.config new file mode 100644 index 000000000..ac44babf1 --- /dev/null +++ b/seq_linear_solvers/amg/config/solaris.config @@ -0,0 +1,25 @@ + +#============================================================================= +# Configuration file for Sun SunOS systems +#============================================================================= + +#============================================================================= +# Tools +#============================================================================= + +AMGTOOLS_CC="gcc" +AMGTOOLS_INCLUDE="-I/usr/local/include" +AMGTOOLS_LIBS="-L/usr/local/lib -lm" + +export AMGTOOLS_CC AMGTOOLS_INCLUDE AMGTOOLS_LIBS + +#============================================================================= +# AMG +#============================================================================= + +AMG_CC="gcc" +AMG_INCLUDE="-I/usr/local/include" +AMG_LIBS="-L/usr/local/lib -lm" + +export AMG_CC AMG_INCLUDE AMG_LIBS + diff --git a/seq_linear_solvers/amg/config/sunos.config b/seq_linear_solvers/amg/config/sunos.config new file mode 100644 index 000000000..ac44babf1 --- /dev/null +++ b/seq_linear_solvers/amg/config/sunos.config @@ -0,0 +1,25 @@ + +#============================================================================= +# Configuration file for Sun SunOS systems +#============================================================================= + +#============================================================================= +# Tools +#============================================================================= + +AMGTOOLS_CC="gcc" +AMGTOOLS_INCLUDE="-I/usr/local/include" +AMGTOOLS_LIBS="-L/usr/local/lib -lm" + +export AMGTOOLS_CC AMGTOOLS_INCLUDE AMGTOOLS_LIBS + +#============================================================================= +# AMG +#============================================================================= + +AMG_CC="gcc" +AMG_INCLUDE="-I/usr/local/include" +AMG_LIBS="-L/usr/local/lib -lm" + +export AMG_CC AMG_INCLUDE AMG_LIBS + diff --git a/seq_ls/amg/amg/build b/seq_ls/amg/amg/build new file mode 100755 index 000000000..fb498f92a --- /dev/null +++ b/seq_ls/amg/amg/build @@ -0,0 +1,46 @@ +#!/bin/sh + +#=========================================================================== +# This script builds the AMG code +#=========================================================================== + +. $AMG_SRC/config/build_generic + +#============================================================================= +# Build +#============================================================================= + +AMG_PROGRAM=amg + +$AMG_MAKE + +#============================================================================= +# Install +#============================================================================= + +if [ "$AMG_INSTALL_FLAG" ] +then + AMG_BIN=$AMG_DIR/bin + + if [ ! -d $AMG_BIN ] + then + $AMG_MKDIR $AMG_BIN + fi + + $AMG_INSTALL $AMG_SRC/amg/$AMG_PROGRAM $AMG_BIN/. +fi + +#============================================================================= +# Clean +#============================================================================= + +if [ "$AMG_CLEAN_FLAG" ] +then + rm -f *.o +fi + +if [ "$AMG_VERYCLEAN_FLAG" ] +then + rm -f $AMG_PROGRAM +fi + diff --git a/seq_ls/amg/build b/seq_ls/amg/build new file mode 100755 index 000000000..38cad5cf0 --- /dev/null +++ b/seq_ls/amg/build @@ -0,0 +1,28 @@ +#!/bin/sh + +#=========================================================================== +# This script builds all of the code in the AMG directory structure +#=========================================================================== + +. $AMG_SRC/config/build_generic + +#============================================================================= +# Build +#============================================================================= + +DIRS="tools amg" + +for i in $DIRS +do + echo "Building $i" + (cd $AMG_SRC/$i; ./build) +done + +#============================================================================= +# Install +#============================================================================= + +#============================================================================= +# Clean +#============================================================================= + diff --git a/seq_ls/amg/config/build_generic b/seq_ls/amg/config/build_generic new file mode 100755 index 000000000..27040de90 --- /dev/null +++ b/seq_ls/amg/config/build_generic @@ -0,0 +1,138 @@ + +SHELL=/bin/sh +export SHELL + +#============================================================================= +# Parse generic arguments +#============================================================================= + +if [ -n "$1" ] +then + + AMG_ARGS="" + AMG_ALL_FLAG=1 + + while [ -n "$1" ] + do + case $1 in + -h|-help) + echo "$0 [ARGS] [install|clean|all] " + echo "" + echo "all builds but does not install" + echo "install builds and installs" + echo "clean cleans temporary build files (e.g. *.o)" + echo "veryclean cleans everything" + echo "" + echo "ARGS:" + echo "-arch architecture of the machine" + echo "-g debug" + exit 0;; + all) + shift;; + install) + AMG_INSTALL_FLAG=1 + shift;; + clean) + AMG_CLEAN_FLAG=1 + AMG_ALL_FLAG="" + shift;; + veryclean) + AMG_CLEAN_FLAG=1 + AMG_VERYCLEAN_FLAG=1 + AMG_ALL_FLAG="" + shift;; + -arch) + AMG_ARCH=$2 + shift 2;; + -port) + AMG_PORT=$2 + shift 2;; + -g) + AMG_DEBUG_FLAG=1 + shift;; + *) + AMG_ARGS="$AMG_ARGS $1" + shift;; + esac + done + + export \ + AMG_ALL_FLAG \ + AMG_INSTALL_FLAG \ + AMG_CLEAN_FLAG \ + AMG_VERYCLEAN_FLAG \ + AMG_ARCH \ + AMG_DEBUG_FLAG \ + AMG_ARGS + +fi + +#============================================================================= +# Determine the architecture and port +#============================================================================= + +if [ -z "$AMG_ARCH" ] +then + . $AMG_SRC/config/getarch +fi + +if [ -z "$AMG_ARCH" ] +then + echo "I don't know what architecture I am on." + echo "Please specify with the -arch option." + exit 1 +fi + +#============================================================================= +# Record the last arch built on +#============================================================================= + +if [ -f .current_arch ] +then + AMG_OLD_ARCH=`cat .current_arch` +else + AMG_OLD_ARCH="NONE" +fi +echo "$AMG_ARCH" > .current_arch + +export AMG_OLD_ARCH AMG_ARCH + +#============================================================================= +# Set configurations +#============================================================================= + +. $AMG_SRC/config/defaults.config + +if [ -f $AMG_SRC/config/$AMG_ARCH.config ] +then + . $AMG_SRC/config/$AMG_ARCH.config +else + echo "Can't find config file: using the defaults" +fi + +#============================================================================= +# Install +#============================================================================= + +if [ "$AMG_INSTALL_FLAG" ] +then + if [ -z "$AMG_DIR" ]; then + echo "Error: set the AMG_DIR environment variable" + exit 1 + fi + + if [ ! -d $AMG_DIR ] + then + $AMG_MKDIR $AMG_DIR + fi +fi + +#============================================================================= +# Clean +#============================================================================= + +if [ "$AMG_CLEAN_FLAG" ] +then + rm -f .current_arch +fi + diff --git a/seq_ls/amg/config/defaults.config b/seq_ls/amg/config/defaults.config new file mode 100644 index 000000000..9611b7c27 --- /dev/null +++ b/seq_ls/amg/config/defaults.config @@ -0,0 +1,55 @@ +#============================================================================= +# Defaults for everything +# +# If user does not set these in a configuration file then these values +# will be used. +#============================================================================= + +#============================================================================= +# Commands +#============================================================================= + +AMG_INSTALL="cp -p" +AMG_MKDIR="mkdir" + +export AMG_MKDIR AMG_INSTALL + +#============================================================================= +# Tools +#============================================================================= + +AMGTOOLS_CC="cc" +AMGTOOLS_F77="f77" +AMGTOOLS_OPT="-O" +AMGTOOLS_DEBUG="-g" +AMGTOOLS_F77_OPT="-O" +AMGTOOLS_F77_DEBUG="-g" +AMGTOOLS_LIBS="-lm" +AMGTOOLS_INCLUDE="" +AMGTOOLS_MAKE="make" + +export AMGTOOLS_INCLUDE AMGTOOLS_LIBS AMGTOOLS_DEF AMGTOOLS_OPT AMGTOOLS_DEBUG +export AMGTOOLS_MAKE AMGTOOLS_CC AMGTOOLS_F77 + +export AMGTOOLS_CC AMGTOOLS_F77 +export AMGTOOLS_OPT AMGTOOLS_DEBUG AMGTOOLS_F77_OPT AMGTOOLS_F77_DEBUG +export AMGTOOLS_LIBS AMGTOOLS_INCLUDE AMGTOOLS_MAKE + +#============================================================================= +# AMG +#============================================================================= + +AMG_CC="cc" +AMG_F77="f77" +AMG_OPT="-O" +AMG_DEBUG="-g" +AMG_F77_OPT="-O" +AMG_F77_DEBUG="-g" +AMG_LIBS="-lm" +AMG_INCLUDE="" +AMG_MAKE="make" + +export AMG_CC AMG_F77 +export AMG_OPT AMG_DEBUG AMG_F77_OPT AMG_F77_DEBUG +export AMG_LIBS AMG_INCLUDE AMG_MAKE + diff --git a/seq_ls/amg/config/getarch b/seq_ls/amg/config/getarch new file mode 100755 index 000000000..0e445543f --- /dev/null +++ b/seq_ls/amg/config/getarch @@ -0,0 +1,38 @@ +#!/bin/sh + +#============================================================================= +# This Script attempts to determine the architecture to use. +#============================================================================= + +AMG_OS="" +AMG_ARCH="" + +#============================================================================= +# Determine the OS +#============================================================================= + +if [ -f /bin/uname ] +then + AMG_OS="`/bin/uname -s`" + AMG_OS_Release="`/bin/uname -r`" +fi + +#============================================================================= +# Based on what we found from system queries set AMG_ARCH +#============================================================================= + +if [ -z "$AMG_ARCH" ] +then + case "$AMG_OS" in + SunOS) + case "$AMG_OS_Release" in + 4.1.3) AMG_ARCH="sunos";; + 5.4) AMG_ARCH="solaris";; + esac;; + IRIX) + AMG_ARCH="irix";; + esac +fi + +export AMG_ARCH + diff --git a/seq_ls/amg/config/irix.config b/seq_ls/amg/config/irix.config new file mode 100644 index 000000000..c32d005ff --- /dev/null +++ b/seq_ls/amg/config/irix.config @@ -0,0 +1,13 @@ + +#============================================================================= +# Configuration file for Irix systems +#============================================================================= + +#============================================================================= +# Tools +#============================================================================= + +#============================================================================= +# AMG +#============================================================================= + diff --git a/seq_ls/amg/config/solaris.config b/seq_ls/amg/config/solaris.config new file mode 100644 index 000000000..ac44babf1 --- /dev/null +++ b/seq_ls/amg/config/solaris.config @@ -0,0 +1,25 @@ + +#============================================================================= +# Configuration file for Sun SunOS systems +#============================================================================= + +#============================================================================= +# Tools +#============================================================================= + +AMGTOOLS_CC="gcc" +AMGTOOLS_INCLUDE="-I/usr/local/include" +AMGTOOLS_LIBS="-L/usr/local/lib -lm" + +export AMGTOOLS_CC AMGTOOLS_INCLUDE AMGTOOLS_LIBS + +#============================================================================= +# AMG +#============================================================================= + +AMG_CC="gcc" +AMG_INCLUDE="-I/usr/local/include" +AMG_LIBS="-L/usr/local/lib -lm" + +export AMG_CC AMG_INCLUDE AMG_LIBS + diff --git a/seq_ls/amg/config/sunos.config b/seq_ls/amg/config/sunos.config new file mode 100644 index 000000000..ac44babf1 --- /dev/null +++ b/seq_ls/amg/config/sunos.config @@ -0,0 +1,25 @@ + +#============================================================================= +# Configuration file for Sun SunOS systems +#============================================================================= + +#============================================================================= +# Tools +#============================================================================= + +AMGTOOLS_CC="gcc" +AMGTOOLS_INCLUDE="-I/usr/local/include" +AMGTOOLS_LIBS="-L/usr/local/lib -lm" + +export AMGTOOLS_CC AMGTOOLS_INCLUDE AMGTOOLS_LIBS + +#============================================================================= +# AMG +#============================================================================= + +AMG_CC="gcc" +AMG_INCLUDE="-I/usr/local/include" +AMG_LIBS="-L/usr/local/lib -lm" + +export AMG_CC AMG_INCLUDE AMG_LIBS +