From 36d8a857f9b19cf3b5fa563debfb87670ea2ec22 Mon Sep 17 00:00:00 2001 From: Nicola Vitale Date: Wed, 15 Dec 2010 16:48:09 +0000 Subject: [PATCH] ParMGridGen-1.0 is a highly optimized serial and parallel library for obtaining a sequence of successive coarse grids that are well suited for geometric multigrid methods. The quality of the elements of the coarse grids is optimized using a multilevel framework. The parallel library is based on MPI and is portable to a wide range of architectures. WWW: http://www.mgnet.org/mgnet-codes-parmgridgen.html PR: ports/152506 Submitted by: Stas Timokhin --- math/Makefile | 1 + math/parmgridgen/Makefile | 41 ++++++++++++++++ math/parmgridgen/distinfo | 2 + .../files/patch-MGridGen_IMlib_IMlib.h | 11 +++++ .../files/patch-MGridGen_Lib_mgridgen.h | 11 +++++ math/parmgridgen/files/patch-Makefile.in | 49 +++++++++++++++++++ ...MGridGen_IMParMetis_ParMETISLib_parmetis.h | 11 +++++ .../patch-ParMGridGen_ParLib_parmgridgen.h | 11 +++++ math/parmgridgen/pkg-descr | 9 ++++ math/parmgridgen/pkg-plist | 7 +++ 10 files changed, 153 insertions(+) create mode 100644 math/parmgridgen/Makefile create mode 100644 math/parmgridgen/distinfo create mode 100644 math/parmgridgen/files/patch-MGridGen_IMlib_IMlib.h create mode 100644 math/parmgridgen/files/patch-MGridGen_Lib_mgridgen.h create mode 100644 math/parmgridgen/files/patch-Makefile.in create mode 100644 math/parmgridgen/files/patch-ParMGridGen_IMParMetis_ParMETISLib_parmetis.h create mode 100644 math/parmgridgen/files/patch-ParMGridGen_ParLib_parmgridgen.h create mode 100644 math/parmgridgen/pkg-descr create mode 100644 math/parmgridgen/pkg-plist diff --git a/math/Makefile b/math/Makefile index adf1d8b6435e..1e49e0f44d98 100644 --- a/math/Makefile +++ b/math/Makefile @@ -425,6 +425,7 @@ SUBDIR += p5-bignum SUBDIR += pari SUBDIR += parmetis + SUBDIR += parmgridgen SUBDIR += pear-Math_Combinatorics SUBDIR += pecl-big_int SUBDIR += pecl-bitset diff --git a/math/parmgridgen/Makefile b/math/parmgridgen/Makefile new file mode 100644 index 000000000000..3adc79559425 --- /dev/null +++ b/math/parmgridgen/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: math/parmgirdgen +# Date created: 22 Nov 2010 +# Whom: Stas Timokhin +# +# $FreeBSD$ +# + +PORTNAME= parmgridgen +PORTVERSION= 1.0 +CATEGORIES= math science +MASTER_SITES= http://www.mgnet.org/mgnet/Codes/parmgridgen/ +DISTNAME= ParMGridGen-${PORTVERSION} + +MAINTAINER= devel@stasyan.com +COMMENT= Library for obtaining a sequence of successive coarse grids + +ALL_TARGET= parallel + +LIB_DEPENDS+= mpi.0:${PORTSDIR}/net/openmpi +USE_GMAKE= yes + +post-patch: +#respect CFLAGS +. for f in IMlib Lib Programs + @${REINPLACE_CMD} 's|CFLAGS =|CFLAGS+=|g' ${WRKSRC}/MGridGen/${f}/Makefile +. endfor +. for f in IMParMetis-2.0 ParLib Programs + @${REINPLACE_CMD} 's|CFLAGS =|CFLAGS+=|g' ${WRKSRC}/ParMGridGen/${f}/Makefile +. endfor +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/mgridgen ${PREFIX}/bin/mgridgen + ${INSTALL_PROGRAM} ${WRKSRC}/parmgridgen ${PREFIX}/bin/parmgridgen + ${INSTALL_PROGRAM} ${WRKSRC}/libmgrid.a ${PREFIX}/lib/libmgrid.a + ${INSTALL_PROGRAM} ${WRKSRC}/libparmgrid.a ${PREFIX}/lib/libparmgrid.a + ${INSTALL_DATA} ${WRKSRC}/mgridgen.h ${PREFIX}/include/mgridgen.h +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README +.endif + +.include diff --git a/math/parmgridgen/distinfo b/math/parmgridgen/distinfo new file mode 100644 index 000000000000..3b17391d0034 --- /dev/null +++ b/math/parmgridgen/distinfo @@ -0,0 +1,2 @@ +SHA256 (ParMGridGen-1.0.tar.gz) = 62cdb6e48cfc59124e5d5d360c2841e0fc2feecafe65bda110b74e942740b395 +SIZE (ParMGridGen-1.0.tar.gz) = 2623528 diff --git a/math/parmgridgen/files/patch-MGridGen_IMlib_IMlib.h b/math/parmgridgen/files/patch-MGridGen_IMlib_IMlib.h new file mode 100644 index 000000000000..576bd5bd5204 --- /dev/null +++ b/math/parmgridgen/files/patch-MGridGen_IMlib_IMlib.h @@ -0,0 +1,11 @@ +--- MGridGen/IMlib/IMlib.h.orig 2010-02-24 15:22:46.000000000 +0600 ++++ MGridGen/IMlib/IMlib.h 2010-02-24 15:22:57.000000000 +0600 +@@ -43,7 +43,7 @@ + #ifdef DMALLOC + #include + #else +-#include ++#include + #endif + + /************************************************************************* diff --git a/math/parmgridgen/files/patch-MGridGen_Lib_mgridgen.h b/math/parmgridgen/files/patch-MGridGen_Lib_mgridgen.h new file mode 100644 index 000000000000..d1e67fdfe945 --- /dev/null +++ b/math/parmgridgen/files/patch-MGridGen_Lib_mgridgen.h @@ -0,0 +1,11 @@ +--- MGridGen/Lib/mgridgen.h.orig 2010-02-24 15:30:01.000000000 +0600 ++++ MGridGen/Lib/mgridgen.h 2010-02-24 15:30:09.000000000 +0600 +@@ -26,7 +26,7 @@ + #ifdef DMALLOC + #include + #else +-#include ++#include + #endif + + #include "defs.h" diff --git a/math/parmgridgen/files/patch-Makefile.in b/math/parmgridgen/files/patch-Makefile.in new file mode 100644 index 000000000000..c5ec96f0048a --- /dev/null +++ b/math/parmgridgen/files/patch-Makefile.in @@ -0,0 +1,49 @@ +--- Makefile.in.orig 2001-12-05 06:30:33.000000000 +0600 ++++ Makefile.in 2010-12-15 09:45:04.000000000 +0600 +@@ -9,17 +9,17 @@ + PARCC = cc + + # What optimization level to use +-OPTFLAGS = -O3 ++OPTFLAGS = + + # What options to be used by the compiler +-COPTIONS = ++COPTIONS = ${PTHREAD_CFLAGS} + + # Which loader to use + LD = cc + PARLD = cc + + # What options to be used by the loader +-LDOPTIONS = -O3 ++LDOPTIONS = + + # Where to put the executable + BINDIR = ../.. +@@ -29,18 +29,21 @@ + IMLIBDIR = ../../MGridGen/IMlib + + # Include directories for the compiler +-INCDIR = ++INCDIR = -I${LOCALBASE}/include \ ++ -I${LOCALBASE}/mpi/openmpi/include + + # In which directories to look for any additional libraries + LIBDIR = -L../.. \ +- -L/usr/lib32/ ++ -L/usr/lib/ \ ++ -L/${LOCALBASE}/lib/ \ ++ -L/${LOCALBASE}/mpi/openmpi/lib + + # Set some flags + DEBUGFLAGS = + + # What additional libraries to link the programs with (eg., -lmpi) +-LIBS = -lmgrid -lm +-PARLIBS = -lparmgrid -lmgrid -lmpi -lm ++LIBS = -lmgrid -lm -pthread ++PARLIBS = -lparmgrid -lmgrid -lmpi -lm -pthread + + + # What archiving to use diff --git a/math/parmgridgen/files/patch-ParMGridGen_IMParMetis_ParMETISLib_parmetis.h b/math/parmgridgen/files/patch-ParMGridGen_IMParMetis_ParMETISLib_parmetis.h new file mode 100644 index 000000000000..500fb26a7caf --- /dev/null +++ b/math/parmgridgen/files/patch-ParMGridGen_IMParMetis_ParMETISLib_parmetis.h @@ -0,0 +1,11 @@ +--- ParMGridGen/IMParMetis-2.0/ParMETISLib/parmetis.h.orig 2010-02-24 15:21:20.000000000 +0600 ++++ ParMGridGen/IMParMetis-2.0/ParMETISLib/parmetis.h 2010-02-24 15:21:40.000000000 +0600 +@@ -21,7 +21,7 @@ + #ifdef DMALLOC + #include + #else +-#include ++#include + #endif + + #include "rename.h" diff --git a/math/parmgridgen/files/patch-ParMGridGen_ParLib_parmgridgen.h b/math/parmgridgen/files/patch-ParMGridGen_ParLib_parmgridgen.h new file mode 100644 index 000000000000..0adafd1ca756 --- /dev/null +++ b/math/parmgridgen/files/patch-ParMGridGen_ParLib_parmgridgen.h @@ -0,0 +1,11 @@ +--- ParMGridGen/ParLib/parmgridgen.h.orig 2010-02-24 15:21:58.000000000 +0600 ++++ ParMGridGen/ParLib/parmgridgen.h 2010-02-24 15:22:03.000000000 +0600 +@@ -21,7 +21,7 @@ + #ifdef DMALLOC + #include + #else +-#include ++#include + #endif + + #include "IMlib.h" diff --git a/math/parmgridgen/pkg-descr b/math/parmgridgen/pkg-descr new file mode 100644 index 000000000000..1ab585172035 --- /dev/null +++ b/math/parmgridgen/pkg-descr @@ -0,0 +1,9 @@ +ParMGridGen-1.0 is a highly optimized serial and parallel library +for obtaining a sequence of successive coarse grids that are well suited +for geometric multigrid methods. +The quality of the elements of the coarse grids is optimized using a +multilevel framework. +The parallel library is based on MPI and is portable to +a wide range of architectures. + +WWW: http://www.mgnet.org/mgnet-codes-parmgridgen.html diff --git a/math/parmgridgen/pkg-plist b/math/parmgridgen/pkg-plist new file mode 100644 index 000000000000..99f73031ae04 --- /dev/null +++ b/math/parmgridgen/pkg-plist @@ -0,0 +1,7 @@ +bin/mgridgen +bin/parmgridgen +lib/libmgrid.a +lib/libparmgrid.a +include/mgridgen.h +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%@dirrm %%DOCSDIR%%