diff options
author | bf <bf@FreeBSD.org> | 2011-10-06 23:32:02 +0800 |
---|---|---|
committer | bf <bf@FreeBSD.org> | 2011-10-06 23:32:02 +0800 |
commit | 309f119e006439dc09de752037051cd05a330e99 (patch) | |
tree | e362fe681d0bd178230b22c2f3d9c6ad786a62f5 | |
parent | 1bf8946149fe195b63b1e164cef75138936182c8 (diff) | |
download | freebsd-ports-gnome-309f119e006439dc09de752037051cd05a330e99.tar.gz freebsd-ports-gnome-309f119e006439dc09de752037051cd05a330e99.tar.zst freebsd-ports-gnome-309f119e006439dc09de752037051cd05a330e99.zip |
Add trlan 201009, thick-restart Lanczos method for eigenproblems.
-rw-r--r-- | math/Makefile | 1 | ||||
-rw-r--r-- | math/trlan/Makefile | 111 | ||||
-rw-r--r-- | math/trlan/distinfo | 4 | ||||
-rw-r--r-- | math/trlan/pkg-descr | 9 |
4 files changed, 125 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile index d7394b59f71a..8e7161371484 100644 --- a/math/Makefile +++ b/math/Makefile @@ -564,6 +564,7 @@ SUBDIR += tomsfastmath SUBDIR += topaz SUBDIR += triangle + SUBDIR += trlan SUBDIR += truthtable SUBDIR += tvmet SUBDIR += umatrix diff --git a/math/trlan/Makefile b/math/trlan/Makefile new file mode 100644 index 000000000000..4f62d411e8cc --- /dev/null +++ b/math/trlan/Makefile @@ -0,0 +1,111 @@ +# New ports collection makefile for: trlan +# Date created: 5 Oct 2011 +# Whom: b.f. <bf@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= trlan +PORTVERSION= 201009 +CATEGORIES= math +MASTER_SITES= https://codeforge.lbl.gov/frs/download.php/210/:1 \ + http://crd.lbl.gov/~kewu/ps/:2 \ + LOCAL/bf:1,2 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:1 trlan-ug.pdf:2 +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= bf@FreeBSD.org +COMMENT= Thick-restart Lanczos method for eigenproblems + +USE_FORTRAN= yes +USE_LDCONFIG= yes + +ALL_TARGET= lib + +PLIST_FILES= lib/libtrlan.a lib/libtrlan.so lib/libtrlan.so.1 + +.include <bsd.port.pre.mk> + +.ifndef(NOPORTDOCS) +PORTDOCS= trlan-ug.pdf +.endif + +.ifndef(NOPORTEXAMPLES) +PORTEXAMPLES= Makefile README dense.f90 simple.f90 simple77.f simplec.c +.endif + +.if ${ARCH} == sparc64 +PICFLAG= -fPIC +.else +PICFLAG= -fpic +.endif + +post-patch: + @${REINPLACE_CMD} -E \ + -e '/^(FC|FFLAGS)=/s/^/#/' \ + -e '/^F90=/s/=.*/=${FC}/' \ + ${WRKSRC}/Make.inc + @${REINPLACE_CMD} -E \ + -e '/^(CC|CFLAGS|LDFLAGS|TRLAN)=/s/^/#/' \ + ${WRKSRC}/examples/SUN/Makefile + @${REINPLACE_CMD} \ + -e 's|ar -cru|${AR} -cru|' \ + ${WRKSRC}/SRC/Makefile + +do-build: + @${ECHO_CMD} "Building static archive ..." + @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} \ + ${ALL_TARGET} + @${STRIP_CMD} -x -o ${WRKDIR}/libtrlan.a ${WRKSRC}/libtrlan.a + @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} \ + clean + @${ECHO_CMD} "Building shared library ..." + @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} \ + ${ALL_TARGET} FFLAGS="${PICFLAG} ${FFLAGS}" + @${FC} ${FFLAGS} ${LDFLAGS} -shared -Wl,-x -Wl,-soname,libtrlan.so.1 \ + -o ${WRKDIR}/libtrlan.so.1 -Wl,--whole-archive \ + ${WRKSRC}/libtrlan.a -Wl,--no-whole-archive -Wl,--as-needed + +do-install: + @${INSTALL_DATA} ${WRKDIR}/libtrlan.* ${PREFIX}/lib + @${LN} -sf libtrlan.so.1 ${PREFIX}/lib/libtrlan.so +.ifndef(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${DISTDIR}/${PORTDOCS} ${DOCSDIR} +.endif +.ifndef(NOPORTEXAMPLES) + @${MKDIR} ${EXAMPLESDIR} + @cd ${WRKSRC}/examples/SUN && ${INSTALL_DATA} ${PORTEXAMPLES} \ + ${EXAMPLESDIR} +.endif + +.if defined(MAINTAINER_MODE) + +BUILD_DEPENDS += ${LOCALBASE}/lib/libblas.so.2:${PORTSDIR}/math/blas \ + ${LOCALBASE}/lib/liblapack.so.4:${PORTSDIR}/math/lapack + +BLAS?= -L${LOCALBASE}/lib -lblas +LAPACK?= -L${LOCALBASE}/lib -llapack + +check regression-test test: test-static test-shared + +test-static: build + @${ECHO_CMD} "Checking static archive ..." + @cd ${WRKSRC}/examples/SUN; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \ + ${MAKE_ARGS} clean simple simple77 simplec \ + LDFLAGS="${LDFLAGS} ${LAPACK} ${BLAS}" \ + TRLAN="${WRKDIR}/libtrlan.a" ; \ + ./simple ; ./simple77 ; ./simplec + +test-shared: build + @${ECHO_CMD} "Checking shared library ..." + @cd ${WRKSRC}/examples/SUN; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \ + ${MAKE_ARGS} clean simple simple77 simplec \ + FFLAGS="${PICFLAG} ${FFLAGS}" \ + LDFLAGS="${LDFLAGS} ${LAPACK} ${BLAS}" \ + TRLAN="-L${WRKDIR} -ltrlan" ; \ + ./simple ; ./simple77 ; ./simplec + +.endif + +.include <bsd.port.post.mk> diff --git a/math/trlan/distinfo b/math/trlan/distinfo new file mode 100644 index 000000000000..f876350d7219 --- /dev/null +++ b/math/trlan/distinfo @@ -0,0 +1,4 @@ +SHA256 (trlan-201009.tar.gz) = 55c1394c65779ec4f46d10d315e8338e84a37e0b8db061eced348b6a7418f973 +SIZE (trlan-201009.tar.gz) = 1364220 +SHA256 (trlan-ug.pdf) = d2b9768cd26541714604336005987e011d231b0f680f5c20693a6be9b25d940b +SIZE (trlan-ug.pdf) = 319237 diff --git a/math/trlan/pkg-descr b/math/trlan/pkg-descr new file mode 100644 index 000000000000..e8c2b99dd6ab --- /dev/null +++ b/math/trlan/pkg-descr @@ -0,0 +1,9 @@ +This portable, modular Fortran 90 software package implements the thick-restart +Lanczos method, for use with real symmetric or complex Hermitian eigenvalue +problems where a small number of eigevalues and eigenvectors are needed, and +the matrices involved may be too large to store in computer memory. Most of +the arithmetic computations in the software are done through calls to BLAS +and LAPACK. The software can be instructed to write checkpoint files so that +it can be restarted is a later time. + +WWW: http://crd.lbl.gov/~kewu/trlan.html |