adding autoconfig
This commit is contained in:
parent
996791e624
commit
d7e189a8ee
1726
aclocal.m4
vendored
Normal file
1726
aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
196
configure.in
Normal file
196
configure.in
Normal file
@ -0,0 +1,196 @@
|
||||
dnl *********************************************************************
|
||||
dnl configure.in
|
||||
dnl *********************************************************************
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * The first macro called must be AC_INIT with a unique file from the
|
||||
dnl * package as its argument. configure checks for the existence of this
|
||||
dnl * file to make sure it is located in the right place
|
||||
dnl *********************************************************************
|
||||
|
||||
AC_INIT(utilities/memory.c)
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * Find the compilers and preprocessors. AC_SUBST is called for each.
|
||||
dnl *********************************************************************
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * This is an example of how to set a command-line option to configure.
|
||||
dnl * This form can be used with many different macros.
|
||||
dnl *********************************************************************
|
||||
|
||||
AC_ARG_WITH(CC,
|
||||
[ --with-CC=ARG manually set C compiler to ARG],
|
||||
CC=$withval,
|
||||
[AC_PROG_CC])
|
||||
|
||||
AC_PROG_CPP dnl * usually will give you $CC -E. Should be called
|
||||
dnl * before calling AC_CHECK_HEADER or CASC_CHECK_HEADER
|
||||
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * set the variable ARCH
|
||||
dnl *********************************************************************
|
||||
|
||||
CASC_GUESS_ARCH
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * You can set debugging and optimization flags for various
|
||||
dnl * architectures and/or compilers.
|
||||
dnl *********************************************************************
|
||||
|
||||
case $ARCH in
|
||||
|
||||
sun4 | solaris)
|
||||
CASC_SET_COPT(-O)
|
||||
if test "$CC" = "gcc"; then
|
||||
CASC_SET_CDEBUG(-g -Wall)
|
||||
else
|
||||
CASC_SET_CDEBUG(-g)
|
||||
fi
|
||||
;;
|
||||
|
||||
rs6000)
|
||||
CASC_SET_COPT(-O3 -qstrict -qarch=ppcgr -qtune=604)
|
||||
CASC_SET_CDEBUG(-g)
|
||||
;;
|
||||
|
||||
*)
|
||||
CASC_SET_COPT(-O)
|
||||
CASC_SET_CDEBUG(-g)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * checks flag '--enable-opt-debug' to decide which compiler flags
|
||||
dnl * to leave on. Default is opt, if flag not invoked.
|
||||
dnl *********************************************************************
|
||||
|
||||
CASC_CHOOSE_OPT_OR_DEBUG
|
||||
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * sets MPIINCLUDES, MPILIBDIRS, MPILIBS, MPIFLAGS
|
||||
dnl *********************************************************************
|
||||
|
||||
AC_ARG_WITH(MPI,
|
||||
[ --without-MPI do not use MPI],
|
||||
if test "$withval" = "no"; then
|
||||
casc_using_mpi=no
|
||||
MEMORYEXTRAFILES="$MEMORYEXTRAFILES mpistubs.c"
|
||||
HYPREDEFS="$HYPREDEFS -DHYPRE_SEQUENTIAL"
|
||||
else
|
||||
casc_using_mpi=yes
|
||||
fi ,
|
||||
casc_using_mpi=yes )
|
||||
|
||||
if test "$casc_using_mpi" = "yes"; then
|
||||
CASC_FIND_MPI
|
||||
if test -z "$MPIINCLUDE"; then
|
||||
AC_MSG_WARN(configuring to not use MPI)
|
||||
MEMORYEXTRAFILES="$MEMORYEXTRAFILES mpistubs.c"
|
||||
HYPREDEFS="$HYPREDEFS -DHYPRE_SEQUENTIAL"
|
||||
else
|
||||
TIMERDEFS="$TIMERDEFS -DTIMER_USE_MPI"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * when debugging was chosen, look for debugging libraries and headers,
|
||||
dnl * if they are available
|
||||
dnl *
|
||||
dnl * adds -l flags to LDLIBS, adds -L flags to LDLIBDIRS, if necessary
|
||||
dnl *********************************************************************
|
||||
|
||||
if test "$OPTCHOICE" = "g"; then
|
||||
|
||||
CASC_ADD_LIB(cegdb, cegdb, /home/casc/lib, LD)
|
||||
|
||||
if test "$ARCH" != "alpha"; then
|
||||
CASC_CHECK_HEADER(dmalloc.h, /usr/include /usr/local/include \
|
||||
/home/casc/include,
|
||||
CASC_ADD_LIB(dmalloc, malloc, /home/casc/lib /usr/local/lib, LD,
|
||||
HYPREDEFS="$HYPREDEFS -DHYPRE_MEMORY_DMALLOC"
|
||||
MEMORYEXTRAFILES="$MEMORYEXTRAFILES memory_dmalloc.c"
|
||||
)
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * add flags to LIBS and LIBDIRS
|
||||
dnl *********************************************************************
|
||||
|
||||
CASC_ADD_LIB(m, main, /usr/lib /usr/ccs/lib)
|
||||
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * Note: CASC_ADD_LIB calls should be placed in the order you want the
|
||||
dnl * libraries to appear on the linking line.
|
||||
dnl *********************************************************************
|
||||
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * AC_SUBST performs the variable substitutions
|
||||
dnl * Some macros call AC_SUBST for some variables, but it does no damage
|
||||
dnl * to call it again.
|
||||
dnl *********************************************************************
|
||||
|
||||
AC_SUBST(INCLUDES)
|
||||
AC_SUBST(LIBS)
|
||||
AC_SUBST(LIBDIRS)
|
||||
AC_SUBST(MPIINCLUDE)
|
||||
AC_SUBST(MPILIBS)
|
||||
AC_SUBST(MPILIBDIRS)
|
||||
AC_SUBST(MPIFLAGS)
|
||||
AC_SUBST(COPT)
|
||||
AC_SUBST(CDEBUG)
|
||||
AC_SUBST(HYPREDEFS)
|
||||
AC_SUBST(TIMERDEFS)
|
||||
AC_SUBST(LDLIBS)
|
||||
AC_SUBST(LDLIBDIRS)
|
||||
AC_SUBST(ARCH)
|
||||
AC_SUBST(MEMORYEXTRAFILES)
|
||||
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * DIRECTING THE OUTPUT
|
||||
dnl *********************************************************************
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * The following is the usual format, to be used when you expect the
|
||||
dnl * full structure of the package to be present, and when you don't want
|
||||
dnl * non-standard names for your output files.
|
||||
dnl *********************************************************************
|
||||
|
||||
dnl * AC_OUTPUT(utilities/Makefile struct_matrix_vector/Makefile \
|
||||
dnl * struct_linear_solvers/Makefile)
|
||||
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * Use CASC_CONFIG_OUTPUT_LIST with AC_OUTPUT if you want to handle the
|
||||
dnl * possibility that certain parts of the package are not present.
|
||||
dnl *********************************************************************
|
||||
|
||||
CASC_CONFIG_OUTPUT_LIST(utilities struct_matrix_vector \
|
||||
struct_linear_solvers)
|
||||
|
||||
AC_OUTPUT($Makefile_list)
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl * Use the following format for AC_OUTPUT when you want your output
|
||||
dnl * files to have a name other than that which you get from dropping the
|
||||
dnl * '.in' from the input file name. This example adds .$ARCH to the
|
||||
dnl * end of each Makefile, creating the possibility of keeping several
|
||||
dnl * Makefiles in each directory, each for a separate architecture
|
||||
dnl *********************************************************************
|
||||
|
||||
dnl AC_OUTPUT(
|
||||
dnl utilities/Makefile.$ARCH:utilities/Makefile.in \
|
||||
dnl struct_matrix_vector/Makefile.$ARCH:struct_matrix_vector/Makefile.in \
|
||||
dnl struct_linear_solvers/Makefile.$ARCH:struct_linear_solvers/Makefile.in)
|
||||
122
struct_linear_solvers/Makefile.in
Normal file
122
struct_linear_solvers/Makefile.in
Normal file
@ -0,0 +1,122 @@
|
||||
#BHEADER***********************************************************************
|
||||
# (c) 1997 The Regents of the University of California
|
||||
#
|
||||
# See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
|
||||
# notice, contact person, and disclaimer.
|
||||
#
|
||||
# $Revision$
|
||||
#EHEADER***********************************************************************
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .f .o
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
|
||||
CC = @CC@
|
||||
|
||||
CINCLUDES=@INCLUDES@ @MPIINCLUDE@
|
||||
COPT= @COPT@
|
||||
CDEBUG = @CDEBUG@
|
||||
CDEFS = @HYPREDEFS@ -DHYPRE_TIMING
|
||||
|
||||
CFLAGS = \
|
||||
${CINCLUDES} \
|
||||
${COPT} \
|
||||
${CDEBUG} \
|
||||
${CDEFS}
|
||||
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
MPILIBFLAGS = @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@
|
||||
LIBFLAGS = @LIBDIRS@ @LIBS@
|
||||
LDLIBFLAGS = @LDLIBDIRS@ @LDLIBS@
|
||||
|
||||
LFLAGS =\
|
||||
-L.\
|
||||
-L../struct_matrix_vector\
|
||||
-L../utilities\
|
||||
-lHYPRE_ls\
|
||||
-lHYPRE_mv\
|
||||
-lHYPRE_timing\
|
||||
-lHYPRE_memory\
|
||||
${MPILIBFLAGS} ${LIBFLAGS} ${LDLIBFLAGS}
|
||||
|
||||
|
||||
HEADERS =\
|
||||
headers.h\
|
||||
smg.h\
|
||||
hypre_ls.h\
|
||||
HYPRE_ls.h
|
||||
|
||||
FILES =\
|
||||
cyclic_reduction.c\
|
||||
general.c\
|
||||
pcg.c\
|
||||
pcg_struct.c\
|
||||
smg2_setup_rap.c\
|
||||
smg3_setup_rap.c\
|
||||
smg.c\
|
||||
smg_intadd.c\
|
||||
smg_relax.c\
|
||||
smg_residual.c\
|
||||
smg_restrict.c\
|
||||
smg_setup.c\
|
||||
smg_setup_interp.c\
|
||||
smg_setup_rap.c\
|
||||
smg_setup_restrict.c\
|
||||
smg_solve.c\
|
||||
HYPRE_struct_smg.c\
|
||||
HYPRE_struct_pcg.c
|
||||
|
||||
OBJS = ${FILES:.c=.o}
|
||||
|
||||
##################################################################
|
||||
# Main rules
|
||||
##################################################################
|
||||
|
||||
default: libHYPRE_ls.a driver
|
||||
|
||||
driver: driver.o libHYPRE_ls.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o driver driver.o ${LFLAGS}
|
||||
|
||||
driver_internal: driver_internal.o libHYPRE_ls.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o driver_internal driver_internal.o ${LFLAGS}
|
||||
|
||||
driver_internal_cgsmg: driver_internal_cgsmg.o libHYPRE_ls.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o driver_internal_cgsmg driver_internal_cgsmg.o ${LFLAGS}
|
||||
|
||||
libHYPRE_ls.a: ${OBJS}
|
||||
@echo "Building $@ ... "
|
||||
ar -ru $@ ${OBJS}
|
||||
${RANLIB} $@
|
||||
|
||||
${OBJS}: ${HEADERS}
|
||||
|
||||
##################################################################
|
||||
# Generic rules
|
||||
##################################################################
|
||||
|
||||
.c.o:
|
||||
@echo "Making (c) " $@
|
||||
@${CC} -o $@ -c ${CFLAGS} $<
|
||||
|
||||
.f.${AMG_ARCH}.o:
|
||||
@echo "Making (f) " $@
|
||||
@${F77} -o $@ -c ${FFLAGS} $<
|
||||
|
||||
##################################################################
|
||||
# Miscellaneous rules
|
||||
##################################################################
|
||||
|
||||
veryclean: clean
|
||||
@rm -f libHYPRE_ls.a
|
||||
@rm -f driver driver_internal
|
||||
|
||||
clean:
|
||||
@rm -f *.o
|
||||
|
||||
122
struct_ls/Makefile.in
Normal file
122
struct_ls/Makefile.in
Normal file
@ -0,0 +1,122 @@
|
||||
#BHEADER***********************************************************************
|
||||
# (c) 1997 The Regents of the University of California
|
||||
#
|
||||
# See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
|
||||
# notice, contact person, and disclaimer.
|
||||
#
|
||||
# $Revision$
|
||||
#EHEADER***********************************************************************
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .f .o
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
|
||||
CC = @CC@
|
||||
|
||||
CINCLUDES=@INCLUDES@ @MPIINCLUDE@
|
||||
COPT= @COPT@
|
||||
CDEBUG = @CDEBUG@
|
||||
CDEFS = @HYPREDEFS@ -DHYPRE_TIMING
|
||||
|
||||
CFLAGS = \
|
||||
${CINCLUDES} \
|
||||
${COPT} \
|
||||
${CDEBUG} \
|
||||
${CDEFS}
|
||||
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
MPILIBFLAGS = @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@
|
||||
LIBFLAGS = @LIBDIRS@ @LIBS@
|
||||
LDLIBFLAGS = @LDLIBDIRS@ @LDLIBS@
|
||||
|
||||
LFLAGS =\
|
||||
-L.\
|
||||
-L../struct_matrix_vector\
|
||||
-L../utilities\
|
||||
-lHYPRE_ls\
|
||||
-lHYPRE_mv\
|
||||
-lHYPRE_timing\
|
||||
-lHYPRE_memory\
|
||||
${MPILIBFLAGS} ${LIBFLAGS} ${LDLIBFLAGS}
|
||||
|
||||
|
||||
HEADERS =\
|
||||
headers.h\
|
||||
smg.h\
|
||||
hypre_ls.h\
|
||||
HYPRE_ls.h
|
||||
|
||||
FILES =\
|
||||
cyclic_reduction.c\
|
||||
general.c\
|
||||
pcg.c\
|
||||
pcg_struct.c\
|
||||
smg2_setup_rap.c\
|
||||
smg3_setup_rap.c\
|
||||
smg.c\
|
||||
smg_intadd.c\
|
||||
smg_relax.c\
|
||||
smg_residual.c\
|
||||
smg_restrict.c\
|
||||
smg_setup.c\
|
||||
smg_setup_interp.c\
|
||||
smg_setup_rap.c\
|
||||
smg_setup_restrict.c\
|
||||
smg_solve.c\
|
||||
HYPRE_struct_smg.c\
|
||||
HYPRE_struct_pcg.c
|
||||
|
||||
OBJS = ${FILES:.c=.o}
|
||||
|
||||
##################################################################
|
||||
# Main rules
|
||||
##################################################################
|
||||
|
||||
default: libHYPRE_ls.a driver
|
||||
|
||||
driver: driver.o libHYPRE_ls.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o driver driver.o ${LFLAGS}
|
||||
|
||||
driver_internal: driver_internal.o libHYPRE_ls.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o driver_internal driver_internal.o ${LFLAGS}
|
||||
|
||||
driver_internal_cgsmg: driver_internal_cgsmg.o libHYPRE_ls.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o driver_internal_cgsmg driver_internal_cgsmg.o ${LFLAGS}
|
||||
|
||||
libHYPRE_ls.a: ${OBJS}
|
||||
@echo "Building $@ ... "
|
||||
ar -ru $@ ${OBJS}
|
||||
${RANLIB} $@
|
||||
|
||||
${OBJS}: ${HEADERS}
|
||||
|
||||
##################################################################
|
||||
# Generic rules
|
||||
##################################################################
|
||||
|
||||
.c.o:
|
||||
@echo "Making (c) " $@
|
||||
@${CC} -o $@ -c ${CFLAGS} $<
|
||||
|
||||
.f.${AMG_ARCH}.o:
|
||||
@echo "Making (f) " $@
|
||||
@${F77} -o $@ -c ${FFLAGS} $<
|
||||
|
||||
##################################################################
|
||||
# Miscellaneous rules
|
||||
##################################################################
|
||||
|
||||
veryclean: clean
|
||||
@rm -f libHYPRE_ls.a
|
||||
@rm -f driver driver_internal
|
||||
|
||||
clean:
|
||||
@rm -f *.o
|
||||
|
||||
156
struct_matrix_vector/Makefile.in
Normal file
156
struct_matrix_vector/Makefile.in
Normal file
@ -0,0 +1,156 @@
|
||||
#BHEADER***********************************************************************
|
||||
# (c) 1997 The Regents of the University of California
|
||||
#
|
||||
# See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
|
||||
# notice, contact person, and disclaimer.
|
||||
#
|
||||
# $Revision$
|
||||
#EHEADER***********************************************************************
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .f .o
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
|
||||
CC = @CC@
|
||||
|
||||
CINCLUDES=@INCLUDES@ @MPIINCLUDE@
|
||||
COPT= @COPT@
|
||||
CDEBUG = @CDEBUG@
|
||||
CDEFS = @HYPREDEFS@ -DHYPRE_TIMING
|
||||
|
||||
CFLAGS =\
|
||||
${CINCLUDES}\
|
||||
${COPT}\
|
||||
${CDEBUG}\
|
||||
${CDEFS}
|
||||
|
||||
RANLIB= @RANLIB@
|
||||
|
||||
MPILIBFLAGS = @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@
|
||||
LIBFLAGS = @LIBDIRS@ @LIBS@
|
||||
LDLIBFLAGS = @LDLIBDIRS@ @LDLIBS@
|
||||
|
||||
LFLAGS =\
|
||||
-L.\
|
||||
-L../utilities\
|
||||
-lHYPRE_mv\
|
||||
-lHYPRE_timing\
|
||||
-lHYPRE_memory\
|
||||
${MPILIBFLAGS} ${LIBFLAGS} ${LDLIBFLAGS}
|
||||
|
||||
HEADERS =\
|
||||
box.h\
|
||||
box_neighbors.h\
|
||||
communication.h\
|
||||
computation.h\
|
||||
headers.h\
|
||||
sbox.h\
|
||||
struct_grid.h\
|
||||
struct_matrix.h\
|
||||
struct_stencil.h\
|
||||
struct_vector.h\
|
||||
hypre_mv.h\
|
||||
HYPRE_mv.h
|
||||
|
||||
FILES =\
|
||||
box.c\
|
||||
box_algebra.c\
|
||||
box_alloc.c\
|
||||
box_neighbors.c\
|
||||
communication.c\
|
||||
communication_info.c\
|
||||
computation.c\
|
||||
grow.c\
|
||||
project.c\
|
||||
sbox.c\
|
||||
struct_grid.c\
|
||||
struct_io.c\
|
||||
struct_axpy.c\
|
||||
struct_copy.c\
|
||||
struct_innerprod.c\
|
||||
struct_matrix.c\
|
||||
struct_matrix_mask.c\
|
||||
struct_matvec.c\
|
||||
struct_scale.c\
|
||||
struct_stencil.c\
|
||||
struct_vector.c\
|
||||
HYPRE_struct_grid.c\
|
||||
HYPRE_struct_matrix.c\
|
||||
HYPRE_struct_stencil.c\
|
||||
HYPRE_struct_vector.c
|
||||
|
||||
OBJS = ${FILES:.c=.o}
|
||||
|
||||
##################################################################
|
||||
# Main rules
|
||||
##################################################################
|
||||
|
||||
default: libHYPRE_mv.a
|
||||
|
||||
driver_internal: driver_internal.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o driver_internal driver_internal.o ${LFLAGS}
|
||||
|
||||
one_to_many: one_to_many.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o one_to_many one_to_many.o ${LFLAGS}
|
||||
|
||||
one_to_many_vector: one_to_many_vector.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o one_to_many_vector one_to_many_vector.o ${LFLAGS}
|
||||
|
||||
create_2d_laplacian: create_2d_laplacian.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o create_2d_laplacian create_2d_laplacian.o ${LFLAGS}
|
||||
|
||||
create_3d_laplacian: create_3d_laplacian.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o create_3d_laplacian create_3d_laplacian.o ${LFLAGS}
|
||||
|
||||
libHYPRE_mv.a: ${OBJS}
|
||||
@echo "Building $@ ... "
|
||||
ar -ru $@ ${OBJS}
|
||||
${RANLIB} $@
|
||||
|
||||
${OBJS}: ${HEADERS}
|
||||
|
||||
docs: docs_html docs_tex
|
||||
|
||||
docs_html:
|
||||
@doc++ -d Docs DevManual.dxx
|
||||
|
||||
docs_tex:
|
||||
@doc++ -t -o DevManual.tex DevManual.dxx
|
||||
@latex DevManual
|
||||
@latex DevManual
|
||||
@dvips DevManual -o
|
||||
|
||||
##################################################################
|
||||
# Generic rules
|
||||
##################################################################
|
||||
|
||||
.c.o:
|
||||
@echo "Making (c) " $@
|
||||
@${CC} -o $@ -c ${CFLAGS} $<
|
||||
|
||||
.f.${AMG_ARCH}.o:
|
||||
@echo "Making (f) " $@
|
||||
@${F77} -o $@ -c ${FFLAGS} $<
|
||||
|
||||
##################################################################
|
||||
# Miscellaneous rules
|
||||
##################################################################
|
||||
|
||||
veryclean: clean
|
||||
@rm -f libHYPRE_mv.a
|
||||
@rm -f driver driver_internal
|
||||
@rm -fr Docs
|
||||
@rm -f DevManual.tex DevManual.ps
|
||||
@rm -f DevManual.dvi DevManual.aux DevManual.log
|
||||
|
||||
clean:
|
||||
@rm -f *.o
|
||||
|
||||
156
struct_mv/Makefile.in
Normal file
156
struct_mv/Makefile.in
Normal file
@ -0,0 +1,156 @@
|
||||
#BHEADER***********************************************************************
|
||||
# (c) 1997 The Regents of the University of California
|
||||
#
|
||||
# See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
|
||||
# notice, contact person, and disclaimer.
|
||||
#
|
||||
# $Revision$
|
||||
#EHEADER***********************************************************************
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .f .o
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
|
||||
CC = @CC@
|
||||
|
||||
CINCLUDES=@INCLUDES@ @MPIINCLUDE@
|
||||
COPT= @COPT@
|
||||
CDEBUG = @CDEBUG@
|
||||
CDEFS = @HYPREDEFS@ -DHYPRE_TIMING
|
||||
|
||||
CFLAGS =\
|
||||
${CINCLUDES}\
|
||||
${COPT}\
|
||||
${CDEBUG}\
|
||||
${CDEFS}
|
||||
|
||||
RANLIB= @RANLIB@
|
||||
|
||||
MPILIBFLAGS = @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@
|
||||
LIBFLAGS = @LIBDIRS@ @LIBS@
|
||||
LDLIBFLAGS = @LDLIBDIRS@ @LDLIBS@
|
||||
|
||||
LFLAGS =\
|
||||
-L.\
|
||||
-L../utilities\
|
||||
-lHYPRE_mv\
|
||||
-lHYPRE_timing\
|
||||
-lHYPRE_memory\
|
||||
${MPILIBFLAGS} ${LIBFLAGS} ${LDLIBFLAGS}
|
||||
|
||||
HEADERS =\
|
||||
box.h\
|
||||
box_neighbors.h\
|
||||
communication.h\
|
||||
computation.h\
|
||||
headers.h\
|
||||
sbox.h\
|
||||
struct_grid.h\
|
||||
struct_matrix.h\
|
||||
struct_stencil.h\
|
||||
struct_vector.h\
|
||||
hypre_mv.h\
|
||||
HYPRE_mv.h
|
||||
|
||||
FILES =\
|
||||
box.c\
|
||||
box_algebra.c\
|
||||
box_alloc.c\
|
||||
box_neighbors.c\
|
||||
communication.c\
|
||||
communication_info.c\
|
||||
computation.c\
|
||||
grow.c\
|
||||
project.c\
|
||||
sbox.c\
|
||||
struct_grid.c\
|
||||
struct_io.c\
|
||||
struct_axpy.c\
|
||||
struct_copy.c\
|
||||
struct_innerprod.c\
|
||||
struct_matrix.c\
|
||||
struct_matrix_mask.c\
|
||||
struct_matvec.c\
|
||||
struct_scale.c\
|
||||
struct_stencil.c\
|
||||
struct_vector.c\
|
||||
HYPRE_struct_grid.c\
|
||||
HYPRE_struct_matrix.c\
|
||||
HYPRE_struct_stencil.c\
|
||||
HYPRE_struct_vector.c
|
||||
|
||||
OBJS = ${FILES:.c=.o}
|
||||
|
||||
##################################################################
|
||||
# Main rules
|
||||
##################################################################
|
||||
|
||||
default: libHYPRE_mv.a
|
||||
|
||||
driver_internal: driver_internal.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o driver_internal driver_internal.o ${LFLAGS}
|
||||
|
||||
one_to_many: one_to_many.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o one_to_many one_to_many.o ${LFLAGS}
|
||||
|
||||
one_to_many_vector: one_to_many_vector.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o one_to_many_vector one_to_many_vector.o ${LFLAGS}
|
||||
|
||||
create_2d_laplacian: create_2d_laplacian.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o create_2d_laplacian create_2d_laplacian.o ${LFLAGS}
|
||||
|
||||
create_3d_laplacian: create_3d_laplacian.o libHYPRE_mv.a
|
||||
@echo "Linking" $@ "... "
|
||||
${CC} -o create_3d_laplacian create_3d_laplacian.o ${LFLAGS}
|
||||
|
||||
libHYPRE_mv.a: ${OBJS}
|
||||
@echo "Building $@ ... "
|
||||
ar -ru $@ ${OBJS}
|
||||
${RANLIB} $@
|
||||
|
||||
${OBJS}: ${HEADERS}
|
||||
|
||||
docs: docs_html docs_tex
|
||||
|
||||
docs_html:
|
||||
@doc++ -d Docs DevManual.dxx
|
||||
|
||||
docs_tex:
|
||||
@doc++ -t -o DevManual.tex DevManual.dxx
|
||||
@latex DevManual
|
||||
@latex DevManual
|
||||
@dvips DevManual -o
|
||||
|
||||
##################################################################
|
||||
# Generic rules
|
||||
##################################################################
|
||||
|
||||
.c.o:
|
||||
@echo "Making (c) " $@
|
||||
@${CC} -o $@ -c ${CFLAGS} $<
|
||||
|
||||
.f.${AMG_ARCH}.o:
|
||||
@echo "Making (f) " $@
|
||||
@${F77} -o $@ -c ${FFLAGS} $<
|
||||
|
||||
##################################################################
|
||||
# Miscellaneous rules
|
||||
##################################################################
|
||||
|
||||
veryclean: clean
|
||||
@rm -f libHYPRE_mv.a
|
||||
@rm -f driver driver_internal
|
||||
@rm -fr Docs
|
||||
@rm -f DevManual.tex DevManual.ps
|
||||
@rm -f DevManual.dvi DevManual.aux DevManual.log
|
||||
|
||||
clean:
|
||||
@rm -f *.o
|
||||
|
||||
99
tarch
Executable file
99
tarch
Executable file
@ -0,0 +1,99 @@
|
||||
#! /bin/sh
|
||||
# set -x
|
||||
#
|
||||
# Returns the arch of the machine
|
||||
#
|
||||
# First, try some special cases:
|
||||
if [ -d "/dev/elan" ] ; then
|
||||
FARCH="meiko"
|
||||
elif [ -f /usr/bin/uxpm ] && /usr/bin/uxpm ; then
|
||||
FARCH="UXPM"
|
||||
elif [ -f /usr/bin/uxpv ] && /usr/bin/uxpv ; then
|
||||
FARCH="uxpv"
|
||||
fi
|
||||
if [ -n "$FARCH" ] ; then
|
||||
echo $FARCH
|
||||
exit 0
|
||||
fi
|
||||
#
|
||||
# Try to find uname
|
||||
for dir in /bin /usr/bin /usr/local/bin ; do
|
||||
if [ -x $dir/uname ] ; then
|
||||
UNAME="$dir/uname"
|
||||
break
|
||||
fi
|
||||
done
|
||||
#
|
||||
# Get uname -s, uname -m, and arch values
|
||||
#
|
||||
if [ -n "$UNAME" ] ; then
|
||||
ARCHLIST="`uname -s`"
|
||||
ARCHLIST="$ARCHLIST `uname -m`"
|
||||
fi
|
||||
#
|
||||
# Get ARCH variable name
|
||||
if [ -n "$ARCH" ] ; then
|
||||
ARCHLIST="$ARCHLIST $ARCH"
|
||||
fi
|
||||
#
|
||||
# Get arch command
|
||||
if [ -x /bin/arch ] ; then
|
||||
ARCHLIST="$ARCHLIST `/bin/arch`"
|
||||
elif [ -x /usr/local/bin/arch ] ; then
|
||||
ARCHLIST="$ARCHLIST `/usr/local/bin/arch`"
|
||||
fi
|
||||
#
|
||||
# GARCH is a guess if we don't find something better
|
||||
GARCH=
|
||||
# Now, weed through all of these values until we find something useful.
|
||||
for LARCH in $ARCHLIST ; do
|
||||
# Remove blanks
|
||||
LARCH=`echo $LARCH | sed 's/ //g'`
|
||||
# Get the first 4 characters (you'd be surprised)
|
||||
# LARCH4=`expr "$LARCH" : "\(....\)"`
|
||||
# LARCH6=`expr "$LARCH" : "\(......\)"`
|
||||
case $LARCH in
|
||||
AIX|RIOS) FARCH=rs6000; break ;;
|
||||
HP-UX) FARCH=hpux ; break ;;
|
||||
IRIX64|IRIX) FARCH=$LARCH ; break ;;
|
||||
Linux) FARCH=LINUX ; break ;;
|
||||
i586|i486|i86pc)
|
||||
GARCH=$LARCH ;;
|
||||
sun4*)
|
||||
Version=`$UNAME -r`
|
||||
# In "improving" SunOS, the useful feature of "substr" was withdrawn
|
||||
# from expr. Can't let the users have life too easy, can we? This
|
||||
# means that we can't just use
|
||||
# set MajorVersion = `expr substr $Version 1 1`
|
||||
# because it won't work on Solaris systems. The following should work
|
||||
# on both:
|
||||
MajorVersion=`expr "$Version" : "\(.\)"`
|
||||
if [ "$MajorVersion" -ge 5 ] ; then
|
||||
FARCH=solaris
|
||||
else
|
||||
FARCH=sun4
|
||||
fi
|
||||
break ;;
|
||||
hp9000*|hp7000*) FARCH=hpux ; break ;;
|
||||
mips|dec-5000) FARCH=dec5000 ; break ;;
|
||||
IP12|iris-4d) GARCH=IRIX ;;
|
||||
cray|CRAY*) GARCH=CRAY ;;
|
||||
next) FARCH=NeXT ; break ;;
|
||||
KSR1|KSR2) FARCH=ksr ; break ;;
|
||||
FreeBSD) FARCH=freebsd ; break ;;
|
||||
i386) GARCH=ipsc2 ;;
|
||||
ULTRIX|RISC) GARCH=dec5000 ;;
|
||||
esac
|
||||
LLARCH=$LARCH
|
||||
done
|
||||
if [ -z "$FARCH" ] ; then
|
||||
FARCH=$GARCH
|
||||
if [ -z "$FARCH" ] ; then
|
||||
FARCH=$LLARCH
|
||||
fi
|
||||
if [ -z "$FARCH" ] ; then
|
||||
FARCH=unknown
|
||||
fi
|
||||
fi
|
||||
echo $FARCH
|
||||
exit 0
|
||||
113
utilities/Makefile.in
Normal file
113
utilities/Makefile.in
Normal file
@ -0,0 +1,113 @@
|
||||
# (c) 1997 The Regents of the University of California
|
||||
#
|
||||
# See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
|
||||
# notice, contact person, and disclaimer.
|
||||
#
|
||||
# $Revision$
|
||||
#EHEADER***********************************************************************
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .f .o
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
|
||||
CC = @CC@
|
||||
|
||||
CINCLUDES=@INCLUDES@ @MPIINCLUDE@
|
||||
COPT = @COPT@
|
||||
CDEBUG = @CDEBUG@
|
||||
CDEFS = @HYPREDEFS@ @TIMERDEFS@ -DHYPRE_TIMING
|
||||
|
||||
CFLAGS =\
|
||||
${CINCLUDES}\
|
||||
${COPT}\
|
||||
${CDEBUG}\
|
||||
${CDEFS}
|
||||
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
MEMORY_EXTRA_FILES = @MEMORYEXTRAFILES@
|
||||
|
||||
|
||||
##################################################################
|
||||
# Default targets
|
||||
##################################################################
|
||||
|
||||
default: libHYPRE_utilities.a libHYPRE_memory.a libHYPRE_timing.a
|
||||
|
||||
##################################################################
|
||||
# Memory rules
|
||||
##################################################################
|
||||
|
||||
MEMORY_HEADERS =\
|
||||
memory.h
|
||||
|
||||
MEMORY_FILES =\
|
||||
memory.c\
|
||||
${MEMORY_EXTRA_FILES}
|
||||
|
||||
MEMORY_OBJS = ${MEMORY_FILES:.c=.o}
|
||||
|
||||
libHYPRE_memory.a: ${MEMORY_OBJS}
|
||||
@echo "Building $@ ... "
|
||||
ar -ru $@ ${MEMORY_OBJS}
|
||||
${RANLIB} $@
|
||||
|
||||
${MEMORY_OBJS}: ${MEMORY_HEADERS}
|
||||
|
||||
##################################################################
|
||||
# Timing rules
|
||||
##################################################################
|
||||
|
||||
TIMING_HEADERS =\
|
||||
timing.h
|
||||
|
||||
TIMING_FILES =\
|
||||
timer.c\
|
||||
timing.c
|
||||
|
||||
TIMING_OBJS = ${TIMING_FILES:.c=.o}
|
||||
|
||||
libHYPRE_timing.a: ${TIMING_OBJS}
|
||||
@echo "Building $@ ... "
|
||||
ar -ru $@ ${TIMING_OBJS}
|
||||
${RANLIB} $@
|
||||
|
||||
${TIMING_OBJS}: ${TIMING_HEADERS}
|
||||
|
||||
##################################################################
|
||||
# Utilities rules
|
||||
##################################################################
|
||||
|
||||
UTILITIES_OBJS = ${MEMORY_OBJS} ${TIMING_OBJS}
|
||||
|
||||
libHYPRE_utilities.a: ${UTILITIES_OBJS}
|
||||
@echo "Building $@ ... "
|
||||
ar -ru $@ ${UTILITIES_OBJS}
|
||||
ranlib $@
|
||||
|
||||
##################################################################
|
||||
# Generic rules
|
||||
##################################################################
|
||||
|
||||
.c.o:
|
||||
@echo "Making (c) " $@
|
||||
@${CC} -o $@ -c ${CFLAGS} $<
|
||||
|
||||
.f.${AMG_ARCH}.o:
|
||||
@echo "Making (f) " $@
|
||||
@${F77} -o $@ -c ${FFLAGS} $<
|
||||
|
||||
##################################################################
|
||||
# Miscellaneous rules
|
||||
##################################################################
|
||||
|
||||
veryclean: clean
|
||||
@rm -f libHYPRE_timing.a
|
||||
@rm -f libHYPRE_memory.a
|
||||
|
||||
clean:
|
||||
@rm -f *.o
|
||||
|
||||
Loading…
Reference in New Issue
Block a user