2010-08-24 06:04:11 +02:00
|
|
|
diff --git a/Demo/Makefile.am b/Demo/Makefile.am
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/Demo/Makefile.am
|
2014-01-01 11:20:52 +01:00
|
|
|
@@ -0,0 +1,46 @@
|
|
|
|
+AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS) $(CHOLMOD_CFLAGS)
|
2010-08-24 06:04:11 +02:00
|
|
|
+LDADD = $(top_builddir)/Source/libklu.la
|
|
|
|
+
|
|
|
|
+EXTRA_DIST = \
|
|
|
|
+ klu_simple.out \
|
|
|
|
+ kludemo.out
|
|
|
|
+
|
|
|
|
+# Disable the .out implicit pattern rule. Prevents GNU make from
|
|
|
|
+# adding bogus dependencies for the .out files listed above.
|
|
|
|
+%.out: %
|
|
|
|
+
|
2014-01-01 11:20:52 +01:00
|
|
|
+check_PROGRAMS = klu_simple
|
2010-08-24 06:04:11 +02:00
|
|
|
+TESTS = klu_simple
|
|
|
|
+klu_simple_SOURCES = klu_simple.c
|
|
|
|
+
|
2014-01-01 11:20:52 +01:00
|
|
|
+if CHOLMOD
|
|
|
|
+check_PROGRAMS += kludemo kluldemo
|
|
|
|
+
|
2010-08-24 06:04:11 +02:00
|
|
|
+kludemo_SOURCES = kludemo.c
|
2011-06-19 16:30:25 +02:00
|
|
|
+kludemo_LDADD = $(LDADD) $(CHOLMOD_LIBS) -lm
|
2010-08-24 06:04:11 +02:00
|
|
|
+
|
|
|
|
+kluldemo_SOURCES = kluldemo.c
|
2011-06-19 16:30:25 +02:00
|
|
|
+kluldemo_LDADD = $(LDADD) $(CHOLMOD_LIBS) -lm
|
2010-08-24 06:04:11 +02:00
|
|
|
+
|
|
|
|
+MATRICES = \
|
2014-01-01 11:20:52 +01:00
|
|
|
+ $(top_srcdir)/Matrix/1c.mtx \
|
|
|
|
+ $(top_srcdir)/Matrix/arrowc.mtx \
|
|
|
|
+ $(top_srcdir)/Matrix/arrow.mtx \
|
|
|
|
+ $(top_srcdir)/Matrix/impcol_a.mtx \
|
|
|
|
+ $(top_srcdir)/Matrix/w156.mtx \
|
|
|
|
+ $(top_srcdir)/Matrix/ctina.mtx
|
2010-08-24 06:04:11 +02:00
|
|
|
+
|
|
|
|
+check-local: kludemo kluldemo $(MATRICES)
|
2014-01-01 11:20:52 +01:00
|
|
|
+ -./kludemo < $(top_srcdir)/Matrix/1c.mtx
|
|
|
|
+ -./kludemo < $(top_srcdir)/Matrix/arrowc.mtx
|
|
|
|
+ -./kludemo < $(top_srcdir)/Matrix/arrow.mtx
|
|
|
|
+ -./kludemo < $(top_srcdir)/Matrix/impcol_a.mtx
|
|
|
|
+ -./kludemo < $(top_srcdir)/Matrix/w156.mtx
|
|
|
|
+ -./kludemo < $(top_srcdir)/Matrix/ctina.mtx
|
|
|
|
+ -./kluldemo < $(top_srcdir)/Matrix/1c.mtx
|
|
|
|
+ -./kluldemo < $(top_srcdir)/Matrix/arrowc.mtx
|
|
|
|
+ -./kluldemo < $(top_srcdir)/Matrix/arrow.mtx
|
|
|
|
+ -./kluldemo < $(top_srcdir)/Matrix/impcol_a.mtx
|
|
|
|
+ -./kluldemo < $(top_srcdir)/Matrix/w156.mtx
|
|
|
|
+ -./kluldemo < $(top_srcdir)/Matrix/ctina.mtx
|
|
|
|
+endif
|
2010-08-24 06:04:11 +02:00
|
|
|
diff --git a/Doc/Makefile.am b/Doc/Makefile.am
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/Doc/Makefile.am
|
2014-01-01 11:20:52 +01:00
|
|
|
@@ -0,0 +1,48 @@
|
|
|
|
+EXTRA_DIST = ChangeLog lesser.txt
|
2010-08-24 06:04:11 +02:00
|
|
|
+
|
|
|
|
+dist_noinst_DATA = KLU_UserGuide.tex KLU_UserGuide.bib
|
2014-01-01 11:20:52 +01:00
|
|
|
+dist_pdf_DATA = KLU_UserGuide.pdf palamadai_e.pdf
|
|
|
|
+
|
|
|
|
+SRC = \
|
|
|
|
+ klu_h.tex \
|
|
|
|
+ btf_h.tex \
|
|
|
|
+ klu_simple_c.tex
|
|
|
|
+
|
|
|
|
+KLU_UserGuide.pdf KLU_UserGuide.aux: $(SRC)
|
|
|
|
+.INTERMEDIATE: KLU_UserGuide.aux $(SRC)
|
|
|
|
+
|
|
|
|
+define verbatim =
|
|
|
|
+echo '\begin{verbatim}' > $@
|
|
|
|
+expand -8 $< >> $@
|
|
|
|
+echo '\end{verbatim}' >> $@
|
|
|
|
+endef
|
|
|
|
+
|
|
|
|
+klu_h.tex: $(top_srcdir)/Include/klu.h
|
|
|
|
+ $(verbatim)
|
|
|
|
+
|
|
|
|
+# FIXME: We don't know the location of btf.h.
|
|
|
|
+# Insert a placeholder for now.
|
2010-08-24 06:04:11 +02:00
|
|
|
+#btf_h.tex: /usr/include/btf.h
|
2014-01-01 11:20:52 +01:00
|
|
|
+# $(verbatim)
|
|
|
|
+btf_h.tex:
|
|
|
|
+ echo '\begin{verbatim}' > $@
|
|
|
|
+ echo 'See your btf.h local install' >> $@
|
|
|
|
+ echo '\end{verbatim}' >> $@
|
|
|
|
+
|
|
|
|
+klu_simple_c.tex: $(top_srcdir)/Demo/klu_simple.c
|
|
|
|
+ $(verbatim)
|
|
|
|
+
|
|
|
|
+TEX = TEXINPUTS="$(srcdir):" pdflatex -interaction nonstopmode -file-line-error
|
|
|
|
+BIB = BIBINPUTS="$(srcdir):" bibtex
|
|
|
|
+%.pdf: %.tex %.bbl
|
|
|
|
+ $(TEX) $*
|
|
|
|
+ while grep -q "Rerun to get cross-references right" $*.log; do \
|
|
|
|
+ $(TEX) $*; \
|
|
|
|
+ done
|
|
|
|
+%.bbl: %.aux %.bib
|
|
|
|
+ $(BIB) $*
|
|
|
|
+%.aux: %.tex
|
|
|
|
+ $(TEX) $*
|
|
|
|
+
|
|
|
|
+CLEANFILES = *.aux *.bbl *.blg *.log *.toc $(SRC)
|
|
|
|
+MAINTAINERCLEANFILES = $(dist_pdf_DATA)
|
2011-06-19 16:30:25 +02:00
|
|
|
diff --git a/Include/Makefile.am b/Include/Makefile.am
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/Include/Makefile.am
|
2014-01-01 11:20:52 +01:00
|
|
|
@@ -0,0 +1 @@
|
2011-06-19 16:30:25 +02:00
|
|
|
+pkginclude_HEADERS = klu.h klu_internal.h klu_version.h
|
2010-08-24 06:04:11 +02:00
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/Makefile.am
|
2011-06-19 16:30:25 +02:00
|
|
|
@@ -0,0 +1,5 @@
|
|
|
|
+SUBDIRS = Include Source User Matrix Demo Doc
|
2010-08-24 06:04:11 +02:00
|
|
|
+EXTRA_DIST = README.txt
|
2011-06-19 16:30:25 +02:00
|
|
|
+
|
|
|
|
+pkgconfigdir = $(libdir)/pkgconfig
|
|
|
|
+pkgconfig_DATA = klu.pc
|
2010-08-24 06:04:11 +02:00
|
|
|
diff --git a/Matrix/Makefile.am b/Matrix/Makefile.am
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/Matrix/Makefile.am
|
|
|
|
@@ -0,0 +1,11 @@
|
|
|
|
+dist_noinst_DATA = \
|
|
|
|
+ 1c.mtx \
|
|
|
|
+ GD99_cc.mtx \
|
|
|
|
+ arrow.mtx \
|
|
|
|
+ arrowc.mtx \
|
|
|
|
+ ctina.mtx \
|
|
|
|
+ impcol_a.mtx \
|
|
|
|
+ one.mtx \
|
|
|
|
+ onec.mtx \
|
|
|
|
+ two.mtx \
|
|
|
|
+ w156.mtx
|
|
|
|
diff --git a/Source/Makefile.am b/Source/Makefile.am
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/Source/Makefile.am
|
|
|
|
@@ -0,0 +1,40 @@
|
2014-01-01 11:20:52 +01:00
|
|
|
+AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS)
|
2010-08-24 06:04:11 +02:00
|
|
|
+
|
|
|
|
+noinst_LTLIBRARIES = libklud.la libkluz.la libklul.la libkluzl.la
|
|
|
|
+
|
|
|
|
+KLUSRC = \
|
|
|
|
+ klu.c \
|
|
|
|
+ klu_diagnostics.c \
|
|
|
|
+ klu_dump.c \
|
|
|
|
+ klu_extract.c \
|
|
|
|
+ klu_factor.c \
|
|
|
|
+ klu_free_numeric.c \
|
|
|
|
+ klu_kernel.c \
|
|
|
|
+ klu_refactor.c \
|
|
|
|
+ klu_scale.c \
|
|
|
|
+ klu_solve.c \
|
|
|
|
+ klu_sort.c \
|
|
|
|
+ klu_tsolve.c
|
|
|
|
+
|
|
|
|
+CKLUSRC = \
|
|
|
|
+ klu_analyze.c \
|
|
|
|
+ klu_analyze_given.c \
|
|
|
|
+ klu_defaults.c \
|
|
|
|
+ klu_free_symbolic.c \
|
|
|
|
+ klu_memory.c
|
|
|
|
+
|
|
|
|
+libklud_la_SOURCES = $(KLUSRC) $(CKLUSRC)
|
|
|
|
+
|
|
|
|
+libkluz_la_SOURCES = $(KLUSRC)
|
|
|
|
+libkluz_la_CPPFLAGS = $(AM_CPPFLAGS) -DCOMPLEX
|
|
|
|
+
|
|
|
|
+libklul_la_SOURCES = $(KLUSRC) $(CKLUSRC)
|
|
|
|
+libklul_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
|
|
|
|
+
|
|
|
|
+libkluzl_la_SOURCES = $(KLUSRC)
|
|
|
|
+libkluzl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DCOMPLEX
|
|
|
|
+
|
|
|
|
+lib_LTLIBRARIES = libklu.la
|
|
|
|
+libklu_la_SOURCES =
|
2014-01-01 11:20:52 +01:00
|
|
|
+libklu_la_LIBADD = libklud.la libkluz.la libklul.la libkluzl.la $(AMD_LIBS) $(COLAMD_LIBS) $(BTF_LIBS)
|
|
|
|
+libklu_la_LDFLAGS = -no-undefined -version-number 1:2:1
|
2010-08-24 06:04:11 +02:00
|
|
|
diff --git a/User/Makefile.am b/User/Makefile.am
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/User/Makefile.am
|
2014-01-01 11:20:52 +01:00
|
|
|
@@ -0,0 +1,12 @@
|
|
|
|
+AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS) $(CHOLMOD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS)
|
2010-08-24 06:04:11 +02:00
|
|
|
+
|
|
|
|
+EXTRA_DIST = README.txt
|
|
|
|
+
|
2014-01-01 11:20:52 +01:00
|
|
|
+if CHOLMOD
|
2011-06-19 16:30:25 +02:00
|
|
|
+pkginclude_HEADERS = klu_cholmod.h
|
|
|
|
+
|
2010-08-24 06:04:11 +02:00
|
|
|
+lib_LTLIBRARIES = libklu_cholmod.la
|
|
|
|
+libklu_cholmod_la_SOURCES = klu_cholmod.c klu_l_cholmod.c
|
2011-06-19 16:30:25 +02:00
|
|
|
+libklu_cholmod_la_LIBADD = $(CHOLMOD_LIBS)
|
2014-01-01 11:20:52 +01:00
|
|
|
+libklu_cholmod_la_LDFLAGS = -no-undefined -version-number 1:2:1
|
|
|
|
+endif
|
2010-08-24 06:04:11 +02:00
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/configure.ac
|
2014-01-01 11:20:52 +01:00
|
|
|
@@ -0,0 +1,62 @@
|
|
|
|
+# -*- Autoconf -*-
|
|
|
|
+# Process this file with autoconf to produce a configure script.
|
|
|
|
+
|
|
|
|
+AC_PREREQ([2.69])
|
|
|
|
+AC_INIT([KLU],[1.2.1],[DrTimothyAldenDavis@gmail.com],[klu],[http://www.suitesparse.com/])
|
2010-08-24 06:04:11 +02:00
|
|
|
+AC_CONFIG_SRCDIR([Source/klu.c])
|
2014-01-01 11:20:52 +01:00
|
|
|
+AC_CONFIG_HEADERS([config.h])
|
2010-08-24 06:04:11 +02:00
|
|
|
+AM_INIT_AUTOMAKE([foreign])
|
|
|
|
+LT_INIT
|
|
|
|
+
|
2014-01-01 11:20:52 +01:00
|
|
|
+# Checks for programs.
|
2010-08-24 06:04:11 +02:00
|
|
|
+AC_PROG_INSTALL
|
|
|
|
+AC_PROG_CC
|
|
|
|
+
|
|
|
|
+LIBS_SAVED=$LIBS
|
|
|
|
+
|
2014-01-01 11:20:52 +01:00
|
|
|
+# Checks for libraries.
|
2010-08-24 06:04:11 +02:00
|
|
|
+AC_CHECK_LIB([m], [sqrt])
|
|
|
|
+
|
2011-06-19 16:30:25 +02:00
|
|
|
+PKG_PROG_PKG_CONFIG
|
2014-01-01 11:20:52 +01:00
|
|
|
+PKG_CHECK_MODULES([SUITESPARSECONFIG],[suitesparseconfig],
|
2011-06-19 16:30:25 +02:00
|
|
|
+ [],
|
2014-01-01 11:20:52 +01:00
|
|
|
+ [AC_MSG_ERROR([cannot find suitesparseconfig])])
|
2011-06-19 16:30:25 +02:00
|
|
|
+PKG_CHECK_MODULES([AMD],[amd],
|
|
|
|
+ [],
|
|
|
|
+ [AC_MSG_ERROR([cannot find amd])])
|
|
|
|
+PKG_CHECK_MODULES([COLAMD],[colamd],
|
|
|
|
+ [],
|
|
|
|
+ [AC_MSG_ERROR([cannot find colamd])])
|
2014-01-01 11:20:52 +01:00
|
|
|
+PKG_CHECK_MODULES([BTF],[btf],
|
2011-06-19 16:30:25 +02:00
|
|
|
+ [],
|
2014-01-01 11:20:52 +01:00
|
|
|
+ [AC_MSG_ERROR([cannot find btf])])
|
|
|
|
+PKG_CHECK_MODULES([CHOLMOD],[cholmod],
|
|
|
|
+ [cholmod="yes"],
|
|
|
|
+ [cholmod="no"])
|
|
|
|
+if test "x$cholmod" != "xyes"; then
|
|
|
|
+ AC_MSG_WARN([cannot find cholmod, disabling some functionality])
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+# Checks for header files.
|
|
|
|
+AC_CHECK_HEADERS([limits.h stdlib.h])
|
2010-08-24 06:04:11 +02:00
|
|
|
+
|
2014-01-01 11:20:52 +01:00
|
|
|
+# Checks for typedefs, structures, and compiler characteristics.
|
2010-08-24 06:04:11 +02:00
|
|
|
+AC_TYPE_SIZE_T
|
|
|
|
+
|
2014-01-01 11:20:52 +01:00
|
|
|
+# Checks for library functions.
|
2010-08-24 06:04:11 +02:00
|
|
|
+AC_CHECK_FUNCS([sqrt])
|
|
|
|
+
|
|
|
|
+LIBS=$LIBS_SAVED
|
|
|
|
+
|
2014-01-01 11:20:52 +01:00
|
|
|
+AM_CONDITIONAL([CHOLMOD], [test "x$cholmod" = "xyes"])
|
|
|
|
+
|
2010-08-24 06:04:11 +02:00
|
|
|
+AC_CONFIG_FILES([
|
2011-06-19 16:30:25 +02:00
|
|
|
+ klu.pc
|
2010-08-24 06:04:11 +02:00
|
|
|
+ Makefile
|
|
|
|
+ Demo/Makefile
|
|
|
|
+ Doc/Makefile
|
2011-06-19 16:30:25 +02:00
|
|
|
+ Include/Makefile
|
2010-08-24 06:04:11 +02:00
|
|
|
+ Matrix/Makefile
|
|
|
|
+ Source/Makefile
|
|
|
|
+ User/Makefile])
|
|
|
|
+AC_OUTPUT
|
2011-06-19 16:30:25 +02:00
|
|
|
diff --git a/klu.pc.in b/klu.pc.in
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/klu.pc.in
|
2014-01-01 11:20:52 +01:00
|
|
|
@@ -0,0 +1,13 @@
|
2011-06-19 16:30:25 +02:00
|
|
|
+prefix=@prefix@
|
|
|
|
+exec_prefix=@exec_prefix@
|
|
|
|
+libdir=@libdir@
|
|
|
|
+includedir=@includedir@
|
|
|
|
+
|
|
|
|
+Name: @PACKAGE_NAME@
|
|
|
|
+Description: Sparse LU factorization for circuit simulation
|
|
|
|
+Version: @PACKAGE_VERSION@
|
2014-01-01 11:20:52 +01:00
|
|
|
+URL: @PACKAGE_URL@
|
|
|
|
+Requires.private: amd colamd btf
|
2011-06-19 16:30:25 +02:00
|
|
|
+Libs: -L${libdir} -lklu
|
|
|
|
+Libs.private: -lm
|
|
|
|
+Cflags: -I${includedir}/klu
|