[Pkg-scicomp-devel] Bug#639100: libarpack2: Source-package MPI header (mpif.h) not compatible with OpenMPI.

Joshua L. Phillips jphillips7 at ucmerced.edu
Wed Aug 24 05:08:58 UTC 2011


Package: libarpack2
Version: 2.1+parpack96.dfsg-3.1
Severity: important
Tags: patch

Ran into a problem running the parallel test program pdsdrv1.f using OpenMPI...

##
## Compilation went fine...
##

$ mpif77 -g -c pdsdrv1.f -o pdsdrv1.o
$ mpif77 -g pdsdrv1.o -o pdsdrv1 -lblacsF77init-openmpi -lblacs-openmpi
-lparpack -larpack -llapack -lblas

##
## Execution on my dual-core system didn't work...
##

$ mpiexec -n 2 ./pdsdrv1

[onesiphorus:5172] *** An error occurred in MPI_Allreduce
[onesiphorus:5172] *** on communicator MPI_COMM_WORLD
[onesiphorus:5172] *** MPI_ERR_OP: invalid reduce operation
[onesiphorus:5172] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
--------------------------------------------------------------------------
mpiexec has exited due to process rank 0 with PID 5172 on
node onesiphorus exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpiexec (as reported here).
--------------------------------------------------------------------------
[onesiphorus:05171] 1 more process has sent help message help-mpi-errors.txt /
mpi_errors_are_fatal
[onesiphorus:05171] Set MCA parameter "orte_base_help_aggregate" to 0 to see
all help / error messages


I poked around the internet and some other people reported a similar problem.
They fixed it by removing the MPI header file (mpif.h) that was included with
the PARPACK source. A quick look at the header provided by OpenMPI, and other
MPI documentation suggested that mixing headers for different MPI
implementaions is generally a bad idea.

As a fix, I removed the provided files (mpif.h), added "-I/usr/include/mpi" to
the compilation options in debian/rules, and fixed the list of MPI symbols in
debian/libarpack2.symbols. The patched build performed as expected...


## Patched build...

$ mpiexec -n 2 ./pdsdrv1

 Ritz values and direct residuals
 --------------------------------
               Col   1       Col   2
  Row   1:    1.62028D-01   2.65146D-15
  Row   2:    3.98507D-01   3.49175D-15
  Row   3:    3.98507D-01   2.40782D-15
  Row   4:    6.34986D-01   3.14833D-15


 _SDRV1
 ======

  Size of the matrix is          100
  The number of processors is            2
  The number of Ritz values requested is            4
  The number of Arnoldi vectors generated (NCV) is           20
  What portion of the spectrum: SM
  The number of converged Ritz values is            4
  The number of Implicit Arnoldi update iterations taken is            9
  The number of OP*x is          140
  The convergence criterion is   1.11022302462515654E-016


I've attached a debdiff of my changes. This is my first time submitting a patch
of this kind, so I hope it is useful..



-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libarpack2 depends on:
ii  libatlas3gf-base              3.8.3-27   Automatically Tuned Linear Algebra
ii  libc6                         2.13-16    Embedded GNU C Library: Shared lib
ii  libgfortran3                  4.6.1-4    Runtime library for GNU Fortran ap
ii  libopenmpi1.3                 1.4.3-2.1  high performance message passing l

Versions of packages libarpack2 recommends:
pn  atlas3-base                   <none>     (no description available)

libarpack2 suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arpack-debdiff
Type: text/x-diff
Size: 21087 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-scicomp-devel/attachments/20110823/869c80f0/attachment.diff>


More information about the Pkg-scicomp-devel mailing list