aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2006-11-18 23:42:24 +0000
committerMaho Nakata <maho@FreeBSD.org>2006-11-18 23:42:24 +0000
commit58dc95b9cc7cf05e4b41dc4cb14a766e695ca5e4 (patch)
tree2452ae9cd7695d43f2e84fcae32326558237cd27 /math
parentf2841be73a6b3cf0aa00cbe3ce58dbccbb90bd3f (diff)
downloadports-58dc95b9cc7cf05e4b41dc4cb14a766e695ca5e4.tar.gz
ports-58dc95b9cc7cf05e4b41dc4cb14a766e695ca5e4.zip
Notes
Diffstat (limited to 'math')
-rw-r--r--math/blacs/Makefile15
-rw-r--r--math/blacs/files/Bmake.inc-mpich.diff (renamed from math/blacs/files/patch-Bmake.inc)0
-rw-r--r--math/blacs/files/Bmake.inc-openmpi.diff84
-rw-r--r--math/blacs/files/pkg-message.in7
4 files changed, 102 insertions, 4 deletions
diff --git a/math/blacs/Makefile b/math/blacs/Makefile
index 75bbb8496463..59df40ba5ca4 100644
--- a/math/blacs/Makefile
+++ b/math/blacs/Makefile
@@ -7,7 +7,7 @@
PORTNAME= blacs
PORTVERSION= 1.7
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= math
MASTER_SITES= ftp://ftp.netlib.org/blacs/
DISTNAME= BLACS
@@ -22,14 +22,21 @@ EXTRACT_ONLY= mpiblacs.tgz blacstester.tgz mpiblacs-patch03.tgz
MAINTAINER= maho@FreeBSD.org
COMMENT= The BLACS (Basic Linear Algebra Communication Subprograms)
-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>
+.if defined(WITH_OPENMPI)
+BUILD_DEPENDS= ${LOCALBASE}/mpi/openmpi/lib/libmpi.so:${PORTSDIR}/net/openmpi
+RUN_DEPENDS= ${LOCALBASE}/mpi/openmpi/bin/mpirun:${PORTSDIR}/net/openmpi
+EXTRA_PATCHES+= ${FILESDIR}/Bmake.inc-openmpi.diff
+.else
+BUILD_DEPENDS= ${LOCALBASE}/mpich2/lib/libmpich.a:${PORTSDIR}/net/mpich2
+RUN_DEPENDS= ${LOCALBASE}/mpich2/bin/mpirun:${PORTSDIR}/net/mpich2
+EXTRA_PATCHES+= ${FILESDIR}/Bmake.inc-mpich.diff
+.endif
+
pre-fetch:
@${ECHO} "If you want to use compiler other than f77,"
@${ECHO} "plase set NO_GNUF77=yes"
diff --git a/math/blacs/files/patch-Bmake.inc b/math/blacs/files/Bmake.inc-mpich.diff
index 1b6f547a9a87..1b6f547a9a87 100644
--- a/math/blacs/files/patch-Bmake.inc
+++ b/math/blacs/files/Bmake.inc-mpich.diff
diff --git a/math/blacs/files/Bmake.inc-openmpi.diff b/math/blacs/files/Bmake.inc-openmpi.diff
new file mode 100644
index 000000000000..40a12bfd93d0
--- /dev/null
+++ b/math/blacs/files/Bmake.inc-openmpi.diff
@@ -0,0 +1,84 @@
+--- Bmake.inc.orig Mon Nov 13 14:17:35 2006
++++ Bmake.inc Mon Nov 13 14:19:18 2006
+@@ -13,7 +13,7 @@
+ # -----------------------------
+ # The top level BLACS directory
+ # -----------------------------
+- BTOPdir = $(HOME)/BLACS
++ BTOPdir = @WRKSRC@
+
+ # ---------------------------------------------------------------------------
+ # The communication library your BLACS have been written for.
+@@ -32,14 +32,14 @@
+ # -------------------------------------------------------------
+ # The platform identifier to suffix to the end of library names
+ # -------------------------------------------------------------
+- PLAT = LINUX
++ PLAT = FreeBSD
+
+ # ----------------------------------------------------------
+ # Name and location of the BLACS library. See section 2 for
+ # details on BLACS debug level (BLACSDBGLVL).
+ # ----------------------------------------------------------
+ BLACSdir = $(BTOPdir)/LIB
+- BLACSDBGLVL = 0
++ BLACSDBGLVL = @DEBUG_LEVEL@
+ BLACSFINIT = $(BLACSdir)/blacsF77init_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
+ BLACSCINIT = $(BLACSdir)/blacsCinit_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
+ BLACSLIB = $(BLACSdir)/blacs_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
+@@ -47,10 +47,10 @@
+ # -------------------------------------
+ # Name and location of the MPI library.
+ # -------------------------------------
+- MPIdir = /usr/local/mpich
+- MPILIBdir = $(MPIdir)/lib/
++ MPIdir = @LOCALBASE@/mpi/openmpi
++ MPILIBdir =
+ MPIINCdir = $(MPIdir)/include
+- MPILIB = $(MPILIBdir)/libmpich.a
++ MPILIB =
+
+ # -------------------------------------
+ # All libraries required by the tester.
+@@ -86,7 +86,7 @@
+ # The directory to find the required communication library include files,
+ # if they are required by your system.
+ # -----------------------------------------------------------------------
+- SYSINC = -I$(MPIINCdir)
++ SYSINC =
+
+ # ---------------------------------------------------------------------------
+ # The Fortran 77 to C interface to be used. If you are unsure of the correct
+@@ -140,7 +140,7 @@
+ # If you know that your MPI uses the same handles for fortran and C
+ # communicators, you can replace the empty macro definition below with
+ # the macro definition on the following line.
+- TRANSCOMM = -DCSameF77
++ TRANSCOMM = -DUseMpi2
+ # -----------------------------------------------------------------------
+ # TRANSCOMM =
+
+@@ -195,16 +195,15 @@
+ # optimization. This is the F77NO_OPTFLAG. The usage of the remaining
+ # macros should be obvious from the names.
+ #=============================================================================
+- F77 = g77
+- F77NO_OPTFLAGS =
+- F77FLAGS = $(F77NO_OPTFLAGS) -O
+- F77LOADER = $(F77)
++ F77 = @LOCALBASE@/mpi/openmpi/bin/mpif77
++ F77NO_OPTFLAGS = @F77EXTRAFLAGS@
++ F77FLAGS = @FFLAGS@
++ F77LOADER = @LOCALBASE@/mpi/openmpi/bin/mpif77
+ F77LOADFLAGS =
+- CC = gcc
+- CCFLAGS = -O4
+- CCLOADER = $(CC)
++ CC = @LOCALBASE@/mpi/openmpi/bin/mpicc
++ CCFLAGS = @CFLAGS@
++ CCLOADER = @LOCALBASE@/mpi/openmpi/bin/mpicc
+ CCLOADFLAGS =
+-
+ # --------------------------------------------------------------------------
+ # The archiver and the flag(s) to use when building an archive (library).
+ # Also the ranlib routine. If your system has no ranlib, set RANLIB = echo.
diff --git a/math/blacs/files/pkg-message.in b/math/blacs/files/pkg-message.in
index fff4dfef90dc..1c08c8429a88 100644
--- a/math/blacs/files/pkg-message.in
+++ b/math/blacs/files/pkg-message.in
@@ -9,6 +9,13 @@
% %%LOCALBASE%%/mpich2/bin/mpirun -np 4 ./xFbtest_MPI-FreeBSD
% %%LOCALBASE%%/mpich2/bin/mpdallexit
+ Or, if you're using OpenMPI:
+ % cd %%PREFIX%%/share/BLACS/TESTING
+ % LD_LIBRARY_PATH=%%LOCALBASE%%/mpi/openmpi/lib/ export LD_LIBRARY_PATH
+ % PATH=$PATH:%%LOCALBASE%%/mpi/openmpi/bin/ export PATH
+ % 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 %%DOCSDIR%% for detail.
*********************************************************************