From 7075be19cdaa263e9e183c0a90677b043bb6ef4e Mon Sep 17 00:00:00 2001 From: Nicholas Malaya Date: Fri, 3 Feb 2012 20:38:05 +0000 Subject: [PATCH] [cantera]: cleaning up a small error thats been propagated through the code --- Cantera/src/numerics/Makefile.am | 2 +- Cantera/src/numerics/ctlapack.h | 4 + Cantera/src/numerics/funcs.cpp | 1 + Cantera/src/numerics/sort.cpp | 1 + configure.ac | 4 +- ext/Makefile.am | 2 +- ext/f2c_blas/CMakeLists.txt | 11 -- ext/f2c_blas/Makefile.am | 60 +++++++++ ext/f2c_blas/Makefile.in | 126 ------------------ ext/f2c_math/CMakeLists.txt | 9 -- ext/f2c_math/Makefile.am | 41 ++++++ ext/f2c_math/Makefile.in | 112 ---------------- test_problems/cathermo/DH_graph_1/Makefile.am | 2 +- 13 files changed, 112 insertions(+), 263 deletions(-) delete mode 100644 ext/f2c_blas/CMakeLists.txt create mode 100644 ext/f2c_blas/Makefile.am delete mode 100755 ext/f2c_blas/Makefile.in delete mode 100644 ext/f2c_math/CMakeLists.txt create mode 100644 ext/f2c_math/Makefile.am delete mode 100644 ext/f2c_math/Makefile.in diff --git a/Cantera/src/numerics/Makefile.am b/Cantera/src/numerics/Makefile.am index 2781ac22a..3ff16d619 100644 --- a/Cantera/src/numerics/Makefile.am +++ b/Cantera/src/numerics/Makefile.am @@ -8,7 +8,7 @@ cc_sources = DenseMatrix.cpp funcs.cpp Func1.cpp ODE_integrators.cpp \ SquareMatrix.cpp ResidJacEval.cpp NonlinearSolver.cpp \ CVodeInt.cpp -AM_CPPFLAGS = -I../../../ -I$(top_builddir)/build/include/cantera +AM_CPPFLAGS = -I../../../ -I$(top_builddir)/build/include/cantera -I$(top_builddir)/build/include/cantera/kernel AM_CXXFLAGS = $(AM_CPPFLAGS) lib_LTLIBRARIES = $(top_builddir)/build/lib/libctnumerics.la diff --git a/Cantera/src/numerics/ctlapack.h b/Cantera/src/numerics/ctlapack.h index 0b5a6da3a..f18ce9a0a 100755 --- a/Cantera/src/numerics/ctlapack.h +++ b/Cantera/src/numerics/ctlapack.h @@ -19,6 +19,10 @@ #include "ct_defs.h" +typedef double doublereal; +typedef int integer; +typedef int ftnlen; + //#include // map BLAS names to names with or without a trailing underscore. diff --git a/Cantera/src/numerics/funcs.cpp b/Cantera/src/numerics/funcs.cpp index 3a2434451..9d60ca374 100755 --- a/Cantera/src/numerics/funcs.cpp +++ b/Cantera/src/numerics/funcs.cpp @@ -22,6 +22,7 @@ using namespace std; +#include "ctlapack.h" #include "ct_defs.h" #include "ctexceptions.h" #include "stringUtils.h" diff --git a/Cantera/src/numerics/sort.cpp b/Cantera/src/numerics/sort.cpp index ed6fc21c4..fa6426273 100755 --- a/Cantera/src/numerics/sort.cpp +++ b/Cantera/src/numerics/sort.cpp @@ -9,6 +9,7 @@ #endif #include "sort.h" +#include "ctlapack.h" namespace Cantera { diff --git a/configure.ac b/configure.ac index 4b6c6f62a..2124d3457 100644 --- a/configure.ac +++ b/configure.ac @@ -89,11 +89,11 @@ AC_OUTPUT(Makefile \ doxygen/Makefile \ ext/Makefile \ ext/tpx/Makefile \ - ext/math/Makefile \ - ext/blas/Makefile \ ext/cvode/Makefile \ + ext/f2c_blas/Makefile \ ext/f2c_lapack/Makefile \ ext/f2c_libs/Makefile \ + ext/f2c_math/Makefile \ Cantera/Makefile \ Cantera/user/Makefile \ Cantera/src/Makefile \ diff --git a/ext/Makefile.am b/ext/Makefile.am index dc70ad5a3..d0aeba4f5 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = f2c_lapack tpx math cvode blas f2c_libs +SUBDIRS = f2c_libs f2c_blas f2c_lapack f2c_math cvode tpx diff --git a/ext/f2c_blas/CMakeLists.txt b/ext/f2c_blas/CMakeLists.txt deleted file mode 100644 index e8b1644c7..000000000 --- a/ext/f2c_blas/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -SET (F2C_BLAS_SRCS dasum.c daxpy.c dcabs1.c dcopy.c ddot.c -dgbmv.c dgemm.c dgemv.c dger.c dnrm2.c drot.c drotg.c -drotm.c drotmg.c dsbmv.c dscal.c dsdot.c dspmv.c dspr.c dspr2.c -dswap.c dsymm.c dsymv.c dsyr.c dsyr2.c dsyr2k.c dsyrk.c dtbmv.c -dtbsv.c dtpmv.c dtpsv.c dtrmm.c dtrmv.c dtrsm.c dtrsv.c -dzasum.c dznrm2.c idamax.c lsame.c xerbla.c ) - -INCLUDE_DIRECTORIES ( ${PROJECT_SOURCE_DIR}/ext/f2c_libs ) -ADD_LIBRARY(ctblas ${F2C_BLAS_SRCS}) - - diff --git a/ext/f2c_blas/Makefile.am b/ext/f2c_blas/Makefile.am new file mode 100644 index 000000000..27b3913a1 --- /dev/null +++ b/ext/f2c_blas/Makefile.am @@ -0,0 +1,60 @@ +cc_sources = \ +dasum.c \ +daxpy.c \ +dcabs1.c \ +dcopy.c \ +ddot.c \ +dgbmv.c \ +dgemm.c \ +dgemv.c \ +dger.c \ +dnrm2.c \ +drot.c \ +drotg.c \ +drotm.c \ +drotmg.c \ +dsbmv.c \ +dscal.c \ +dsdot.c \ +dspmv.c \ +dspr.c \ +dspr2.c \ +dswap.c \ +dsymm.c \ +dsymv.c \ +dsyr.c \ +dsyr2.c \ +dsyr2k.c \ +dsyrk.c \ +dtbmv.c \ +dtbsv.c \ +dtpmv.c \ +dtpsv.c \ +dtrmm.c \ +dtrmv.c \ +dtrsm.c \ +dtrsv.c \ +dzasum.c \ +dznrm2.c \ +idamax.c \ +lsame.c \ +xerbla.c + +h_sources = blaswrap.h + +AM_CPPFLAGS = -I../f2c_libs +AM_CXXFLAGS = $(AM_CPPFLAGS) +AM_FCFLAGS = $(AM_CPPFLAGS) + +lib_LTLIBRARIES = $(top_builddir)/build/lib/libctblas.la +library_includedir = $(top_builddir)/build/include +library_include_HEADERS = $(h_sources) + +#----------------------- +# Cantera Converters C/C++ library +#----------------------- + +__top_builddir__build_lib_libctblas_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE) +__top_builddir__build_lib_libctblas_la_SOURCES = $(cc_sources) $(h_sources) + +CLEANFILES = *.o diff --git a/ext/f2c_blas/Makefile.in b/ext/f2c_blas/Makefile.in deleted file mode 100755 index e10e9f192..000000000 --- a/ext/f2c_blas/Makefile.in +++ /dev/null @@ -1,126 +0,0 @@ -#/bin/sh -#/bin/sh -# -# $Revision: 1.10 $ -# $Date: 2009/01/12 19:34:14 $ -# - -.SUFFIXES : -.SUFFIXES : .c .d .o - -do_ranlib = @DO_RANLIB@ - -PURIFY=@PURIFY@ - -# the directory where the Cantera libraries are located -CANTERA_LIBDIR=@buildlib@ - -# the directory where Cantera include files may be found. -CANTERA_INCDIR=@ctroot@/build/include/cantera - -# the C++ compiler -CXX = @CXX@ - -# the C compiler -CC = @CC@ - -# C++ compile flags -PIC_FLAG=@PIC@ -CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG) - -# C compile flags -CFLAGS = @CFLAGS@ $(CXX_OPT) $(PIC_FLAG) - -# Local include files -CXX_INCLUDES=-I../f2c_libs - -# How to compile the dependency file -.c.d: - @CXX_DEPENDS@ $(CFLAGS) $(CXX_INCLUDES) $*.c > $*.d - -# How to compile a C file -.c.o: - $(PURIFY) @CC@ -c $< @DEFS@ $(CFLAGS) $(CXX_INCLUDES) - - -# ----------------------------------------------- - -BLASLIB = @buildlib@/libctblas.a - -all: $(BLASLIB) - -OBJS = \ -dasum.o \ -daxpy.o \ -dcabs1.o \ -dcopy.o \ -ddot.o \ -dgbmv.o \ -dgemm.o \ -dgemv.o \ -dger.o \ -dnrm2.o \ -drot.o \ -drotg.o \ -drotm.o \ -drotmg.o \ -dsbmv.o \ -dscal.o \ -dsdot.o \ -dspmv.o \ -dspr.o \ -dspr2.o \ -dswap.o \ -dsymm.o \ -dsymv.o \ -dsyr.o \ -dsyr2.o \ -dsyr2k.o \ -dsyrk.o \ -dtbmv.o \ -dtbsv.o \ -dtpmv.o \ -dtpsv.o \ -dtrmm.o \ -dtrmv.o \ -dtrsm.o \ -dtrsv.o \ -dzasum.o \ -dznrm2.o \ -idamax.o \ -lsame.o \ -xerbla.o - -SRCS = $(OBJS:.o=.cpp) - -# List of dependency files to be created -DEPENDS=$(OBJS:.o=.d) - -# rule to make library -$(BLASLIB): $(OBJS) - @ARCHIVE@ $(BLASLIB) $(OBJS) > /dev/null -ifeq ($(do_ranlib),1) - @RANLIB@ $(BLASLIB) -endif - - -# ------------------------------------------------ -# Utility Targets - -clean: - $(RM) $(OBJS) $(BLASLIB) *.d .depends - -# depends target -depends: - $(RM) *.d .depends - @MAKE@ .depends - -.depends: $(DEPENDS) - cat *.d > .depends - -$(OBJS): Makefile - -ifeq ($(wildcard .depends), .depends) -include .depends -endif - diff --git a/ext/f2c_math/CMakeLists.txt b/ext/f2c_math/CMakeLists.txt deleted file mode 100644 index 98fd72cb1..000000000 --- a/ext/f2c_math/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -SET ( CTMATH_SRCS mach.cpp ddaspk.c dgbefa.c dgbsl.c dgefa.c dgesl.c - dp1vlu.c dpcoef.c dpolft.c fdump.c j4save.c pcoef.c polfit.c pvalue.c - xercnt.c xerhlt.c xermsg.c xerprn.c xersve.c xgetua.c printstring.c) - -INCLUDE_DIRECTORIES ( ${PROJECT_SOURCE_DIR} - ${PROJECT_SOURCE_DIR}/ext/f2c_libs ) - -ADD_LIBRARY( ctmath ${CTMATH_SRCS} ) - diff --git a/ext/f2c_math/Makefile.am b/ext/f2c_math/Makefile.am new file mode 100644 index 000000000..9cc6cc6b3 --- /dev/null +++ b/ext/f2c_math/Makefile.am @@ -0,0 +1,41 @@ +cc_sources = \ +mach.cpp \ +ddaspk.c \ +dgbefa.c \ +dgbsl.c \ +dgefa.c \ +dgesl.c \ +dp1vlu.c \ +dpcoef.c \ +dpolft.c \ +fdump.c \ +j4save.c \ +pcoef.c \ +polfit.c \ +pvalue.c \ +xercnt.c \ +xerhlt.c \ +xermsg.c \ +xerprn.c \ +xersve.c \ +xgetua.c \ +printstring.c + +h_sources = cblas.h gmres.h mkl_cblas.h + +AM_CPPFLAGS = -I../f2c_libs +AM_CXXFLAGS = $(AM_CPPFLAGS) +AM_FCFLAGS = $(AM_CPPFLAGS) + +lib_LTLIBRARIES = $(top_builddir)/build/lib/libctmath.la +library_includedir = $(top_builddir)/build/include +library_include_HEADERS = $(h_sources) + +#----------------------- +# Cantera Converters C/C++ library +#----------------------- + +__top_builddir__build_lib_libctmath_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE) +__top_builddir__build_lib_libctmath_la_SOURCES = $(cc_sources) $(h_sources) + +CLEANFILES = *.o diff --git a/ext/f2c_math/Makefile.in b/ext/f2c_math/Makefile.in deleted file mode 100644 index 35ead9668..000000000 --- a/ext/f2c_math/Makefile.in +++ /dev/null @@ -1,112 +0,0 @@ -#/bin/sh -# -# $Source: /cvsroot/cantera/cantera/ext/f2c_math/Makefile.in,v $ -# $Author: hkmoffa $ -# $Revision: 1.10 $ -# $Date: 2008/12/30 21:49:42 $ -# - -.SUFFIXES : -.SUFFIXES : .c .cpp .d .o - -do_ranlib = @DO_RANLIB@ - -PURIFY=@PURIFY@ - -# the directory where the Cantera libraries are located -CANTERA_LIBDIR=@buildlib@ - -# the directory where Cantera include files may be found. -CANTERA_INCDIR=@ctroot@/build/include/cantera - -# the C++ compiler -CXX = @CXX@ - -# the C compiler -CC = @CC@ - -# C++ compile flags -PIC_FLAG=@PIC@ -CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG) -CFLAGS = @CFLAGS@ $(CXX_OPT) $(PIC_FLAG) - -# Local include files -CXX_INCLUDES=-I../f2c_libs - -# How to compile the dependency file -.c.d: - @CXX_DEPENDS@ $(CFLAGS) $(CXX_INCLUDES) $*.c > $*.d - -.cpp.d: - @CXX_DEPENDS@ $(CXX_FLAGS) $(CXX_INCLUDES) $*.cpp > $*.d - -# How to compile a C file -.c.o: - $(PURIFY) @CC@ -c $< @DEFS@ $(CFLAGS) $(CXX_INCLUDES) - -# How to compile a Cpp file -.cpp.o: - $(PURIFY) @CXX@ -c $< @DEFS@ $(CXX_FLAGS) $(CXX_INCLUDES) - - -# ----------------------------------------------- - -LIB = @buildlib@/libctmath.a - -all: $(LIB) - -OBJS = \ -mach.o \ -ddaspk.o \ -dgbefa.o \ -dgbsl.o \ -dgefa.o \ -dgesl.o \ -dp1vlu.o \ -dpcoef.o \ -dpolft.o \ -fdump.o \ -j4save.o \ -pcoef.o \ -polfit.o \ -pvalue.o \ -xercnt.o \ -xerhlt.o \ -xermsg.o \ -xerprn.o \ -xersve.o \ -xgetua.o \ -printstring.o - -SRCS = $(OBJS:.o=.cpp) - -# List of dependency files to be created -DEPENDS=$(OBJS:.o=.d) - -# How to make the static library -$(LIB): $(OBJS) - @ARCHIVE@ $(LIB) $(OBJS) -ifeq ($(do_ranlib),1) - @RANLIB@ $(LIB) -endif - -# ------------------------------------------------ -# Utility Targets - -clean: - $(RM) $(OBJS) $(LIB) *.d .depends - -# depends target -depends: - $(RM) *.d .depends - @MAKE@ .depends - -.depends: $(DEPENDS) - cat *.d > .depends - -$(OBJS): Makefile - -ifeq ($(wildcard .depends), .depends) -include .depends -endif - diff --git a/test_problems/cathermo/DH_graph_1/Makefile.am b/test_problems/cathermo/DH_graph_1/Makefile.am index 0d6b01886..c0c7269d1 100644 --- a/test_problems/cathermo/DH_graph_1/Makefile.am +++ b/test_problems/cathermo/DH_graph_1/Makefile.am @@ -7,7 +7,7 @@ AM_CXXFLAGS = $(AM_CPPFLAGS) LINK = -lctcxx -luser -loneD -lzeroD -lequil -lkinetics -ltransport -lthermo LINK += -lctnumerics -lctmath -ltpx -lctspectra -lconverters -lctbase -lcvode LINK += -lctlapack -lctblas -lctf2c -lm -lstdc++ -AM_LDFLAGS = -L/workspace/src/cantera/pecos_autotools/build/lib/ +AM_LDFLAGS = -L$(top_builddir)/build/lib/ LIBS = $(LINK) bin_PROGRAMS = DH_graph_1