Resurrect math/mumps4. I should have just removed the METIS4 option.

Reported by:	pfg
This commit is contained in:
Rene Ladan 2020-02-23 10:07:39 +00:00
parent da2eebe279
commit d6570cd6f3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=526913
12 changed files with 425 additions and 1 deletions

1
MOVED
View file

@ -14384,7 +14384,6 @@ www/trac-watchlist||2020-02-22|Has expired: Broken, uses EOLed python27
www/twill||2020-02-22|Has expired: Broken, uses EOLed python27
x11/wbarconf||2020-02-22|Has expired: Broken, uses EOLed python27
x11-wm/simple-ccsm||2020-02-22|Has expired: Broken, uses EOLed python27
math/mumps4|math/mumps|2020-02-22|Removed, uses expired math/metis4
math/metis4|math/metis|2020-02-22|Has expired: EOL: use math/metis instead
multimedia/cinelerra-gg||2020-02-22|Has expired: Broken, uses EOLed python27
x11-toolkits/py-gnome2||2020-02-22|Has expired: Broken, uses EOLed python27

View file

@ -383,6 +383,7 @@
SUBDIR += mtrxmath
SUBDIR += multichoose
SUBDIR += mumps
SUBDIR += mumps4
SUBDIR += muparser
SUBDIR += nanoflann
SUBDIR += naturalmath

117
math/mumps4/Makefile Normal file
View file

@ -0,0 +1,117 @@
# Created by: Pedro Giffuni
# $FreeBSD$
PORTNAME= mumps4
PORTVERSION= 4.10.0 # Please do not upgrade to 5+: use math/mumps
PORTREVISION= 3
CATEGORIES= math
MASTER_SITES= http://mumps.enseeiht.fr/ \
http://graal.ens-lyon.fr/MUMPS/ \
http://www.enseeiht.fr/apo/MUMPS/ \
http://www.enseeiht.fr/irit/apo/MUMPS/
DISTNAME= MUMPS_${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= MUltifrontal Massively Parallel sparse direct Solver
LICENSE= PD
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= fortran
MAKE_JOBS_UNSAFE=yes
FFLAGS+= -ffast-math
FORTRANLIBS= -lgfortran
GCCLIBDIR= ${LDFLAGS}
USE_LDCONFIG= yes
VEM= ${PORTVERSION:R:R}
LIBS= cmumps dmumps mumps_common pord smumps zmumps
CONFLICTS+= mumps-mpich-4*
OPTIONS_DEFINE= DOCS EXAMPLES
LIBS+= mpiseq
PLIST_SUB+= MUMPSVERSION=${PORTVERSION} MUMPSV=${VEM}
#-----------------------------------------------------------------------
# WARNING: Non-serviceable parts inside, can break other ports
# You may define these options/knobs:
#
# FFLAGS: Fortran compiler flags for gfortran
# BLASLIB: specify other version of BLAS
# WITH_ATLAS: Use ATLAS instead of the regular BLAS
#-----------------------------------------------------------------------
.include <bsd.port.pre.mk>
# This is like blaslapack, except we don't use lapack at all
.if exists(${LOCALBASE}/lib/libatlas.so) && !defined(WITH_BLAS)
WITH_ATLAS= yes
.endif
.if defined(WITH_ATLAS)
LIB_DEPENDS+= libatlas.so:math/atlas
BLASLIB= -lf77blas
#LAPACKLIB= -lalapack -lcblas
.else
LIB_DEPENDS+= libblas.so:math/blas
BLASLIB= -lblas
#LAPACKLIB= -llapack
.endif
pre-configure:
${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.inc.generic.SEQ \
${WRKSRC}/Makefile.inc
${REINPLACE_CMD} -e 's+LIBPAR+LIBSEQ+' ${WRKSRC}/src/Makefile
pre-build:
${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
.for MF in Makefile Makefile.inc PORD/lib/Makefile libseq/Makefile src/Makefile
${REINPLACE_CMD} -e 's+@CC@+${CC}+g ; s+@FC@+${FC}+g ; \
s+@CFLAGS@+${CFLAGS} -fPIC+g; \
s+@FCFLAGS@+${FCFLAGS} -fPIC+g; \
s+@SOVER@+${VEM}+g; \
s+@GCCLIBDIR@+${GCCLIBDIR}+g; \
s+@FORTRANLIBS@+${FORTRANLIBS}+g; \
s+@BLAS_LIBS@+${BLASLIB}+ ; \
s+@LOCALBASE@+${LOCALBASE}+g;' \
${WRKSRC}/${MF}
.endfor
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/include/*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME}
${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/lib/lib*.a ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
${INSTALL_LIB} ${WRKSRC}/lib/lib*.so.${VEM} ${STAGEDIR}${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/libseq/libmpiseq.a ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
${INSTALL_LIB} ${WRKSRC}/libseq/libmpiseq*.so.${VEM} ${STAGEDIR}${PREFIX}/lib
.for lib in ${LIBS}
(cd ${STAGEDIR}${PREFIX}/lib && \
${LN} -sf lib${lib}.so.${VEM} ${STAGEDIR}${PREFIX}/lib/lib${lib}4.so)
. endfor
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.pdf ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.ps ${STAGEDIR}${DOCSDIR}
${GZIP_CMD} ${STAGEDIR}${DOCSDIR}/userguide_${PORTVERSION}.ps
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
. for ex in Makefile README *.c *.F input_simpletest_*
${INSTALL_DATA} ${WRKSRC}/examples/${ex} ${STAGEDIR}${EXAMPLESDIR}
. endfor
. for ex in c_example *simpletest
${INSTALL_PROGRAM} ${WRKSRC}/examples/${ex} ${STAGEDIR}${EXAMPLESDIR}
. endfor
regression-test: install
(cd ${WRKSRC}/examples && \
./ssimpletest < input_simpletest_real ; \
./dsimpletest < input_simpletest_real ; \
./csimpletest < input_simpletest_cmplx ; \
./zsimpletest < input_simpletest_cmplx ; \
${ECHO_MSG} "The solution should be (1,2,3,4,5)" ; \
./c_example ; \
${ECHO_MSG} "The solution should be (1,2)")
.include <bsd.port.post.mk>

2
math/mumps4/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (MUMPS_4.10.0.tar.gz) = d0f86f91a74c51a17a2ff1be9c9cee2338976f13a6d00896ba5b43a5ca05d933
SIZE (MUMPS_4.10.0.tar.gz) = 2481516

View file

@ -0,0 +1,71 @@
--- Make.inc/Makefile.inc.generic.orig 2011-05-10 12:56:32 UTC
+++ Make.inc/Makefile.inc.generic
@@ -70,7 +70,7 @@ LPORD = -L$(LPORDDIR) -lpord
# The following variables will be used in the compilation process.
# Please note that -Dptscotch and -Dparmetis imply -Dscotch and -Dmetis respectively.
#ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
-ORDERINGSF = -Dpord
+ORDERINGSF += -Dpord
ORDERINGSC = $(ORDERINGSF)
LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
@@ -91,11 +91,11 @@ OUTF = -o
# RM : remove files
RM = /bin/rm -f
# CC : C compiler
-CC = cc
+CC = @CC@
# FC : Fortran 90 compiler
-FC = f90
+FC = @FC@
# FL : Fortran linker
-FL = f90
+FL = @FC@
# AR : Archive object in a library
# keep a space at the end if options have to be separated from lib name
AR = ar vr
@@ -105,13 +105,13 @@ RANLIB = ranlib
#RANLIB = echo
# SCALAP should define the SCALAPACK and BLACS libraries.
-SCALAP = -lscalapack -lblacs
+SCALAP = -L@LOCALBASE@/lib -lblacs -lblacsc -lblacsf77 -lscalapack
# INCLUDE DIRECTORY FOR MPI
-INCPAR = -I/usr/include
+INCPAR = -I@LOCALBASE@/include
# LIBRARIES USED BY THE PARALLEL VERSION OF MUMPS: $(SCALAP) and MPI
-LIBPAR = $(SCALAP) -L/usr/lib -lmpi
+LIBPAR = -L@LOCALBASE@/lib -lfmpich -lmpich -lmpl $(SCALAP)
# The parallel version is not concerned by the next two lines.
# They are related to the sequential library provided by MUMPS,
@@ -121,10 +121,10 @@ LIBSEQ = -Llibseq -lmpiseq
# DEFINE HERE YOUR BLAS LIBRARY
-LIBBLAS = -lblas
+LIBBLAS = -L@LOCALBASE@/lib @LAPACK_LIBS@ @BLAS_LIBS@
# DEFINE YOUR PTHREAD LIBRARY
-LIBOTHERS = -lpthread
+LIBOTHERS = -lpthread @GCCLIBDIR@ @FORTRANLIBS@
# FORTRAN/C COMPATIBILITY:
# Use:
@@ -137,11 +137,11 @@ LIBOTHERS = -lpthread
# leave empty if your Fortran compiler does not change the symbols.
#
-CDEFS = -DAdd_
+CDEFS ?= -DAdd_
#COMPILER OPTIONS
-OPTF = -O
-OPTC = -O -I.
+OPTF = @FCFLAGS@
+OPTC = @CFLAGS@
OPTL = -O
# CHOOSE BETWEEN USING THE SEQUENTIAL OR THE PARALLEL VERSION.

View file

@ -0,0 +1,69 @@
--- Make.inc/Makefile.inc.generic.SEQ.orig 2011-05-10 12:56:32 UTC
+++ Make.inc/Makefile.inc.generic.SEQ
@@ -41,7 +41,7 @@
# Metis/ParMetis and SCOTCH/PT-SCOTCH (ver 5.1 and later) orderings are now available for MUMPS.
#
-#SCOTCHDIR = ${HOME}/scotch_5.1_esmumps
+#SCOTCHDIR = @LOCALBASE@
#ISCOTCH = -I$(SCOTCHDIR)/include
# You have to choose one among the following two lines depending on
# the type of analysis you want to perform. If you want to perform only
@@ -72,7 +72,7 @@ LPORD = -L$(LPORDDIR) -lpord
# The following variables will be used in the compilation process.
# Please note that -Dptscotch and -Dparmetis imply -Dscotch and -Dmetis respectively.
#ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
-ORDERINGSF = -Dpord
+ORDERINGSF += -Dpord
ORDERINGSC = $(ORDERINGSF)
LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
@@ -95,11 +95,11 @@ OUTF = -o
# RM : remove files
RM = /bin/rm -f
# CC : C compiler
-CC = cc
+CC = @CC@
# FC : Fortran 90 compiler
-FC = f90
+FC = @FC@
# FL : Fortran linker
-FL = f90
+FL = @FC@
# AR : Archive object in a library
# keep a space at the end if options have to be separated from lib name
AR = ar vr
@@ -112,14 +112,14 @@ RANLIB = ranlib
# the sequential library provided by MUMPS, to use instead
# of ScaLAPACK and MPI.
INCSEQ = -I$(topdir)/libseq
-LIBSEQ = -Llibseq -lmpiseq
+LIBSEQ = -L$(topdir)/libseq -lmpiseq
# DEFINE HERE YOUR BLAS LIBRARY
-LIBBLAS = -lblas
+LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@
# DEFINE HERE YOUR PTHREAD LIBRARY
-LIBOTHERS = -lpthread
+LIBOTHERS = -lpthread @GCCLIBDIR@ @FORTRANLIBS@
# FORTRAN/C COMPATIBILITY:
# Use:
@@ -132,12 +132,12 @@ LIBOTHERS = -lpthread
# leave empty if your Fortran compiler does not change the symbols.
#
-CDEFS = -DAdd_
+CDEFS ?= -DAdd_
#COMPILER OPTIONS
-OPTF = -O
-OPTC = -O -I.
+OPTF = @FCFLAGS@
+OPTC = @CFLAGS@
OPTL = -O
#Sequential:

View file

@ -0,0 +1,20 @@
--- Makefile.orig 2011-05-10 12:56:32 UTC
+++ Makefile
@@ -51,7 +51,7 @@ zexamples: z
(cd examples ; $(MAKE) z)
-requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
+requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT).so.@SOVER@
# dummy MPI library (sequential version)
@@ -65,7 +65,7 @@ $(libdir)/libpord$(PLAT)$(LIBEXT):
$(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC=$(OUTC) LIBEXT=$(LIBEXT); \
fi;
if [ "$(LPORDDIR)" != "" ] ; then \
- cp $(LPORDDIR)/libpord$(LIBEXT) $@; \
+ cp $(LPORDDIR)/libpord* $(libdir)/; \
fi;
clean:

View file

@ -0,0 +1,19 @@
--- PORD/lib/Makefile.orig 2011-05-10 12:56:32 UTC
+++ PORD/lib/Makefile
@@ -21,9 +21,14 @@ OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect
.c.o:
$(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
-libpord$(LIBEXT):$(OBJS)
- $(AR)$@ $(OBJS)
+all: libpord$(LIBEXT) libpord.so.@SOVER@
+
+libpord$(LIBEXT): $(OBJS)
+ $(AR) $@ $(OBJS)
$(RANLIB) $@
+
+libpord.so.@SOVER@: $(OBJS)
+ $(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT).so.@SOVER@ -o libpord$(PLAT).so.@SOVER@ -Wl,-z,defs
clean:
rm -f *.o

View file

@ -0,0 +1,23 @@
--- libseq/Makefile.orig 2011-05-10 12:56:39 UTC
+++ libseq/Makefile
@@ -7,13 +7,18 @@ all: libmpiseq
include ../Makefile.inc
-libmpiseq: libmpiseq$(PLAT)$(LIBEXT)
+libmpiseq: libmpiseq$(PLAT)$(LIBEXT) libmpiseq$(PLAT).so.@SOVER@
libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
- $(AR)$@ mpi.o mpic.o elapse.o
+ $(AR) $@ mpi.o mpic.o elapse.o
$(RANLIB) $@
+
+libmpiseq$(PLAT).so.@SOVER@: mpi.o mpic.o elapse.o
+ $(FC) -shared ${.ALLSRC} -Wl,-soname,libmpiseq$(PLAT).so.@SOVER@ -o libmpiseq$(PLAT).so.@SOVER@ -Wl,-z,defs
+
.f.o:
$(FC) $(OPTF) -c $*.f $(OUTF)$*.o
+
.c.o:
$(CC) $(OPTC) $(CDEFS) -I. -c $*.c $(OUTC)$*.o

View file

@ -0,0 +1,34 @@
--- src/Makefile.orig 2011-05-10 12:56:32 UTC
+++ src/Makefile
@@ -20,7 +20,9 @@ z:
include $(topdir)/Makefile.inc
mumps_lib: $(libdir)/libmumps_common$(PLAT)$(LIBEXT) \
- $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT)
+ $(libdir)/libmumps_common$(PLAT).so.@SOVER@ \
+ $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT) \
+ $(libdir)/lib$(ARITH)mumps$(PLAT).so.@SOVER@
OBJS_COMMON = \
mumps_part9.o\
@@ -53,12 +55,18 @@ OBJS = $(ARITH)mumps_part1.o\
$(libdir)/libmumps_common$(PLAT)$(LIBEXT): $(OBJS_COMMON)
- $(AR)$@ $?
+ $(AR) $@ $?
$(RANLIB) $@
+$(libdir)/libmumps_common$(PLAT).so.@SOVER@: $(OBJS_COMMON)
+ $(FC) -shared ${.ALLSRC} -Wl,-soname,libmumps_common$(PLAT).so.@SOVER@ -L$(libdir) $(LORDERINGS) $(LIBPAR) $(LIBOTHERS) -o $(libdir)/libmumps_common$(PLAT).so.@SOVER@ -Wl,-z,defs
+
$(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT): $(OBJS)
- $(AR)$@ $?
+ $(AR) $@ $?
$(RANLIB) $@
+
+$(libdir)/lib$(ARITH)mumps$(PLAT).so.@SOVER@: $(OBJS)
+ $(FC) -shared ${.ALLSRC} -Wl,-soname,lib$(ARITH)mumps$(PLAT).so.@SOVER@ -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(LIBPAR) -lblas $(SCALAP) $(LIBOTHERS) -o $(libdir)/lib$(ARITH)mumps$(PLAT).so.@SOVER@ -Wl,-z,defs
$(ARITH)mumps_load.o: $(ARITH)mumps_comm_buffer.o \
$(ARITH)mumps_struc_def.o

18
math/mumps4/pkg-descr Normal file
View file

@ -0,0 +1,18 @@
MUMPS is a Distributed Multifrontal Solver (F90, MPI based) with Dynamic
Distributed Scheduling to accomodate both numerical fill-in and multi-user
environment.
- Solution of large linear systems with symmetric positive definite
matrices; general symmetric matrices; general unsymmetric matrices.
- Version for complex arithmetic.
- Parallel factorization and solve phases (uniprocessor version also
available).
- Iterative refinement and backward error analysis.
- Various matrix input formats: assembled format; distributed assembled
format; elemental format.
- Partial factorization and Schur complement matrix.
- Several orderings interfaced : AMD, AMF, PORD
Note: This is the last version released under Public Domain.
WWW: http://graal.ens-lyon.fr/MUMPS/

51
math/mumps4/pkg-plist Normal file
View file

@ -0,0 +1,51 @@
include/mumps4/cmumps_c.h
include/mumps4/cmumps_root.h
include/mumps4/cmumps_struc.h
include/mumps4/dmumps_c.h
include/mumps4/dmumps_root.h
include/mumps4/dmumps_struc.h
include/mumps4/mumps_c_types.h
include/mumps4/mumps_compat.h
include/mumps4/smumps_c.h
include/mumps4/smumps_root.h
include/mumps4/smumps_struc.h
include/mumps4/zmumps_c.h
include/mumps4/zmumps_root.h
include/mumps4/zmumps_struc.h
lib/libcmumps4.so
lib/libcmumps.so.4
lib/libdmumps4.so
lib/libdmumps.so.4
lib/libmpiseq4.so
lib/libmpiseq.so.4
lib/libmumps_common4.so
lib/libmumps_common.so.4
lib/libpord4.so
lib/libpord.so.4
lib/libsmumps4.so
lib/libsmumps.so.4
lib/libzmumps4.so
lib/libzmumps.so.4
lib/mumps4/libcmumps.a
lib/mumps4/libdmumps.a
lib/mumps4/libmpiseq.a
lib/mumps4/libmumps_common.a
lib/mumps4/libpord.a
lib/mumps4/libsmumps.a
lib/mumps4/libzmumps.a
%%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.pdf
%%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.ps.gz
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c_example
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c_example.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/csimpletest
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/csimpletest.F
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dsimpletest
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dsimpletest.F
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/input_simpletest_cmplx
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/input_simpletest_real
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ssimpletest
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ssimpletest.F
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zsimpletest
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zsimpletest.F