diff options
author | thierry <thierry@FreeBSD.org> | 2006-06-03 20:34:09 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2006-06-03 20:34:09 +0800 |
commit | 531cabc6b10fcbf98d80e8dd683d0555e0fea49e (patch) | |
tree | 50a295674aff649edf0b038ba51ab46ef8c1d691 /math | |
parent | 64a2e9e18485131824eb1bdf40270ebb7daf55c2 (diff) | |
download | freebsd-ports-gnome-531cabc6b10fcbf98d80e8dd683d0555e0fea49e.tar.gz freebsd-ports-gnome-531cabc6b10fcbf98d80e8dd683d0555e0fea49e.tar.zst freebsd-ports-gnome-531cabc6b10fcbf98d80e8dd683d0555e0fea49e.zip |
MUMPS, the MUltifrontal Massively Parallel sparse direct Solver, is the
fastest matrix solver available for FreeBSD. It requires a F90 compiler
so it's built with gfortran, however care was taken to ensure it will
work with g77 while a the default compiler is changed.
PR: ports/98107
Submitted by: Pedro Giffuni <giffunip (at) asme.org>
Diffstat (limited to 'math')
-rw-r--r-- | math/Makefile | 1 | ||||
-rw-r--r-- | math/mumps/Makefile | 108 | ||||
-rw-r--r-- | math/mumps/distinfo | 3 | ||||
-rw-r--r-- | math/mumps/files/patch-Make.inc+Makefile.inc.generic | 86 | ||||
-rw-r--r-- | math/mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ | 70 | ||||
-rw-r--r-- | math/mumps/pkg-descr | 16 | ||||
-rw-r--r-- | math/mumps/pkg-plist | 25 |
7 files changed, 309 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile index 0751fd2124a5..65142d0d5147 100644 --- a/math/Makefile +++ b/math/Makefile @@ -137,6 +137,7 @@ SUBDIR += mprime SUBDIR += mtl SUBDIR += mtrxmath + SUBDIR += mumps SUBDIR += mupad SUBDIR += muparser SUBDIR += naturalmath diff --git a/math/mumps/Makefile b/math/mumps/Makefile new file mode 100644 index 000000000000..1e1ed0566dc4 --- /dev/null +++ b/math/mumps/Makefile @@ -0,0 +1,108 @@ +# New ports collection makefile for: MUMPS +# Date created: 5 Mar 2006 +# Whom: Pedro Giffuni +# +# $FreeBSD$ +# + +PORTNAME= mumps +PORTVERSION= 4.6.2 +CATEGORIES= math +MASTER_SITES= http://www.enseeiht.fr/apo/MUMPS/ \ + http://graal.ens-lyon.fr/MUMPS/ +DISTNAME= MUMPS_${PORTVERSION} + +MAINTAINER= giffunip@asme.org +COMMENT= MUltifrontal Massively Parallel sparse direct Solver + +BUILD_DEPENDS= ${FC}:${PORTSDIR}/lang/gfortran +.ifdef WITH_MPI +BUILD_DEPENDS+= ${LOCALBASE}/mpich/include/mpif.h:${PORTSDIR}/net/mpich \ + ${LOCALBASE}/lib/libscalapack.a:${PORTSDIR}/math/scalapack \ + ${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs +.endif +.ifdef WITH_METIS +BUILD_DEPENDS+= ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis +.endif + +#----------------------------------------------------------------------- + +# WARNING: Non-serviceable parts inside, can break other ports +# You may define these options/knobs: +# +# FFLAGS: Fortran compiler flags for gfortran +# WITH_OPTIMIZED_FLAGS:Try to use agressive (non-CPU) FFLAGS +# BLAS_LIBS: specify other version of BLAS +# WITH_ATLAS: Use ATLAS instead of the regular BLAS +# WITH_GFC_BLAS: BLAS was generated with gfortran, not g77 +# WITH_METIS: Add METIS ordering +# WITH_MPI: Use mpich for the parallel version +#----------------------------------------------------------------------- + +USE_GCC= 4.1+ +WITH_FORTRAN= yes +FC= ${LOCALBASE}/bin/gfortran41 + +.if defined(WITH_OPTIMIZED_FLAGS) +FFLAGS+= -O3 -ffast-math -funroll-loops +.endif + +.ifndef WITH_GFC_BLAS # g77 compatibility +FFLAGS+= -ff2c +MAKE_ENV+= CDEFS=-DAdd__ +.endif + +.ifdef WITH_ATLAS +LIB_DEPENDS+= atlas.1:${PORTSDIR}/math/atlas +BLAS_LIBS= -lptf77blas -latlas_r +.else +LIB_DEPENDS+= blas.1:${PORTSDIR}/math/blas +BLAS_LIBS?= -lblas +.endif + +.ifdef WITH_METIS +MAKE_ENV+= ORDERINGSF=-Dmetis +.endif + +.ifndef WITH_MPI +PLIST_SUB+= WITH_LIBSEQ="" +.else +PLIST_SUB+= WITH_LIBSEQ="@comment " +.endif +PLIST_SUB+= MUMPSVERSION=${PORTVERSION} + +post-patch: +.ifdef WITH_MPI + @${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.inc.generic \ + ${WRKSRC}/Makefile.inc +.else + @${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.inc.generic.SEQ \ + ${WRKSRC}/Makefile.inc +.endif + +pre-build: + @${REINPLACE_CMD} -e 's+@CC@+${CC}+g ; s+@FC@+${FC}+g ; \ + s+@CFLAGS@+${CFLAGS}+g; \ + s+@FCFLAGS@+${FFLAGS}+g; \ + s+@PTHREAD_LIBS@+${PTHREAD_LIBS}+g; \ + s+@BLAS_LIBS@+${BLAS_LIBS}+ ; \ + s+@LOCALBASE@+${LOCALBASE}+g;' \ + ${WRKSRC}/Makefile.inc +.ifdef WITH_METIS + @${REINPLACE_CMD} -e 's+#LMETIS+LMETIS+' ${WRKSRC}/Makefile.inc +.endif + +do-install: + ${INSTALL_DATA} ${WRKSRC}/include/*.h ${PREFIX}/include + ${INSTALL_DATA} ${WRKSRC}/lib/lib*.a ${PREFIX}/lib +.ifndef WITH_MPI + ${INSTALL_DATA} ${WRKSRC}/libseq/libmpiseq.a ${PREFIX}/lib +.endif +.ifndef NOPORTDOCS + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.pdf ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.ps ${DOCSDIR} + ${GZIP_CMD} ${DOCSDIR}/userguide_${PORTVERSION}.ps +.endif + +.include <bsd.port.mk> diff --git a/math/mumps/distinfo b/math/mumps/distinfo new file mode 100644 index 000000000000..ad60857d16ba --- /dev/null +++ b/math/mumps/distinfo @@ -0,0 +1,3 @@ +MD5 (MUMPS_4.6.2.tar.gz) = 26b27241a4b4c11d5534cd28a3daa2bd +SHA256 (MUMPS_4.6.2.tar.gz) = e92cea3295e04fcc23937079a1916a9705462fa8e89f05261d02e205582eba13 +SIZE (MUMPS_4.6.2.tar.gz) = 2081479 diff --git a/math/mumps/files/patch-Make.inc+Makefile.inc.generic b/math/mumps/files/patch-Make.inc+Makefile.inc.generic new file mode 100644 index 000000000000..d12349deec16 --- /dev/null +++ b/math/mumps/files/patch-Make.inc+Makefile.inc.generic @@ -0,0 +1,86 @@ +--- Make.inc/Makefile.inc.generic.orig Fri Apr 14 08:00:50 2006 ++++ Make.inc/Makefile.inc.generic Fri May 26 10:28:02 2006 +@@ -39,20 +39,20 @@ + # Metis is now available as an internal ordering for MUMPS. + + +-#LSCOTCHDIR = $(HOME)/JY/emilio/bin/generic ++#LSCOTCHDIR = @LOCALBASE@/lib + #LSCOTCH = -L$(LSCOTCHDIR) -lesmumps -lfax -lorder -lscotch -lsymbol -ldof -lgraph -lcommon -lm + + LPORDDIR = ../PORD/lib/ + IPORD = -I../PORD/include/ + LPORD = -L$(LPORDDIR) -lpord + +-#LMETISDIR = Directory containing Metis library ++LMETISDIR = @LOCALBASE@/lib + #IMETIS = # Metis doesn't need include files (Fortran interface avail.) + #LMETIS = -L$(LMETISDIR) -lmetis + + # Corresponding variables reused later + #ORDERINGS = -Dmetis -Dpord +-ORDERINGSF = -Dpord ++ORDERINGSF += -Dpord + ORDERINGSC = $(ORDERINGSF) + LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH) + IORDERINGS = $(IMETIS) $(IPORD) $(ISCOTCH) +@@ -66,11 +66,11 @@ + # 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 + AR = ar vr + # RANLIB : generate index of an archive file +@@ -79,13 +79,13 @@ + #RANLIB = echo + + # SCALAP should define the SCALAPACK and BLACS libraries. +-SCALAP = -lscalapack -lblacs ++SCALAP = -L@LOCALBASE@/lib -lscalapack -lblacs -lblacsc -lblacsf77 -lblacs + + # INCLUDE DIRECTORY FOR MPI +-INCPAR = -I/usr/include ++INCPAR = -I@LOCALBASE@/mpich/include + + # LIBRARIES USED BY THE PARALLEL VERSION OF MUMPS: $(SCALAP) and MPI +-LIBPAR = $(SCALAP) -L/usr/lib -lmpi ++LIBPAR = $(SCALAP) -L@LOCALBASE@/mpich/lib -lfmpich -lmpich + + # The parallel version is not concerned by the next two lines. + # They are related to the sequential library provided by MUMPS, +@@ -95,10 +95,10 @@ + + # DEFINE HERE YOUR BLAS LIBRARY + +-LIBBLAS = -lblas ++LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@ + + # DEFINE YOUR PTHREAD LIBRARY +-LIBOTHERS = -lpthread ++LIBOTHERS = @PTHREAD_LIBS@ -lg2c + + # FORTRAN/C COMPATIBILITY: + # Use: +@@ -111,11 +111,11 @@ + # 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. diff --git a/math/mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ b/math/mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ new file mode 100644 index 000000000000..fd894fd4def5 --- /dev/null +++ b/math/mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ @@ -0,0 +1,70 @@ +--- Make.inc/Makefile.inc.generic.SEQ.orig Fri Apr 14 08:00:50 2006 ++++ Make.inc/Makefile.inc.generic.SEQ Fri May 26 10:27:58 2006 +@@ -42,20 +42,20 @@ + # Metis is now available as an internal ordering for MUMPS. + + +-#LSCOTCHDIR = $(HOME)/JY/emilio/bin/generic ++#LSCOTCHDIR = @LOCALBASE@/lib + #LSCOTCH = -L$(LSCOTCHDIR) -lesmumps -lfax -lorder -lscotch -lsymbol -ldof -lgraph -lcommon -lm + + LPORDDIR = ../PORD/lib/ + IPORD = -I../PORD/include/ + LPORD = -L$(LPORDDIR) -lpord + +-#LMETISDIR = Directory containing Metis library ++LMETISDIR = @LOCALBASE@/lib + #IMETIS = # Metis doesn't need include files (Fortran interface avail.) + #LMETIS = -L$(LMETISDIR) -lmetis + + # Corresponding variables reused later + #ORDERINGS = -Dmetis -Dpord +-ORDERINGSF = -Dpord ++ORDERINGSF += -Dpord + ORDERINGSC = $(ORDERINGSF) + LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH) + IORDERINGS = $(IMETIS) $(IPORD) $(ISCOTCH) +@@ -69,11 +69,11 @@ + # 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 + AR = ar vr + # RANLIB : generate index of an archive file +@@ -89,10 +89,10 @@ + + # DEFINE HERE YOUR BLAS LIBRARY + +-LIBBLAS = -lblas ++LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@ + + # DEFINE HERE YOUR PTHREAD LIBRARY +-LIBOTHERS = -lpthread ++LIBOTHERS = @PTHREAD_LIBS@ -lg2c + + # FORTRAN/C COMPATIBILITY: + # Use: +@@ -105,12 +105,12 @@ + # 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: diff --git a/math/mumps/pkg-descr b/math/mumps/pkg-descr new file mode 100644 index 000000000000..9800003c53a3 --- /dev/null +++ b/math/mumps/pkg-descr @@ -0,0 +1,16 @@ +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, METIS + +WWW: http://graal.ens-lyon.fr/MUMPS/ diff --git a/math/mumps/pkg-plist b/math/mumps/pkg-plist new file mode 100644 index 000000000000..062fa0fdba79 --- /dev/null +++ b/math/mumps/pkg-plist @@ -0,0 +1,25 @@ +include/cmumps_c.h +include/cmumps_prec.h +include/cmumps_root.h +include/cmumps_struc.h +include/dmumps_c.h +include/dmumps_prec.h +include/dmumps_root.h +include/dmumps_struc.h +include/smumps_c.h +include/smumps_prec.h +include/smumps_root.h +include/smumps_struc.h +include/zmumps_c.h +include/zmumps_prec.h +include/zmumps_root.h +include/zmumps_struc.h +lib/libcmumps.a +lib/libdmumps.a +lib/libsmumps.a +lib/libzmumps.a +lib/libpord.a +%%WITH_LIBSEQ%%lib/libmpiseq.a +%%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.pdf +%%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.ps.gz +%%PORTDOCS%%@dirrm %%DOCSDIR%% |