Initial revision.

This commit is contained in:
falgout 1996-08-12 19:46:08 +00:00
parent c31bb571bc
commit 8b84095746
16 changed files with 736 additions and 0 deletions

View File

@ -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

28
seq_linear_solvers/amg/build Executable file
View File

@ -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
#=============================================================================

View File

@ -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 <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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,13 @@
#=============================================================================
# Configuration file for Irix systems
#=============================================================================
#=============================================================================
# Tools
#=============================================================================
#=============================================================================
# AMG
#=============================================================================

View File

@ -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

View File

@ -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

46
seq_ls/amg/amg/build Executable file
View File

@ -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

28
seq_ls/amg/build Executable file
View File

@ -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
#=============================================================================

138
seq_ls/amg/config/build_generic Executable file
View File

@ -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 <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

View File

@ -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

38
seq_ls/amg/config/getarch Executable file
View File

@ -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

View File

@ -0,0 +1,13 @@
#=============================================================================
# Configuration file for Irix systems
#=============================================================================
#=============================================================================
# Tools
#=============================================================================
#=============================================================================
# AMG
#=============================================================================

View File

@ -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

View File

@ -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