Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jul 2006 18:25:57 +0200 (CEST)
From:      Thierry Thomas <thierry@pompo.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Maho Nakata <maho@FreeBSD.org>
Subject:   ports/100755: math/blacs: switch to MPICH2.
Message-ID:  <20060723162557.07AFF1144C@graf.pompo.net>
Resent-Message-ID: <200607231630.k6NGUF1w011639@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         100755
>Category:       ports
>Synopsis:       math/blacs: switch to MPICH2.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 23 16:30:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Thierry Thomas
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 6.1-STABLE FreeBSD 6.1-STABLE #0: Tue Jun 27 06:04:37 CEST 2006 thierry@graf.pompo.net:/usr/obj/usr/src/sys/GRAF060511 i386


	
>Description:
	I'm switching Code_Aster and MUMPS to MPICH2, and I'd like to
	apply this update to BLACS and SCALAPACK in the same process.

	- Switch to net/mpich2;

	- Use SUB_FILES and remove pkg-message.

>How-To-Repeat:
	N/A.

>Fix:
	Please apply the following patch:

--- blacs.diff begins here ---
diff -urN math/blacs.orig/Makefile math/blacs/Makefile
--- math/blacs.orig/Makefile	Sun Jul  9 03:53:06 2006
+++ math/blacs/Makefile	Sun Jul 23 14:45:13 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	blacs
 PORTVERSION=	1.7
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	math
 MASTER_SITES=	ftp://ftp.netlib.org/blacs/
 DISTNAME=	BLACS
@@ -22,9 +22,11 @@
 MAINTAINER=	maho@FreeBSD.org
 COMMENT=	The BLACS (Basic Linear Algebra Communication Subprograms)
 
-BUILD_DEPENDS=	${LOCALBASE}/mpich/lib/libmpich.a:${PORTSDIR}/net/mpich
+BUILD_DEPENDS=	${LOCALBASE}/mpich2/lib/libmpich.a:${PORTSDIR}/net/mpich2
+RUN_DEPENDS=	${LOCALBASE}/mpich2/bin/mpirun:${PORTSDIR}/net/mpich2
 
 PKGMESSAGE=	${WRKDIR}/pkg-message
+SUB_FILES=	pkg-message
 
 .include <bsd.port.pre.mk>
 
@@ -53,8 +55,9 @@
 
 pre-patch:
 	(${CP} ${WRKSRC}/BMAKES/Bmake.MPI-LINUX ${WRKSRC}/Bmake.inc)
+
 post-patch:
-	(${REINPLACE_CMD} -e 's,@WRKSRC@,${WRKSRC},g ; s,@DEBUG_LEVEL@,${DEBUG_LEVEL},g ; s,@PREFIX@,${PREFIX},g ; s,@CC@,${CC},g ; s,@CFLAGS@,${CFLAGS},g ; s,@F77@,${F77},g ; s,@FFLAGS@,${FFLAGS},g ; s,@F77EXTRAFLAGS@,${F77EXTRAFLAGS},g ; s,   ARCH *.= ar,   ARCMD = ar,'  ${WRKSRC}/Bmake.inc)
+	(${REINPLACE_CMD} -e 's,@WRKSRC@,${WRKSRC},g ; s,@DEBUG_LEVEL@,${DEBUG_LEVEL},g ; s,@LOCALBASE@,${LOCALBASE},g ; s,@CC@,${CC},g ; s,@CFLAGS@,${CFLAGS},g ; s,@F77@,${F77},g ; s,@FFLAGS@,${FFLAGS},g ; s,@F77EXTRAFLAGS@,${F77EXTRAFLAGS},g ; s,   ARCH *.= ar,   ARCMD = ar,'  ${WRKSRC}/Bmake.inc)
 	${REINPLACE_CMD} -e 's|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC}/SRC/MPI/Makefile
 
 do-build:
@@ -83,8 +86,6 @@
 .endif
 
 post-install:
-	@${SED} -e 's,/usr/local,${PREFIX},g' ${FILESDIR}/pkg-message.in \
-		> ${PKGMESSAGE}
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
diff -urN math/blacs.orig/files/patch-Bmake.inc math/blacs/files/patch-Bmake.inc
--- math/blacs.orig/files/patch-Bmake.inc	Mon May  5 04:06:21 2003
+++ math/blacs/files/patch-Bmake.inc	Sun Jul 23 14:47:18 2006
@@ -31,11 +31,11 @@
  #  Name and location of the MPI library.
  #  -------------------------------------
 -   MPIdir = /usr/local/mpich
-+   MPIdir = @PREFIX@/mpich
++   MPIdir = @LOCALBASE@/mpich2
     MPILIBdir = $(MPIdir)/lib/
     MPIINCdir = $(MPIdir)/include
 -   MPILIB = $(MPILIBdir)/libmpich.a
-+   MPILIB = $(MPILIBdir)/libmpich.a $(MPILIBdir)/libpmpich.a
++   MPILIB = $(MPILIBdir)/libmpich.a
  
  #  -------------------------------------
  #  All libraries required by the tester.
diff -urN math/blacs.orig/files/pkg-message.in math/blacs/files/pkg-message.in
--- math/blacs.orig/files/pkg-message.in	Tue Nov 23 02:26:54 2004
+++ math/blacs/files/pkg-message.in	Sun Jul 23 14:43:02 2006
@@ -1,12 +1,14 @@
 *********************************************************************
  Please test your blacs installation
- Test programs are located at /usr/local/share/BLACS/TESTING
+ Test programs are located at %%PREFIX%%/share/BLACS/TESTING
 
  Example:
-  % cd /usr/local/share/BLACS/TESTING
-  % /usr/local/mpich/bin/mpirun -np 4 xCbtest_MPI-FreeBSD
-  % /usr/local/mpich/bin/mpirun -np 4 xFbtest_MPI-FreeBSD
+  % cd %%PREFIX%%/share/BLACS/TESTING
+  % %%LOCALBASE%%/mpich2/bin/mpd &
+  % %%LOCALBASE%%/mpich2/bin/mpirun -np 4 ./xCbtest_MPI-FreeBSD
+  % %%LOCALBASE%%/mpich2/bin/mpirun -np 4 ./xFbtest_MPI-FreeBSD
+  % %%LOCALBASE%%/mpich2/bin/mpdallexit
 
 You can change -np 4 to any number to meet your local environment.
-See files at /usr/local/share/doc/blacs for detail.
+See files at %%DOCSDIR%% for detail.
 *********************************************************************
diff -urN math/blacs.orig/pkg-message math/blacs/pkg-message
--- math/blacs.orig/pkg-message	Sun May 22 09:42:37 2005
+++ math/blacs/pkg-message	Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-*********************************************************************
- Please test your blacs installation
- Test programs are located at /usr/local/share/BLACS/TESTING
-
- Example:
-  % cd /usr/local/share/BLACS/TESTING
-  % mpirun -np 4 xCbtest_MPI-FreeBSD
-  % mpirun -np 4 xFbtest_MPI-FreeBSD
-
-You can change -np 4 to any number to meet your local environment.
-See files at /usr/local/share/doc/blacs for detail.
-*********************************************************************
--- blacs.diff ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060723162557.07AFF1144C>