From e6f98d28c1f1f488ce8bc62e35c7427546dc2de5 Mon Sep 17 00:00:00 2001 From: steven Date: Sat, 21 Oct 2006 16:58:00 +0000 Subject: [PATCH] import AMD-2.0 AMD is a set of routines for ordering a sparse matrix prior to Cholesky factorization (or for LU factorization with diagonal pivoting). There are versions in both C and Fortran. A MATLAB interface is provided. Note that this software has nothing to do with AMD the company. --- math/amd/Makefile | 58 +++++++++++++++++++ math/amd/distinfo | 8 +++ math/amd/files/Makefile | 10 ++++ math/amd/files/Makefile.f77 | 6 ++ math/amd/patches/patch-Include_amd_internal_h | 12 ++++ math/amd/pkg/DESCR | 4 ++ math/amd/pkg/PFRAG.shared | 3 + math/amd/pkg/PLIST | 10 ++++ 8 files changed, 111 insertions(+) create mode 100644 math/amd/Makefile create mode 100644 math/amd/distinfo create mode 100644 math/amd/files/Makefile create mode 100644 math/amd/files/Makefile.f77 create mode 100644 math/amd/patches/patch-Include_amd_internal_h create mode 100644 math/amd/pkg/DESCR create mode 100644 math/amd/pkg/PFRAG.shared create mode 100644 math/amd/pkg/PLIST diff --git a/math/amd/Makefile b/math/amd/Makefile new file mode 100644 index 00000000000..9333b0300de --- /dev/null +++ b/math/amd/Makefile @@ -0,0 +1,58 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2006/10/21 16:58:00 steven Exp $ + +COMMENT= "order a sparse matrix prior to Cholesky factorization" + +DISTNAME= AMD +PKGNAME= ${DISTNAME:L}-2.0 +SHARED_LIBS= amd 0.0 \ + amdf77 0.0 + +CATEGORIES= math + +HOMEPAGE= http://www.cise.ufl.edu/research/sparse/amd/ + +MAINTAINER= Steven Mestdagh + +# LGPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= ${HOMEPAGE}/current/ +MASTER_SITES0= ${HOMEPAGE}../UFconfig/current/ +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} UFconfig.tar.gz:0 +DIST_SUBDIR= ${PKGNAME} +WRKSRC= ${WRKDIST}/Source + +MAKE_FILE= ${FILESDIR}/Makefile +MAKE_ENV= SHLIB_MAJOR=${LIBamd_VERSION:R} \ + SHLIB_MINOR=${LIBamd_VERSION:E} +MAKE_FLAGS= CSRC="${CSRC}" +MAKE_ENV_F77= SHLIB_MAJOR=${LIBamdf77_VERSION:R} \ + SHLIB_MINOR=${LIBamdf77_VERSION:E} +FAKE_FLAGS= ${DESTDIRNAME}=${WRKINST} LIBDIR=${LOCALBASE}/lib DEBUGLIBS=no +CFLAGS+= -I${WRKDIST}/Include -I${WRKDIR}/UFconfig + +CSRC= aat 1 2 dump postorder post_tree defaults order control info \ + valid preprocess + +pre-configure: + @echo "#define DINT 1" > ${WRKSRC}/di.c + @echo "#define DLONG 1" > ${WRKSRC}/dl.c +.for s in ${CSRC} + @cd ${WRKSRC} && cat di.c amd_${s}.c > amd_i_${s}.c + @cd ${WRKSRC} && cat dl.c amd_${s}.c > amd_l_${s}.c +.endfor + +post-build: + cd ${WRKBUILD} && ${SETENV} ${MAKE_ENV_F77} ${MAKE_PROGRAM} \ + ${MAKE_FLAGS} -f ${FILESDIR}/Makefile.f77 ${ALL_TARGET} + +post-install: + cd ${WRKBUILD} && ${SETENV} ${MAKE_ENV_F77} ${MAKE_PROGRAM} \ + ${FAKE_FLAGS} -f ${FILESDIR}/Makefile.f77 ${INSTALL_TARGET} + ${INSTALL_DATA_DIR} ${PREFIX}/include/amd + ${INSTALL_DATA} ${WRKDIST}/Include/amd.h ${PREFIX}/include/amd + +.include diff --git a/math/amd/distinfo b/math/amd/distinfo new file mode 100644 index 00000000000..7fc96a0400f --- /dev/null +++ b/math/amd/distinfo @@ -0,0 +1,8 @@ +MD5 (amd-2.0/AMD.tar.gz) = 67b3d3f0fcf09653a747c38e98a80d61 +MD5 (amd-2.0/UFconfig.tar.gz) = 7c2b920767741d49452c61bb368df9bd +RMD160 (amd-2.0/AMD.tar.gz) = 0218bbb48f637cf9ef288c87666455cbeeddcca0 +RMD160 (amd-2.0/UFconfig.tar.gz) = 36f5f0999a0c76097a511375ee8dc27ad7df1bf9 +SHA1 (amd-2.0/AMD.tar.gz) = 52dc7dee90d945e77fe20a6f7eb54368095c9580 +SHA1 (amd-2.0/UFconfig.tar.gz) = f333b4ad2b0d92295548c01ede70dcfc83a76299 +SIZE (amd-2.0/AMD.tar.gz) = 267034 +SIZE (amd-2.0/UFconfig.tar.gz) = 6197 diff --git a/math/amd/files/Makefile b/math/amd/files/Makefile new file mode 100644 index 00000000000..1ecc20d26af --- /dev/null +++ b/math/amd/files/Makefile @@ -0,0 +1,10 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2006/10/21 16:58:00 steven Exp $ + +LIB= amd + +SRCS= amd_global.c +.for s in ${CSRC} +SRCS+= amd_i_${s}.c amd_l_${s}.c +.endfor + +.include diff --git a/math/amd/files/Makefile.f77 b/math/amd/files/Makefile.f77 new file mode 100644 index 00000000000..19beeab9d5a --- /dev/null +++ b/math/amd/files/Makefile.f77 @@ -0,0 +1,6 @@ +# $OpenBSD: Makefile.f77,v 1.1.1.1 2006/10/21 16:58:00 steven Exp $ + +LIB=amdf77 +SRCS = amd.f amdbar.f + +.include diff --git a/math/amd/patches/patch-Include_amd_internal_h b/math/amd/patches/patch-Include_amd_internal_h new file mode 100644 index 00000000000..6f0afb5e5ff --- /dev/null +++ b/math/amd/patches/patch-Include_amd_internal_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-Include_amd_internal_h,v 1.1.1.1 2006/10/21 16:58:00 steven Exp $ +--- Include/amd_internal.h.orig Tue Oct 17 16:57:01 2006 ++++ Include/amd_internal.h Tue Oct 17 16:57:20 2006 +@@ -153,7 +153,7 @@ + #define NULL 0 + + /* largest value of size_t */ +-#define SIZE_T_MAX ((size_t) (-1)) ++/* #define SIZE_T_MAX ((size_t) (-1)) */ + + /* ------------------------------------------------------------------------- */ + /* integer type for AMD: int or UF_long */ diff --git a/math/amd/pkg/DESCR b/math/amd/pkg/DESCR new file mode 100644 index 00000000000..b5f249bce17 --- /dev/null +++ b/math/amd/pkg/DESCR @@ -0,0 +1,4 @@ +AMD is a set of routines for ordering a sparse matrix prior to Cholesky +factorization (or for LU factorization with diagonal pivoting). There +are versions in both C and Fortran. A MATLAB interface is provided. +Note that this software has nothing to do with AMD the company. diff --git a/math/amd/pkg/PFRAG.shared b/math/amd/pkg/PFRAG.shared new file mode 100644 index 00000000000..5ec297a0d16 --- /dev/null +++ b/math/amd/pkg/PFRAG.shared @@ -0,0 +1,3 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2006/10/21 16:58:00 steven Exp $ +@lib lib/libamd.so.${LIBamd_VERSION} +@lib lib/libamdf77.so.${LIBamdf77_VERSION} diff --git a/math/amd/pkg/PLIST b/math/amd/pkg/PLIST new file mode 100644 index 00000000000..675aabd4931 --- /dev/null +++ b/math/amd/pkg/PLIST @@ -0,0 +1,10 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2006/10/21 16:58:00 steven Exp $ +%%SHARED%% +include/amd/ +include/amd/amd.h +lib/libamd.a +lib/libamd_p.a +lib/libamd_pic.a +lib/libamdf77.a +lib/libamdf77_p.a +lib/libamdf77_pic.a