ports/98107: New port: math/mumps
Pedro F. Giffuni
giffunip at asme.org
Mon May 29 21:00:45 UTC 2006
>Number: 98107
>Category: ports
>Synopsis: New port: math/mumps
>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 21:00:34 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:
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.
http://graal.ens-lyon.fr/MUMPS/
Special thanks to Thierry Thomas for finding so many issues while attempting to support it in Code Aster!
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# ./mumps
# ./mumps/Makefile
# ./mumps/distinfo
# ./mumps/files
# ./mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ
# ./mumps/files/patch-Make.inc+Makefile.inc.generic
# ./mumps/pkg-descr
# ./mumps/pkg-plist
#
echo c - ./mumps
mkdir -p ./mumps > /dev/null 2>&1
echo x - ./mumps/Makefile
sed 's/^X//' >./mumps/Makefile << 'END-of-./mumps/Makefile'
X# New ports collection makefile for: MUMPS
X# Date created: 5 Mar 2006
X# Whom: Pedro Giffuni
X#
X# $FreeBSD$
X#
X
XPORTNAME= mumps
XPORTVERSION= 4.6.2
XCATEGORIES= math
XMASTER_SITES= http://www.enseeiht.fr/apo/MUMPS/ \
X http://graal.ens-lyon.fr/MUMPS/
XDISTNAME= MUMPS_${PORTVERSION}
X
XMAINTAINER= giffunip at asme.org
XCOMMENT= MUltifrontal Massively Parallel sparse direct Solver
X
X.ifdef WITH_ATLAS
XLIB_DEPENDS= atlas.1:${PORTSDIR}/math/atlas
X.else
XLIB_DEPENDS= blas.1:${PORTSDIR}/math/blas
X.endif
XBUILD_DEPENDS= ${FC}:${PORTSDIR}/lang/gfortran
X.ifdef WITH_MPI
XBUILD_DEPENDS+= ${LOCALBASE}/mpich/include/mpif.h:${PORTSDIR}/net/mpich \
X ${LOCALBASE}/lib/libscalapack.a:${PORTSDIR}/math/scalapack \
X ${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs
X.endif
X.ifdef WITH_METIS
XBUILD_DEPENDS+= ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis
X.endif
X
X#-----------------------------------------------------------------------
X
X# WARNING: Non-serviceable parts inside, can break other ports
X# You may define these options/knobs:
X#
X# FFLAGS: Fortran compiler flags for gfortran
X# WITH_OPTIMIZED_FLAGS:Try to use agressive (non-CPU) FFLAGS
X# BLAS_LIBS: specify other version of BLAS
X# WITH_ATLAS: Use ATLAS instead of the regular BLAS
X# WITH_GFC_BLAS: BLAS was generated with gfortran, not g77
X# WITH_METIS: Add METIS ordering
X# WITH_MPI: Use mpich for the parallel version
X#-----------------------------------------------------------------------
X
XUSE_GCC= 4.1+
XWITH_FORTRAN= yes
XFC= ${LOCALBASE}/bin/gfortran41
X
X.if defined(WITH_OPTIMIZED_FLAGS)
XFFLAGS+= -O3 -ffast-math -funroll-loops
X.endif
X
X.ifndef WITH_GFC_BLAS # g77 compatibility
XFFLAGS+= -ff2c
XMAKE_ENV+= CDEFS=-DAdd__
X.endif
X
X.ifdef WITH_ATLAS
XBLAS_LIBS= -lptf77blas -latlas_r
X.else
XBLAS_LIBS?= -lblas
X.endif
X
X.ifdef WITH_METIS
XMAKE_ENV+= ORDERINGSF=-Dmetis
X.endif
X
X.ifndef WITH_MPI
XPLIST_SUB+= WITH_LIBSEQ=""
X.else
XPLIST_SUB+= WITH_LIBSEQ="@comment "
X.endif
XPLIST_SUB+= MUMPSVERSION=${PORTVERSION}
X
Xpost-patch:
X.ifdef WITH_MPI
X @${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.inc.generic \
X ${WRKSRC}/Makefile.inc
X.else
X @${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.inc.generic.SEQ \
X ${WRKSRC}/Makefile.inc
X.endif
X
Xpre-build:
X @${REINPLACE_CMD} -e 's+ at CC@+${CC}+g ; s+ at FC@+${FC}+g ; \
X s+ at CFLAGS@+${CFLAGS}+g; \
X s+ at FCFLAGS@+${FFLAGS}+g; \
X s+ at PTHREAD_LIBS@+${PTHREAD_LIBS}+g; \
X s+ at BLAS_LIBS@+${BLAS_LIBS}+ ; \
X s+ at LOCALBASE@+${LOCALBASE}+g;' \
X ${WRKSRC}/Makefile.inc
X.ifdef WITH_METIS
X @${REINPLACE_CMD} -e 's+#LMETIS+LMETIS+' ${WRKSRC}/Makefile.inc
X.endif
X
Xdo-install:
X ${INSTALL_DATA} ${WRKSRC}/include/*.h ${PREFIX}/include
X ${INSTALL_DATA} ${WRKSRC}/lib/lib*.a ${PREFIX}/lib
X.ifndef WITH_MPI
X ${INSTALL_DATA} ${WRKSRC}/libseq/libmpiseq.a ${PREFIX}/lib
X.endif
X.ifndef NOPORTDOCS
X @${MKDIR} ${DOCSDIR}
X ${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.pdf ${DOCSDIR}
X ${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.ps ${DOCSDIR}
X ${GZIP_CMD} ${DOCSDIR}/userguide_${PORTVERSION}.ps
X.endif
X
X.include <bsd.port.mk>
END-of-./mumps/Makefile
echo x - ./mumps/distinfo
sed 's/^X//' >./mumps/distinfo << 'END-of-./mumps/distinfo'
XMD5 (MUMPS_4.6.2.tar.gz) = 26b27241a4b4c11d5534cd28a3daa2bd
XSHA256 (MUMPS_4.6.2.tar.gz) = e92cea3295e04fcc23937079a1916a9705462fa8e89f05261d02e205582eba13
XSIZE (MUMPS_4.6.2.tar.gz) = 2081479
END-of-./mumps/distinfo
echo c - ./mumps/files
mkdir -p ./mumps/files > /dev/null 2>&1
echo x - ./mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ
sed 's/^X//' >./mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ << 'END-of-./mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ'
X--- Make.inc/Makefile.inc.generic.SEQ.orig Fri Apr 14 08:00:50 2006
X+++ Make.inc/Makefile.inc.generic.SEQ Fri May 26 10:27:58 2006
X@@ -42,20 +42,20 @@
X # Metis is now available as an internal ordering for MUMPS.
X
X
X-#LSCOTCHDIR = $(HOME)/JY/emilio/bin/generic
X+#LSCOTCHDIR = @LOCALBASE@/lib
X #LSCOTCH = -L$(LSCOTCHDIR) -lesmumps -lfax -lorder -lscotch -lsymbol -ldof -lgraph -lcommon -lm
X
X LPORDDIR = ../PORD/lib/
X IPORD = -I../PORD/include/
X LPORD = -L$(LPORDDIR) -lpord
X
X-#LMETISDIR = Directory containing Metis library
X+LMETISDIR = @LOCALBASE@/lib
X #IMETIS = # Metis doesn't need include files (Fortran interface avail.)
X #LMETIS = -L$(LMETISDIR) -lmetis
X
X # Corresponding variables reused later
X #ORDERINGS = -Dmetis -Dpord
X-ORDERINGSF = -Dpord
X+ORDERINGSF += -Dpord
X ORDERINGSC = $(ORDERINGSF)
X LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
X IORDERINGS = $(IMETIS) $(IPORD) $(ISCOTCH)
X@@ -69,11 +69,11 @@
X # RM : remove files
X RM = /bin/rm -f
X # CC : C compiler
X-CC = cc
X+CC = @CC@
X # FC : Fortran 90 compiler
X-FC = f90
X+FC = @FC@
X # FL : Fortran linker
X-FL = f90
X+FL = @FC@
X # AR : Archive object in a library
X AR = ar vr
X # RANLIB : generate index of an archive file
X@@ -89,10 +89,10 @@
X
X # DEFINE HERE YOUR BLAS LIBRARY
X
X-LIBBLAS = -lblas
X+LIBBLAS = -L at LOCALBASE@/lib @BLAS_LIBS@
X
X # DEFINE HERE YOUR PTHREAD LIBRARY
X-LIBOTHERS = -lpthread
X+LIBOTHERS = @PTHREAD_LIBS@ -lg2c
X
X # FORTRAN/C COMPATIBILITY:
X # Use:
X@@ -105,12 +105,12 @@
X # leave empty if your Fortran compiler does not change the symbols.
X #
X
X-CDEFS = -DAdd_
X+CDEFS ?= -DAdd_
X
X #COMPILER OPTIONS
X
X-OPTF = -O
X-OPTC = -O -I.
X+OPTF = @FCFLAGS@
X+OPTC = @CFLAGS@
X OPTL = -O
X
X #Sequential:
END-of-./mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ
echo x - ./mumps/files/patch-Make.inc+Makefile.inc.generic
sed 's/^X//' >./mumps/files/patch-Make.inc+Makefile.inc.generic << 'END-of-./mumps/files/patch-Make.inc+Makefile.inc.generic'
X--- Make.inc/Makefile.inc.generic.orig Fri Apr 14 08:00:50 2006
X+++ Make.inc/Makefile.inc.generic Fri May 26 10:28:02 2006
X@@ -39,20 +39,20 @@
X # Metis is now available as an internal ordering for MUMPS.
X
X
X-#LSCOTCHDIR = $(HOME)/JY/emilio/bin/generic
X+#LSCOTCHDIR = @LOCALBASE@/lib
X #LSCOTCH = -L$(LSCOTCHDIR) -lesmumps -lfax -lorder -lscotch -lsymbol -ldof -lgraph -lcommon -lm
X
X LPORDDIR = ../PORD/lib/
X IPORD = -I../PORD/include/
X LPORD = -L$(LPORDDIR) -lpord
X
X-#LMETISDIR = Directory containing Metis library
X+LMETISDIR = @LOCALBASE@/lib
X #IMETIS = # Metis doesn't need include files (Fortran interface avail.)
X #LMETIS = -L$(LMETISDIR) -lmetis
X
X # Corresponding variables reused later
X #ORDERINGS = -Dmetis -Dpord
X-ORDERINGSF = -Dpord
X+ORDERINGSF += -Dpord
X ORDERINGSC = $(ORDERINGSF)
X LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
X IORDERINGS = $(IMETIS) $(IPORD) $(ISCOTCH)
X@@ -66,11 +66,11 @@
X # RM : remove files
X RM = /bin/rm -f
X # CC : C compiler
X-CC = cc
X+CC = @CC@
X # FC : Fortran 90 compiler
X-FC = f90
X+FC = @FC@
X # FL : Fortran linker
X-FL = f90
X+FL = @FC@
X # AR : Archive object in a library
X AR = ar vr
X # RANLIB : generate index of an archive file
X@@ -79,13 +79,13 @@
X #RANLIB = echo
X
X # SCALAP should define the SCALAPACK and BLACS libraries.
X-SCALAP = -lscalapack -lblacs
X+SCALAP = -L at LOCALBASE@/lib -lscalapack -lblacs -lblacsc -lblacsf77 -lblacs
X
X # INCLUDE DIRECTORY FOR MPI
X-INCPAR = -I/usr/include
X+INCPAR = -I at LOCALBASE@/mpich/include
X
X # LIBRARIES USED BY THE PARALLEL VERSION OF MUMPS: $(SCALAP) and MPI
X-LIBPAR = $(SCALAP) -L/usr/lib -lmpi
X+LIBPAR = $(SCALAP) -L at LOCALBASE@/mpich/lib -lfmpich -lmpich
X
X # The parallel version is not concerned by the next two lines.
X # They are related to the sequential library provided by MUMPS,
X@@ -95,10 +95,10 @@
X
X # DEFINE HERE YOUR BLAS LIBRARY
X
X-LIBBLAS = -lblas
X+LIBBLAS = -L at LOCALBASE@/lib @BLAS_LIBS@
X
X # DEFINE YOUR PTHREAD LIBRARY
X-LIBOTHERS = -lpthread
X+LIBOTHERS = @PTHREAD_LIBS@ -lg2c
X
X # FORTRAN/C COMPATIBILITY:
X # Use:
X@@ -111,11 +111,11 @@
X # leave empty if your Fortran compiler does not change the symbols.
X #
X
X-CDEFS = -DAdd_
X+CDEFS ?= -DAdd_
X
X #COMPILER OPTIONS
X-OPTF = -O
X-OPTC = -O -I.
X+OPTF = @FCFLAGS@
X+OPTC = @CFLAGS@
X OPTL = -O
X
X # CHOOSE BETWEEN USING THE SEQUENTIAL OR THE PARALLEL VERSION.
END-of-./mumps/files/patch-Make.inc+Makefile.inc.generic
echo x - ./mumps/pkg-descr
sed 's/^X//' >./mumps/pkg-descr << 'END-of-./mumps/pkg-descr'
XMUMPS is a Distributed Multifrontal Solver (F90, MPI based) with Dynamic
XDistributed Scheduling to accomodate both numerical fill-in and multi-user
Xenvironment.
X
X- Solution of large linear systems with symmetric positive definite
Xmatrices; general symmetric matrices; general unsymmetric matrices.
X- Version for complex arithmetic.
X- Parallel factorization and solve phases (uniprocessor version also
Xavailable).
X- Iterative refinement and backward error analysis.
X- Various matrix input formats: assembled format; distributed assembled
Xformat; elemental format.
X- Partial factorization and Schur complement matrix.
X- Several orderings interfaced : AMD, AMF, PORD, METIS
X
XWWW: http://graal.ens-lyon.fr/MUMPS/
END-of-./mumps/pkg-descr
echo x - ./mumps/pkg-plist
sed 's/^X//' >./mumps/pkg-plist << 'END-of-./mumps/pkg-plist'
Xinclude/cmumps_c.h
Xinclude/cmumps_prec.h
Xinclude/cmumps_root.h
Xinclude/cmumps_struc.h
Xinclude/dmumps_c.h
Xinclude/dmumps_prec.h
Xinclude/dmumps_root.h
Xinclude/dmumps_struc.h
Xinclude/smumps_c.h
Xinclude/smumps_prec.h
Xinclude/smumps_root.h
Xinclude/smumps_struc.h
Xinclude/zmumps_c.h
Xinclude/zmumps_prec.h
Xinclude/zmumps_root.h
Xinclude/zmumps_struc.h
Xlib/libcmumps.a
Xlib/libdmumps.a
Xlib/libsmumps.a
Xlib/libzmumps.a
Xlib/libpord.a
X%%WITH_LIBSEQ%%lib/libmpiseq.a
X%%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.pdf
X%%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.ps.gz
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-./mumps/pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list