summaryrefslogtreecommitdiffstats
path: root/math/umfpack
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2006-05-29 20:34:20 +0000
committerthierry <thierry@FreeBSD.org>2006-05-29 20:34:20 +0000
commitdc9c392cc7f45dc1efbfaba91def94dacce1d01a (patch)
tree4adc3c59e457d29c27013b96bfddd64048c0abfa /math/umfpack
parentd68984bd579a4497e19974c6e7354d3f3cb6b12c (diff)
downloadFreeBSD-ports-dc9c392cc7f45dc1efbfaba91def94dacce1d01a.zip
FreeBSD-ports-dc9c392cc7f45dc1efbfaba91def94dacce1d01a.tar.gz
Use BLAS instead of ATLAS by default.
I used to recommend the use of ATLAS over the standard fortran BLAS. Unfortunately for some time we are not packaging ATLAS anymore, and very recently the source code of GotoBLAS has been made available for research purposes. GotoBLAS is said to be faster than ATLAS and the shared library is exchangeable with the standard BLAS. Curiously the standard BLAS is known to beat both GotoBLAS and ATLAS when the problems are not too complex, so I expect it's better for beginners. I am hereto recommending the use of shared blas by default but leaving a WITH_ATLAS knob in case someone doesn't have access to GotoBLAS and wants to try to squeeze some more performance. PR: ports/98070 Submitted by: Pedro F. Giffuni <giffunip (at) asme.org>
Diffstat (limited to 'math/umfpack')
-rw-r--r--math/umfpack/Makefile12
-rw-r--r--math/umfpack/files/patch-Make+Make.freebsd12
2 files changed, 16 insertions, 8 deletions
diff --git a/math/umfpack/Makefile b/math/umfpack/Makefile
index acdf227..d8a36eb 100644
--- a/math/umfpack/Makefile
+++ b/math/umfpack/Makefile
@@ -14,14 +14,22 @@ DISTNAME= UMFPACKv${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Unsymmetric-pattern MultiFrontal Package
+.ifdef WITH_ATLAS
LIB_DEPENDS= atlas.1:${PORTSDIR}/math/atlas
+.else
+LIB_DEPENDS= blas.1:${PORTSDIR}/math/blas
+.endif
CONFLICTS= elmer-umfpack-4*
WRKSRC= ${WRKDIR}/${DISTNAME}/UMFPACK
ALL_TARGET= lib
-CBLAS_LIBS?= -L${LOCALBASE}/lib -lcblas -latlas
+.ifdef WITH_ATLAS
+BLAS_LIBS= -lf77blas -latlas
+.else
+BLAS_LIBS?= -lblas
+.endif
post-extract:
${CP} ${WRKDIR}/${DISTNAME}/AMD/Make/Make.linux \
@@ -31,7 +39,7 @@ pre-build:
@${REINPLACE_CMD} -e 's+%%CC%%+${CC}+g ; \
s+%%CFLAGS%%+${CFLAGS}+ ; \
s+%%LOCALBASE%%+${LOCALBASE}+ ; \
- s+%%CBLAS_LIBS%%+${CBLAS_LIBS}+ ;' \
+ s+%%BLAS_LIBS%%+${BLAS_LIBS}+ ;' \
${WRKDIR}/${DISTNAME}/AMD/Make/Make.freebsd
do-install:
diff --git a/math/umfpack/files/patch-Make+Make.freebsd b/math/umfpack/files/patch-Make+Make.freebsd
index fbddae8..c516d04 100644
--- a/math/umfpack/files/patch-Make+Make.freebsd
+++ b/math/umfpack/files/patch-Make+Make.freebsd
@@ -1,5 +1,5 @@
---- Make/Make.freebsd.orig Sun Feb 19 15:26:42 2006
-+++ Make/Make.freebsd Sun Feb 19 15:29:05 2006
+--- Make/Make.freebsd.orig Sun May 28 22:27:24 2006
++++ Make/Make.freebsd Sun May 28 22:35:56 2006
@@ -6,8 +6,8 @@
# if you use the Intel compiler and the Fortran BLAS.
@@ -17,14 +17,14 @@
# 2: with the ATLAS C-BLAS (http://www.netlib.org/atlas).
-# CONFIG = -DCBLAS -I../ATLAS/include
-# LIB = -lcblas -latlas -lm
-+CONFIG = -DGETRUSAGE -DCBLAS -I../ATLAS/include -I%%LOCALBASE%%/include
-+LIB = %%CBLAS_LIBS%% -lm
++# CONFIG = -DGETRUSAGE -DCBLAS -I../ATLAS/include -I%%LOCALBASE%%/include
++# LIB = %%CBLAS_LIBS%% -lm
# 3: with Fortran interface to the ATLAS BLAS
-# CONFIG =
-# LIB = -lf77blas -latlas -lfrtbegin -lg2c -lm
-+# CONFIG = -I%%LOCALBASE%%/include
-+# LIB = -L%%LOCALBASE%%/lib -lf77blas -latlas -lfrtbegin -lg2c -lm
++CONFIG = -DGETRUSAGE
++LIB = -L%%LOCALBASE%%/lib %%BLAS_LIBS%% -lg2c -lm
# 4: with Fortran interface to the BLAS, and Goto's BLAS
- CONFIG =
OpenPOWER on IntegriCloud