Update math/superlu_mt to version 3.1, along with some cleanups.

PR:		219265
Submitted by:	pfg
This commit is contained in:
Thierry Thomas 2017-06-17 08:34:19 +00:00
parent 5fd41657b0
commit f4547b0bb1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=443735
10 changed files with 92 additions and 147 deletions

View File

@ -2,12 +2,11 @@
# $FreeBSD$
PORTNAME= superlu_mt
PORTVERSION= 2.0.20080115
PORTREVISION= 9
PORTVERSION= 3.1.20160319
CATEGORIES= math
MASTER_SITES= http://crd.lbl.gov/~xiaoye/SuperLU/ \
http://crd.lbl.gov/~xiaoye/:doc
DISTNAME= ${PORTNAME}_2.0
DISTNAME= ${PORTNAME}_3.1
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} simax97.ps.gz:doc
DIST_SUBDIR= superlu2
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
@ -15,7 +14,11 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Routines for performing multithreaded sparse factorization
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/License.txt
BROKEN_aarch64= fails to build: undefined reference to sbrk
BROKEN_sparc64= Does not link on sparc64
USES= fortran gmake
@ -49,21 +52,16 @@ FPIC= -fPIC
FPIC= -fpic
.endif
.if ${ARCH} == "sparc64"
BROKEN= Does not link on sparc64
.endif
USE_LDCONFIG= yes
WRKSRC= ${WRKDIR}/SuperLU_MT_2.0
WRKSRC_SHARED= ${WRKDIR}/SuperLU_MT_2.0_shared
WRKSRC= ${WRKDIR}/SuperLU_MT_3.1
WRKSRC_SHARED= ${WRKDIR}/SuperLU_MT_3.1_shared
ALL_TARGET= lib
SVERSION= 1
SVERSION= 3
ARCH2FIX= CBLAS/Makefile MAKE_INC/make.openmp MAKE_INC/make.exemplar \
MAKE_INC/make.pthreads TESTING/MATGEN/Makefile \
make.inc SRC/Makefile
make.inc SRC/Makefile TESTING/MATGEN/Makefile
post-patch:
do-configure:
.for fmk in ${ARCH2FIX}
@${REINPLACE_CMD} -e 's|^ARCH *.= ar|ARCMD = ar| ; \
s|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC}/${fmk}
@ -106,20 +104,24 @@ do-build:
done
do-install:
${INSTALL_DATA} ${WRKDIR}/tmp_static/libsuperlu_mt.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKDIR}/tmp_shared/libsuperlu_mt.so.${SVERSION} ${STAGEDIR}${PREFIX}/lib
cd ${STAGEDIR}${PREFIX}/lib && ${LN} -s -f libsuperlu_mt.so.${SVERSION} libsuperlu_mt.so
${INSTALL_DATA} ${WRKDIR}/tmp_static/libsuperlu_mt_*.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKDIR}/tmp_shared/libsuperlu_mt_*.so.${SVERSION} ${STAGEDIR}${PREFIX}/lib
${RLN} ${STAGEDIR}${PREFIX}/lib/libsuperlu_mt_PTHREAD.so.${SVERSION} \
${STAGEDIR}${PREFIX}/lib/libsuperlu_mt_PTHREAD.so
${RLN} ${STAGEDIR}${PREFIX}/lib/libsuperlu_mt_PTHREAD.so.${SVERSION} \
${STAGEDIR}${PREFIX}/lib/libsuperlu_mt.so
${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/SRC/*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME}
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
# ${INSTALL_DATA} ${WRKSRC}/INSTALL/*.ps ${STAGEDIR}${DOCSDIR}
# ${GZIP_CMD} ${STAGEDIR}${DOCSDIR}/*.ps
${INSTALL_DATA} ${WRKSRC}/DOC/*.pdf ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/simax97.ps.gz ${STAGEDIR}${DOCSDIR}
.endif
.ifdef MAINTAINER_MODE
regression-test: do-build
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} testing)
@(cd ${WRKSRC_SHARED} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} testing)
.endif
.include <bsd.port.post.mk>

View File

@ -1,4 +1,5 @@
SHA256 (superlu2/superlu_mt_2.0.tar.gz) = 76f54f332db22313316798c3983b7bb704c159ce5a404ddda1f04d0fa477aab1
SIZE (superlu2/superlu_mt_2.0.tar.gz) = 1332773
TIMESTAMP = 1494706587
SHA256 (superlu2/superlu_mt_3.1.tar.gz) = 407b544b9a92b2ed536b1e713e80f986824cf3016657a4bfc2f3e7d2a76ecab6
SIZE (superlu2/superlu_mt_3.1.tar.gz) = 1824440
SHA256 (superlu2/simax97.ps.gz) = 8f8ae10e28dfdeda2fed58b0bcec1bf96f10fa7b1d055aff160d77d7aeb8a983
SIZE (superlu2/simax97.ps.gz) = 158724

View File

@ -1,6 +1,6 @@
--- INSTALL/Makefile.orig 2013-11-16 19:14:28.000000000 +0100
+++ INSTALL/Makefile 2013-11-16 19:14:58.000000000 +0100
@@ -17,7 +17,7 @@
--- INSTALL/Makefile.orig 2013-03-19 22:10:40 UTC
+++ INSTALL/Makefile
@@ -17,7 +17,7 @@ install.out:
slamch.o: slamch.c ; $(CC) $(NOOPTS) -c $<
dlamch.o: dlamch.c ; $(CC) $(NOOPTS) -c $<

View File

@ -1,10 +0,0 @@
--- SRC/slu_mt_util.h~ 2008-01-09 08:28:56.000000000 +0900
+++ SRC/slu_mt_util.h 2008-07-02 09:54:31.000000000 +0900
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <pthread.h>
/* Macros */
#ifndef USER_ABORT

View File

@ -1,14 +0,0 @@
--- 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[])
{

View File

@ -1,16 +0,0 @@
--- 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 )

View File

@ -1,16 +0,0 @@
--- 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,

View File

@ -1,62 +1,57 @@
--- make.inc.orig 2008-02-22 22:45:36 UTC
--- make.inc.orig 2015-04-30 00:46:42 UTC
+++ make.inc
@@ -16,13 +16,13 @@
#
# The machine (platform) identifier to append to the library names
#
-PLAT = _sp
+PLAT = _PTHREAD
#
# The name of the libraries to be created/linked to
#
-TMGLIB = libtmglib.a
-SUPERLULIB = libsuperlu_mt$(PLAT).a
+TMGLIB = libtmg.a
+SUPERLULIB = libsuperlu_mt.a
#
# If you don't have ESSL, you can use the following blaslib instead:
@@ -30,7 +30,7 @@ SUPERLULIB = libsuperlu_mt$(PLAT).a
# which may be slower than ESSL
#
BLASDEF = -DUSE_VENDOR_BLAS
-BLASLIB = -lessl
+BLASLIB = %%BLAS%%
#BLASLIB = ../lib/libblas$(PLAT).a
MATHLIB = -lm
MPLIB = -lpthread
@@ -38,7 +38,7 @@ MPLIB = -lpthread
@@ -22,7 +22,7 @@ PLAT = _PTHREAD
TMGLIB = libtmglib$(PLAT).a
SUPERLULIB = libsuperlu_mt$(PLAT).a
BLASDEF = -DUSE_VENDOR_BLAS
-BLASLIB = -L/usr/lib -lf77blas -latlas
+BLASLIB = %%BLAS%%
#BLASLIB = ../lib/libblas$(PLAT).a
MATHLIB = -lm
MPLIB = -lpthread
@@ -31,7 +31,7 @@ MPLIB = -lpthread
# The archiver and the flag(s) to use when building archive (library)
# If your system has no ranlib, set RANLIB = echo.
#
-ARCH = ar
+ARCMD = ar
ARCHFLAGS = cr
RANLIB = ranlib
-ARCH = ar
+ARCMD = ar
ARCHFLAGS = cr
RANLIB = ranlib
@@ -46,16 +46,17 @@ RANLIB = ranlib
PREDEFS = -D_PTHREAD
@@ -40,8 +40,8 @@ RANLIB = ranlib
# Definitions used by CPP:
PREDEFS = -D__PTHREAD ## -DDEBUGlevel=0 -DPRNTlevel=0
#
-CC = gcc
-CFLAGS = $(PREDEFS) -g #-O3
+CC = %%CC%%
+CFLAGS = $(PREDEFS) %%CFLAGS%%
# Uncomment the following to use 64-bit integer
CFLAGS += -D_LONGINT
-CC = xlc_r
-CFLAGS = -qarch=pwr5 -qalias=allptrs $(PREDEFS) -DPRNTlevel=0 -O3
-FORTRAN = xlf
-FFLAGS = -O3 -qarch=pwr5
-LOADER = xlc_r
-LOADOPTS = -bmaxdata:0x80000000
+CC = %%CC%%
+CFLAGS = $(PREDEFS) %%CPPFLAGS%% %%CFLAGS%%
+FORTRAN = %%FC%%
+FFLAGS = %%FFLAGS%%
+LOADER = %%CC%%
+LOADOPTS = %%LDFLAGS%%
+NOOPTS = %%FPIC%%
@@ -49,19 +49,19 @@ CFLAGS += -D_LONGINT
# There are a few files that should NOT be optimized, which appear in the
# end of SRC/Makefile, taking the flag $(NOOPTS)
# NOOPTS should be defined to explicitly turn off any optimization.
-NOOPTS = -O0
+NOOPTS = -O0 %%FPIC%%
-BLASOPTS =
+BLASOPTS =
############################################################################
-FORTRAN = gfortran
-FFLAGS = -O -fdefault-integer-8
+FORTRAN = %%FC%%
+FFLAGS = %%FFLAGS%% -fdefault-integer-8
############################################################################
-LOADER = gcc
-LOADOPTS = -O #-pthread
+LOADER = %%CC%%
+LOADOPTS = -O %%LDFLAGS%%
############################################################################
#
# C preprocessor defs for compilation for the Fortran interface
# (-DNoChange, -DAdd_, -DAdd__, or -DUpCase)
#
-CDEFS = -DNoChange
+CDEFS = -DAdd_

View File

@ -1,5 +1,5 @@
SuperLU_MT (version 2.0)
========================
SuperLU_MT (version 3.1)
========================
SuperLU_MT contains a set of subroutines to solve a sparse linear system
A*X=B. It uses Gaussian elimination with partial pivoting (GEPP).
@ -8,12 +8,13 @@ preordering for sparsity is completely separate from the factorization.
SuperLU_MT is a parallel extension to the serial SuperLU library.
SuperLU_MT is implemented in ANSI C, with multithreading extension,
for example, using POSIX threads. Currently, only the LU factorization
routine, which is the most time-consuming part of the solution process,
is parallelized on machines with a shared address space. The other
routines, such as column preordering and the forward and back substitutions
are performed sequentially. This "alpha" release contains only
double-precision real data type.
for example, using POSIX threads or OpenMP. Currently, only the LU
factorization routine, which is the most time-consuming part of the
solution process, is parallelized on machines with a shared address space.
The other routines, such as column preordering and the forward and
back substitutions are performed sequentially.
The library provides functionality for both real and complex
matrices, in both single and double precision.
Xiaoye S. Li, Lawrence Berkeley National Lab, xiaoye@nersc.gov
James Demmel, Univ. of California Berkeley, demmel@cs.berkeley.edu

View File

@ -1,16 +1,18 @@
include/superlu_mt/colamd.h
include/superlu_mt/pcsp_defs.h
include/superlu_mt/pdsp_defs.h
include/superlu_mt/pssp_defs.h
include/superlu_mt/pxgstrf_synch.h
include/superlu_mt/pzsp_defs.h
include/superlu_mt/slu_dcomplex.h
include/superlu_mt/slu_mt_Cnames.h
include/superlu_mt/slu_mt_cdefs.h
include/superlu_mt/slu_mt_ddefs.h
include/superlu_mt/slu_mt_machines.h
include/superlu_mt/slu_mt_sdefs.h
include/superlu_mt/slu_mt_util.h
include/superlu_mt/slu_mt_zdefs.h
include/superlu_mt/slu_scomplex.h
include/superlu_mt/supermatrix.h
lib/libsuperlu_mt.a
lib/libsuperlu_mt.so
lib/libsuperlu_mt.so.1
lib/libsuperlu_mt_PTHREAD.a
lib/libsuperlu_mt_PTHREAD.so
lib/libsuperlu_mt_PTHREAD.so.3
%%PORTDOCS%%%%DOCSDIR%%/simax97.ps.gz
%%PORTDOCS%%%%DOCSDIR%%/ug.pdf