ports/151868: math/blacs, science/mbdyn & science/mpqc: chase net/mpich2 upgrade
Thierry Thomas
thierry at FreeBSD.org
Mon Nov 1 16:00:28 UTC 2010
>Number: 151868
>Category: ports
>Synopsis: math/blacs, science/mbdyn & science/mpqc: chase net/mpich2 upgrade
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 01 16:00:27 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Thierry Thomas
>Release: FreeBSD 8.1-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 8.1-STABLE FreeBSD 8.1-STABLE #0: Sun Aug 22 11:07:29 CEST 2010 thierry at graf.pompo.net:/usr/obj/usr/src/sys/GRAF100821 i386
>Description:
When upgrading net/mpich2 to 1.3, the ports math/blacs,
science/mbdyn & science/mpqc must be modified. Please see the
hereunder patches.
net/mpich2 upgrade: PR ports/151867
http://www.freebsd.org/cgi/query-pr.cgi?pr=151867
Note about science/mbdyn: I have'nt been able to build it with
MPI without enaabling SCHUR.
>How-To-Repeat:
- Upgrade net/mpich2 to 1.3 - see PR ports/151867;
- then apply the attached patches.
>Fix:
--- blacs.diff begins here ---
diff -urN math/blacs.orig/Makefile math/blacs/Makefile
--- math/blacs.orig/Makefile 2010-01-01 17:09:41.000000000 +0100
+++ math/blacs/Makefile 2010-11-01 15:51:59.000000000 +0100
@@ -7,7 +7,7 @@
PORTNAME= blacs
PORTVERSION= 1.7
-PORTREVISION= 12
+PORTREVISION= 13
CATEGORIES= math
MASTER_SITES= ftp://ftp.netlib.org/blacs/
DISTNAME= BLACS
@@ -32,12 +32,11 @@
.endif
.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
+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
-LIB_DEPENDS= mpich:${PORTSDIR}/net/mpich2
-RUN_DEPENDS= ${LOCALBASE}/bin/mpirun:${PORTSDIR}/net/mpich2
+LIB_DEPENDS+= mpich:${PORTSDIR}/net/mpich2
EXTRA_PATCHES+= ${FILESDIR}/Bmake.inc-mpich.diff
.endif
diff -urN math/blacs.orig/files/Bmake.inc-mpich.diff math/blacs/files/Bmake.inc-mpich.diff
--- math/blacs.orig/files/Bmake.inc-mpich.diff 2010-01-01 17:09:41.000000000 +0100
+++ math/blacs/files/Bmake.inc-mpich.diff 2010-10-25 22:30:19.000000000 +0200
@@ -35,7 +35,7 @@
MPILIBdir = $(MPIdir)/lib/
MPIINCdir = $(MPIdir)/include
- MPILIB = $(MPILIBdir)/libmpich.a
-+ MPILIB = $(MPILIBdir)/libmpich.a
++ MPILIB = $(MPILIBdir)/libmpich.a $(MPILIBdir)/libmpl.a -pthread
# -------------------------------------
# All libraries required by the tester.
--- blacs.diff ends here ---
--- mbdyn.diff begins here ---
diff -urN science/mbdyn.orig/Makefile science/mbdyn/Makefile
--- science/mbdyn.orig/Makefile 2010-01-01 17:10:49.000000000 +0100
+++ science/mbdyn/Makefile 2010-11-01 15:45:59.000000000 +0100
@@ -7,7 +7,7 @@
PORTNAME= mbdyn
PORTVERSION= 1.3.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= science
MASTER_SITES= http://www.aero.polimi.it/~masarati/Download/mbdyn/
@@ -51,9 +51,12 @@
.if defined(WITH_MPI)
LIB_DEPENDS+= mpich:${PORTSDIR}/net/mpich2
-CONFIGURE_ARGS+= --with-mpi=pmpi
-CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/mpi2c++
-LDFLAGS+= -L${LOCALBASE}/lib
+CONFIGURE_ARGS+= --with-mpi=yes --enable-schur
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= "-L${LOCALBASE}/lib"
+. if !defined(WITH_METIS)
+WITH_CHACO= yes
+. endif
.else
CONFIGURE_ARGS+= --with-mpi=no
.endif
diff -urN science/mbdyn.orig/files/patch-configure science/mbdyn/files/patch-configure
--- science/mbdyn.orig/files/patch-configure 2009-08-05 07:25:45.000000000 +0200
+++ science/mbdyn/files/patch-configure 2010-10-31 22:20:11.000000000 +0100
@@ -1,16 +1,5 @@
---- configure.in 2009-08-05 12:29:39.000000000 +0900
-+++ configure.in 2009-08-05 12:29:50.000000000 +0900
-@@ -765,7 +765,7 @@
- dnl Add fortran lib
- dnl
- case `basename "$F77"` in
--gfortran)
-+gfortran*)
- F2C_LIBS="$F2C_LIBS -lgfortran"
- ;;
- *)
---- configure~ 2009-06-24 20:45:44.000000000 +0900
-+++ configure 2009-08-05 12:29:56.000000000 +0900
+--- configure.orig 2009-06-24 13:45:44.000000000 +0200
++++ configure 2010-10-31 22:17:08.000000000 +0100
@@ -27344,7 +27344,7 @@
fi
@@ -20,3 +9,56 @@
F2C_LIBS="$F2C_LIBS -lgfortran"
;;
*)
+@@ -33508,7 +33508,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
+-#include <$ac_header>
++#include <mpi.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (ac_try="$ac_compile"
+@@ -33548,7 +33548,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+-#include <$ac_header>
++#include <mpi.h>
+ _ACEOF
+ if { (ac_try="$ac_cpp conftest.$ac_ext"
+ case "(($ac_try" in
+@@ -33643,7 +33643,7 @@
+ elif test $ac_cv_header_mpicxx_h = yes ; then
+ have_mpi_cxx_header=yes
+ mpi_cxx_header="mpicxx.h"
+- try_mpi_LIBS="-lmpi -lmpi_cxx"
++ try_mpi_LIBS="-lmpich -lmpichcxx -lmpl -pthread"
+ fi
+
+ if test $ac_cv_header_mpi_h = yes -a $have_mpi_cxx_header = yes ; then
+@@ -33655,7 +33655,6 @@
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+- try_mpi_LIBS=
+ save_LIBS=$LIBS
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -33664,7 +33663,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-#include <$mpi_cxx_header>
++#include <mpi.h>
+
+ int
+ main ()
+@@ -33715,7 +33714,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-#include <mpi_cxx_header>
++#include <mpi.h>
+
+ int
+ main ()
diff -urN science/mbdyn.orig/files/patch-include__ac__mpi.h science/mbdyn/files/patch-include__ac__mpi.h
--- science/mbdyn.orig/files/patch-include__ac__mpi.h 1970-01-01 01:00:00.000000000 +0100
+++ science/mbdyn/files/patch-include__ac__mpi.h 2010-10-31 22:32:32.000000000 +0100
@@ -0,0 +1,11 @@
+--- ./include/ac/mpi.h.orig 2009-01-04 19:04:54.000000000 +0100
++++ ./include/ac/mpi.h 2010-10-31 22:31:57.000000000 +0100
+@@ -35,7 +35,7 @@
+ #ifdef HAVE_MPI___H
+ #include <mpi++.h>
+ #elif defined HAVE_MPICXX_H
+-#include <mpicxx.h>
++#include <mpi.h>
+ #endif /* ! HAVE_MPI___H && ! HAVE_MPICXX_H */
+
+ #endif /* MPI_H */
diff -urN science/mbdyn.orig/files/patch-mbdyn__base__invsolver.cc science/mbdyn/files/patch-mbdyn__base__invsolver.cc
--- science/mbdyn.orig/files/patch-mbdyn__base__invsolver.cc 1970-01-01 01:00:00.000000000 +0100
+++ science/mbdyn/files/patch-mbdyn__base__invsolver.cc 2010-10-31 23:15:16.000000000 +0100
@@ -0,0 +1,12 @@
+--- ./mbdyn/base/invsolver.cc.orig 2009-04-10 13:25:00.000000000 +0200
++++ ./mbdyn/base/invsolver.cc 2010-10-31 23:14:49.000000000 +0100
+@@ -200,8 +200,8 @@
+ }
+ }
+
+-#ifdef USE_SCHUR
+ int mpi_finalize = 0;
++#ifdef USE_SCHUR
+
+ int MyRank = 0;
+ if (bParallel) {
diff -urN science/mbdyn.orig/files/patch-mbdyn__base__solver.cc science/mbdyn/files/patch-mbdyn__base__solver.cc
--- science/mbdyn.orig/files/patch-mbdyn__base__solver.cc 2009-08-05 23:44:49.000000000 +0200
+++ science/mbdyn/files/patch-mbdyn__base__solver.cc 2010-10-31 23:38:49.000000000 +0100
@@ -1,5 +1,5 @@
---- mbdyn/base/solver.cc.orig 2009-06-24 23:13:44.000000000 +0900
-+++ mbdyn/base/solver.cc 2009-08-05 11:32:29.000000000 +0900
+--- mbdyn/base/solver.cc.orig 2009-06-24 16:13:44.000000000 +0200
++++ mbdyn/base/solver.cc 2010-10-31 23:38:30.000000000 +0100
@@ -109,10 +109,17 @@
};
@@ -18,3 +18,13 @@
extern "C" void
mbdyn_really_exit_handler(int signum)
+@@ -456,8 +463,8 @@
+ }
+ }
+
+-#ifdef USE_SCHUR
+ int mpi_finalize = 0;
++#ifdef USE_SCHUR
+
+ int MyRank = 0;
+ if (bParallel) {
--- mbdyn.diff ends here ---
--- mpqc.diff begins here ---
diff -urN science/mpqc.orig/Makefile science/mpqc/Makefile
--- science/mpqc.orig/Makefile 2010-10-19 21:28:43.000000000 +0200
+++ science/mpqc/Makefile 2010-11-01 15:53:55.000000000 +0100
@@ -7,7 +7,7 @@
PORTNAME= mpqc
PORTVERSION= 2.3.1
-PORTREVISION= 12
+PORTREVISION= 13
CATEGORIES= science parallel
MASTER_SITES= SF
@@ -74,6 +74,7 @@
.if defined(WITH_MPICH)
CONFIGURE_ARGS+=--with-libdirs="-L${LOCALBASE}/lib -L${LOCALBASE}/lib"\
--enable-always-use-mpi
+CONFIGURE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}"
.endif
.if defined(WITH_MPICH)
CONFIGURE_ARGS+=--with-include="-I${LOCALBASE}/include -I${WRKDIR} -I${LOCALBASE}/include"
diff -urN science/mpqc.orig/files/patch-::configure.in science/mpqc/files/patch-::configure.in
--- science/mpqc.orig/files/patch-::configure.in 2007-11-18 15:58:53.000000000 +0100
+++ science/mpqc/files/patch-::configure.in 2010-10-28 00:10:19.000000000 +0200
@@ -1,5 +1,5 @@
---- configure.in.orig 2006-03-23 03:04:54.000000000 +0900
-+++ configure.in 2007-11-11 14:37:20.000000000 +0900
+--- configure.in.orig 2006-03-22 19:04:54.000000000 +0100
++++ configure.in 2010-10-28 00:09:59.000000000 +0200
@@ -349,6 +349,31 @@
ac_default_prefix="/usr/local/mpqc/$SC_VERSION"
@@ -165,7 +165,17 @@
AC_CHECK_FUNC(pthread_attr_getstacksize)
AC_CHECK_FUNC(pthread_attr_setstacksize)
AC_CHECK_FUNC(pthread_attr_setscope)
-@@ -1769,10 +1793,10 @@
+@@ -1165,7 +1189,8 @@
+ AC_CHECK_LIB(mpi,MPI_Init,[HAVE_MPI=yes;LIBS="-lmpi $LIBS"])
+ fi
+ if test "$HAVE_MPI" = no; then
+- AC_CHECK_LIB(mpich,MPI_Init,[HAVE_MPI=yes;LIBS="-lmpich $LIBS"])
++ LIBS="-lmpl $PTHREAD_LIBS $LIBS"
++ AC_CHECK_LIB(mpich,MPI_Init,[HAVE_MPI=yes;LIBS="-lmpich -lmpl $PTHREAD_LIBS $LIBS"])
+ fi
+ fi
+ if test X$HAVE_MPI = Xyes; then
+@@ -1769,10 +1794,10 @@
dnl --------- CCA component configuration ---------
--- mpqc.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list