[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#573187: transition: mpi-defaults



Am Montag, den 05.04.2010, 17:22 +0200 schrieb Marc 'HE' Brockschmidt:
> So, did you spend this time on doing fixes already? :-)

Yes, I indeed did. Not as much as I'd liked too, but nevertheless.

> It would be great to see at least a few patches for the breaking
> packages before the new defaults package is uploaded.

I'll just repeat the list of failing packages here and comment on them
group-wise.

Patch available:
      * rmpi: patch attached
      * blacs-mpi: patch attached
      * mumps: Can be rebuild against fixed blacs-mpi

CMake:
      * igstk
      * kwwidgets
CMake does some magic here which I do not understand yet. These seem to
fail because they look for a library openmpi provides but mpich2
doesn't. (Well, at least not under that name.) We might fix that via a
symlink in mpich2, or I've to dive deeper into CMake.

Wrong location of header file (mpi.h) at configure:
      * apbs
      * petsc: almost done, minor issue remaining
There may be more packages in this group, the already patched ones are
also of this type. Most upstream build systems seem to expect
a /foo/{include,lib} hierarchy, and you can only pass the location
of /foo to the build system. Some are flexible enough to work around
that (see patches) but I do not see how to do that for apbs easily.
(It's possible for petsc but my patch has some other issue I have to
track down.) This could easily be fixed it mpich2 would provide this
hierarchy, as we already discussed. It would make the patches much
simpler, some packages of these 11 wouldn't even need patching then. I
think we should reconsider the option of doing the change in mpich2.
(Note: MPICH and LAM did provide this hierarchy, too.)

Remaining packages:
      * life: Might be fixed with petsc, not sure yet.
      * gdcm: Not looked at yet
      * pgapack: Not looked at yet
      * scalapack: Seems to be of type "wrong location", may need no fix

This is the status as of now. I'm working on the remaining patches, but
the proposed change to mpich2 would save us some time here, as it avoids
patching about half of the packages at all. Please let me know what you
think about that.

Best regards,
Manuel
diff -pruN blacs-mpi-1.1.orig//Bmake.inc blacs-mpi-1.1//Bmake.inc
--- blacs-mpi-1.1.orig//Bmake.inc	2010-04-06 16:23:22.000000000 +0000
+++ blacs-mpi-1.1//Bmake.inc	2010-04-06 16:22:02.000000000 +0000
@@ -47,6 +47,14 @@
 #  -------------------------------------
 #  Name and location of the MPI library.
 #  -------------------------------------
+ifeq ($(MPI),mpich2)
+# for compilation with mpich:
+   MPIdev = ch_p4
+   MPIplat = LINUX
+   MPILIBdir = /usr/lib
+   MPIINCdir = /usr/include/mpi
+   MPILIB = $(MPILIBdir)/libmpich.so $(MPILIBdir)/libmpich.a
+endif
 ifeq ($(MPI),mpich)
 # for compilation with mpich:
    MPIdir = /usr/lib/mpich
diff -pruN blacs-mpi-1.1.orig//debian/rules blacs-mpi-1.1//debian/rules
--- blacs-mpi-1.1.orig//debian/rules	2010-04-06 16:23:22.000000000 +0000
+++ blacs-mpi-1.1//debian/rules	2010-04-06 16:22:02.000000000 +0000
@@ -12,9 +12,9 @@ build: build-$(BLACS_MPI)
 
 build-openmpi: build-stamp-openmpi
 
-build-lam: build-stamp-lam
+#build-lam: build-stamp-lam
 
-build-mpich: build-stamp-mpich
+build-mpich2: build-stamp-mpich2
 
 patch-stamp:
 	patch -p1 < debian/blacs-openmpi.patch
@@ -100,23 +100,23 @@ build-stamp-lam: patch-stamp
 
 	touch build-stamp-lam
 
-build-stamp-mpich: patch-stamp
+build-stamp-mpich2: patch-stamp
 	dh_testdir
 	[ -d TESTING/EXE ] || mkdir TESTING/EXE
 # next is a clean
 	BASEDIR=$(topdir) make cleanall
 	cd TESTING && BASEDIR=$(topdir) make clean
 # build the static libraries
-	BASEDIR=$(topdir) MPI=mpich make mpi
+	BASEDIR=$(topdir) MPI=mpich2 make mpi
 # the testing binaries
 	cd TESTING && BASEDIR=$(topdir) \
 	  BTLIBS='$$(BLACSFINIT) $$(BLACSLIB) $$(BLACSFINIT) $$(MPILIB)' \
-	  BUILD=static MPI=mpich make
+	  BUILD=static MPI=mpich2 make
 # next is a clean
 	BASEDIR=$(topdir) make cleanall
 	cd TESTING && BASEDIR=$(topdir) make clean
 # build the shared libraries
-	BASEDIR=$(topdir) FPIC=-fPIC MPI=mpich make mpi
+	BASEDIR=$(topdir) FPIC=-fPIC MPI=mpich2 make mpi
 	mkdir -p tmp
 	set -e ;\
 	for i in blacs blacsF77init blacsCinit ; do \
@@ -127,19 +127,19 @@ build-stamp-mpich: patch-stamp
 	    do mv $$j tmp/$$(echo $$j | sed 's,C$$,o,g') ;\
 	  done;\
 	  cd .. ;\
-	  gcc -shared -Wl,-soname=lib$$i-mpich.so.1 -o lib$$i-mpich.so.1.1 \
+	  gcc -shared -Wl,-soname=lib$$i-mpich2.so.1 -o lib$$i-mpich2.so.1.1 \
 	    $$(find tmp -name "*.o");\
-	  ln -fs lib$$i-mpich.so.1.1 lib$$i-mpich.so.1 ;\
-	  ln -fs lib$$i-mpich.so.1 lib$$i-mpich.so ;\
+	  ln -fs lib$$i-mpich2.so.1.1 lib$$i-mpich2.so.1 ;\
+	  ln -fs lib$$i-mpich2.so.1 lib$$i-mpich2.so ;\
 	  rm -f tmp/tmp/* ; rmdir tmp/tmp ; rm tmp/* ;\
 	done
 	rmdir tmp
 # the testing binaries
 	cd TESTING && BASEDIR=$(topdir) \
-	  BTLIBS='-L.. -lblacsF77init-mpich -lblacs-mpich -lblacsF77init-mpich $$(MPILIB)' \
-	  BUILD=shared MPI=mpich make
+	  BTLIBS='-L.. -lblacsF77init-mpich2 -lblacs-mpich2 -lblacsF77init-mpich2 $$(MPILIB)' \
+	  BUILD=shared MPI=mpich2 make
 
-	touch build-stamp-mpich
+	touch build-stamp-mpich2
 
 clean: unpatch
 	dh_testdir
@@ -156,9 +156,9 @@ install: install-$(BLACS_MPI)
 
 install-openmpi: install-stamp-openmpi
 
-install-lam: install-stamp-lam
+#install-lam: install-stamp-lam
 
-install-mpich: install-stamp-mpich
+install-mpich2: install-stamp-mpich2
 
 install-stamp-openmpi: build-stamp-openmpi
 	dh_testdir 
@@ -224,7 +224,7 @@ install-stamp-lam: build-stamp-lam
 
 	touch install-stamp-lam
 
-install-stamp-mpich: build-stamp-mpich
+install-stamp-mpich2: build-stamp-mpich2
 	dh_testdir 
 	dh_testroot
 	dh_clean -k
@@ -232,29 +232,29 @@ install-stamp-mpich: build-stamp-mpich
 
 	set -e ;\
 	for i in blacs blacsF77init blacsCinit ; do \
-	  cp -a lib$$i-mpich.so.* \
+	  cp -a lib$$i-mpich2.so.* \
 	    `pwd`/debian/libblacs-mpi1/usr/lib/ ;\
-	  cp -a lib$$i-mpich.so \
+	  cp -a lib$$i-mpich2.so \
 	    `pwd`/debian/libblacs-mpi-dev/usr/lib/ ;\
 	done
 
 	set -e ;\
 	for i in shared static ; do \
-	  install TESTING/EXE/xCbtest_MPI-LINUX-0-$$i-mpich \
-	  `pwd`/debian/blacs-mpi-test/usr/lib/blacs/cblacs_test_$$i-mpich ;\
-	  install TESTING/EXE/xFbtest_MPI-LINUX-0-$$i-mpich \
-	  `pwd`/debian/blacs-mpi-test/usr/lib/blacs/fblacs_test_$$i-mpich ;\
+	  install TESTING/EXE/xCbtest_MPI-LINUX-0-$$i-mpich2 \
+	  `pwd`/debian/blacs-mpi-test/usr/lib/blacs/cblacs_test_$$i-mpich2 ;\
+	  install TESTING/EXE/xFbtest_MPI-LINUX-0-$$i-mpich2 \
+	  `pwd`/debian/blacs-mpi-test/usr/lib/blacs/fblacs_test_$$i-mpich2 ;\
 	done
 
 	set -e ;\
 	install LIB/blacsCinit_MPI-LINUX-0.a \
-	  `pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsCinit-mpich.a
+	  `pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsCinit-mpich2.a
 	install LIB/blacsF77init_MPI-LINUX-0.a \
-	  `pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsF77init-mpich.a
+	  `pwd`/debian/libblacs-mpi-dev/usr/lib/libblacsF77init-mpich2.a
 	install LIB/blacs_MPI-LINUX-0.a \
-	  `pwd`/debian/libblacs-mpi-dev/usr/lib/libblacs-mpich.a
+	  `pwd`/debian/libblacs-mpi-dev/usr/lib/libblacs-mpich2.a
 
-	touch install-stamp-mpich
+	touch install-stamp-mpich2
 
 binary-arch: build install
 	dh_testdir -a
diff -pruN rmpi-0.5-8.orig//debian/rules rmpi-0.5-8//debian/rules
--- rmpi-0.5-8.orig//debian/rules	2010-04-06 16:01:04.000000000 +0000
+++ rmpi-0.5-8//debian/rules	2010-04-06 16:01:32.000000000 +0000
@@ -4,7 +4,14 @@
 # Copyright 2003-2006 by Dirk Eddelbuettel <edd@debian.org>
 
 include /usr/share/R/debian/r-cran.mk
+include /usr/share/mpi-default-dev/debian_defaults
 
 ##extraInstallFlags="--configure-args=--with-mpi=/usr/lib/openmpi"
 
+ifneq (,$(findstring $(ARCH_DEFAULT_MPI_IMPL),openmpi))
+MPI=OPENMPI
+else
+MPI=MPICH
+endif
 
+extraInstallFlags="--configure-args=--with-Rmpi-include=/usr/include/mpi --with-Rmpi-libpath=/usr/lib --with-Rmpi-type=$(MPI)"

Reply to: