Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2008 15:06:24 GMT
From:      "Pedro F. Giffuni" <giffunip@tutopia.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/124785: Enhancements to math/superlu_mt
Message-ID:  <200806201506.m5KF6Oxv087538@www.freebsd.org>
Resent-Message-ID: <200806201510.m5KFA87w076773@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         124785
>Category:       ports
>Synopsis:       Enhancements to math/superlu_mt
>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:   Fri Jun 20 15:10:08 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Pedro F. Giffuni
>Release:        6.3-Release
>Organization:
>Environment:
FreeBSD kakumen.cable.net.co 6.3-RELEASE FreeBSD 6.3-RELEASE #10: Sat Jan 19 01:13:55 COT 2008     root@kakumen.cable.net.co:/usr/src/sys/amd64/compile/SMP  amd64
>Description:
- Added target for regression-test
- This also resulted in cleanups to the build
- No functional change
>How-To-Repeat:

>Fix:
diff -ruN superlu_mt.orig/Makefile superlu_mt/Makefile
--- superlu_mt.orig/Makefile	2008-06-18 01:07:11.000000000 -0500
+++ superlu_mt/Makefile	2008-06-20 10:01:41.000000000 -0500
@@ -35,13 +35,17 @@
 .endif
 
 WRKSRC=		${WRKDIR}/SuperLU_MT
-ALL_TARGET=	superlulib
+ALL_TARGET=	lib
 
 ARCH2FIX=	CBLAS/Makefile make.alpha make.exemplar TESTING/MATGEN/Makefile	\
 		make.origin make.inc make.pthreads SRC/Makefile
 
 post-patch:
 	@${REINPLACE_CMD} -e 's+%%BLAS_LIBS%%+-L${LOCALBASE}/lib ${BLAS_LIBS}+ ; \
+			s+%%FORTRANLIBS%%+-L${LOCALBASE}/lib ${FORTRANLIBS}+; \
+			s+%%CC%%+${CC}+; s+%%FC%%+${FC}+; \
+			s+%%CFLAGS%%+${CFLAGS}+; \
+			s+%%FFLAGS%%+${FFLAGS}+; \
 	  s+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+ ; \
 	  s+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+ ' \
 		${WRKSRC}/make.inc
@@ -61,4 +65,8 @@
 	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/simax97.ps.gz ${DOCSDIR}
 .endif
 
+regression-test: build
+	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} testing)
+	@(cd ${WRKSRC}/TESTING && ./plintstd pdtest.csh)
+
 .include <bsd.port.mk>
diff -ruN superlu_mt.orig/files/patch-TESTING+pddrive.c superlu_mt/files/patch-TESTING+pddrive.c
--- superlu_mt.orig/files/patch-TESTING+pddrive.c	1969-12-31 19:00:00.000000000 -0500
+++ superlu_mt/files/patch-TESTING+pddrive.c	2008-06-18 22:12:16.000000000 -0500
@@ -0,0 +1,14 @@
+--- TESTING/pddrive.c.orig	2008-06-18 22:06:40.000000000 -0500
++++ TESTING/pddrive.c	2008-06-18 22:08:38.000000000 -0500
+@@ -9,6 +9,11 @@
+ #define	FMT2      "%10s:fact=%d, trans=%d, refact=%d, equed=%d, n=%d, imat=%d, test(%d)=%12.5g\n"
+ #define FMT3      "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n"
+ 
++/* SuperLU compatibility */
++#define DN SLU_DN
++#define _D SLU_D
++#define GE SLU_GE
++#define NC SLU_NC
+ 
+ main(int argc, char *argv[])
+ {
diff -ruN superlu_mt.orig/files/patch-TESTING+pdgssv.c superlu_mt/files/patch-TESTING+pdgssv.c
--- superlu_mt.orig/files/patch-TESTING+pdgssv.c	1969-12-31 19:00:00.000000000 -0500
+++ superlu_mt/files/patch-TESTING+pdgssv.c	2008-06-18 22:12:57.000000000 -0500
@@ -0,0 +1,16 @@
+--- TESTING/pdgssv.c.orig	2008-06-18 22:09:01.000000000 -0500
++++ TESTING/pdgssv.c	2008-06-18 22:10:18.000000000 -0500
+@@ -1,6 +1,13 @@
+ #include "pdsp_defs.h"
+ #include "util.h"
+ 
++/* SuperLU compatibility */
++#define DN SLU_DN
++#define _D SLU_D
++#define GE SLU_GE
++#define NC SLU_NC
++#define NR SLU_NR
++
+ void
+ pdgssv(int nprocs, SuperMatrix *A, int *perm_c, int *perm_r, 
+        SuperMatrix *L, SuperMatrix *U, SuperMatrix *B, int *info )
diff -ruN superlu_mt.orig/files/patch-TESTING+pdgssvx.c superlu_mt/files/patch-TESTING+pdgssvx.c
--- superlu_mt.orig/files/patch-TESTING+pdgssvx.c	1969-12-31 19:00:00.000000000 -0500
+++ superlu_mt/files/patch-TESTING+pdgssvx.c	2008-06-18 22:13:12.000000000 -0500
@@ -0,0 +1,16 @@
+--- TESTING/pdgssvx.c.orig	2008-06-18 22:10:35.000000000 -0500
++++ TESTING/pdgssvx.c	2008-06-18 22:11:10.000000000 -0500
+@@ -1,6 +1,13 @@
+ #include "pdsp_defs.h"
+ #include "util.h"
+ 
++/* SuperLU compatibility */
++#define DN SLU_DN
++#define _D SLU_D
++#define GE SLU_GE
++#define NC SLU_NC
++#define NR SLU_NR
++
+ void
+ pdgssvx(int nprocs, pdgstrf_options_t *pdgstrf_options, SuperMatrix *A, 
+ 	int *perm_c, int *perm_r, equed_t *equed, double *R, double *C,
diff -ruN superlu_mt.orig/files/patch-make.inc superlu_mt/files/patch-make.inc
--- superlu_mt.orig/files/patch-make.inc	2008-06-18 01:07:11.000000000 -0500
+++ superlu_mt/files/patch-make.inc	2008-06-19 21:57:23.000000000 -0500
@@ -1,5 +1,5 @@
---- make.inc.orig	Thu Sep  2 15:47:13 1999
-+++ make.inc	Tue May 27 19:32:12 2003
+--- make.inc.orig	1999-09-02 15:47:13.000000000 -0500
++++ make.inc	2008-06-19 21:48:42.000000000 -0500
 @@ -14,14 +14,15 @@
  #
  #  The machine (platform) identifier to append to the library names
@@ -14,7 +14,7 @@
 +TMGLIB       	= libtmg.a
 +SUPERLULIB   	= libsuperlu_mt.a
 +BLASDEF		= -DUSE_VENDOR_BLAS
-+BLASLIB     	= %%BLAS_LIBS%%
++BLASLIB     	= %%BLAS_LIBS%% %%FORTRANLIBS%%
  MATHLIB	     	= -lm 
 -MPLIB		= -lthread
 +MPLIB		= %%PTHREAD_LIBS%%
@@ -26,21 +26,22 @@
  
  # for Solaris 2.x
 -CC	     	= cc
-+CC	     	?= cc
++CC	     	= %%CC%%
  #
  # Definitions used by CPP:
  PREDEFS      	= -D$(PLAT)
  #
 -CFLAGS       	= $(PREDEFS) -xO3 -xcg92 $(DBG)
-+CFLAGS       	+= $(PREDEFS) %%PTHREAD_CFLAGS%%
++CFLAGS       	= $(PREDEFS) %%CFLAGS%% %%PTHREAD_CFLAGS%%
  NOOPTS	     	=
  BLASOPTS	=
- LOADER       	= cc
+-LOADER       	= cc
++LOADER       	= %%FC%%
  LOADOPTS     	= -O
 -FORTRAN		= f77
 -FFLAGS		= -O
-+FORTRAN		?= f77
-+FFLAGS		?= -O
++FORTRAN		= %%FC%%
++FFLAGS		= %%FFLAGS%%
  
  #
  #  C preprocessor defs for compilation (-DNoChange, -DAdd_, or -DUpCase)


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806201506.m5KF6Oxv087538>