ports/98070: math/umfpack: use BLAS instead of ATLAS by default
Pedro F. Giffuni
giffunip at asme.org
Mon May 29 04:10:19 UTC 2006
>Number: 98070
>Category: ports
>Synopsis: math/umfpack: use BLAS instead of ATLAS by default
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon May 29 04:10:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Pedro F. Giffuni
>Release: 6.1-Release (amd64)
>Organization:
>Environment:
FreeBSD etoile.cable.net.co 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Fri May 12 00:18:58 COT 2006 root at etoile.cable.net.co:/usr/src/sys/amd64/compile/DIMENSION amd64
>Description:
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.
>How-To-Repeat:
BTW, I am also aware there is a new version of umfpack, but it's now LGPL'd and it requires other ports to work so it's not very high in my priorities at the time.
>Fix:
diff -ruN umfpack.orig/Makefile umfpack/Makefile
--- umfpack.orig/Makefile Sun May 28 22:23:39 2006
+++ umfpack/Makefile Sun May 28 22:43:33 2006
@@ -14,14 +14,22 @@
MAINTAINER= ports at 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 @@
@${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 -ruN umfpack.orig/files/patch-Make+Make.freebsd umfpack/files/patch-Make+Make.freebsd
--- umfpack.orig/files/patch-Make+Make.freebsd Sun May 28 22:23:39 2006
+++ umfpack/files/patch-Make+Make.freebsd Sun May 28 22:36:06 2006
@@ -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 =
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list