Bug#883042: scalapack: Filter -Wl, -Bsymbolic-functions out of LDFLAGS for more robust builds

Steve Langasek steve.langasek at canonical.com
Wed Nov 29 02:35:20 UTC 2017


Package: scalapack
Version: 2.0.2-3
Severity: minor
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu bionic ubuntu-patch

Dear Muammar,

In Ubuntu, scalapack 2.0.2-3 was failing its tests during build:

[...]
Running tests for libscalapack-openmpi
************************************************
****** TESTING openmpi BUILD
************************************************
        cd build-openmpi && make -j4 test ARGS\+=-j4
make[2]: Entering directory '/<<PKGBUILDDIR>>/build-openmpi'
Running tests...
/usr/bin/ctest --force-new-ctest-process -j4
Test project /<<PKGBUILDDIR>>/build-openmpi
      Start  1: xCbtest
      Start  2: xFbtest
      Start  3: spb1tst
      Start  4: dpb1tst
 1/96 Test  #4: dpb1tst ..........................***Failed    1.13 sec
--------------------------------------------------------------------------
[[3011,1],1]: A high-performance Open MPI point-to-point messaging module
was unable to find any relevant network interfaces:
Module: OpenFabrics (openib)
  Host: lgw01-amd64-045

Another transport will be used instead, although this may result in
lower performance.

NOTE: You can disable this warning by setting the MCA parameter
btl_base_warn_component_unused to 0.
--------------------------------------------------------------------------
Level 1 PBLAS testing program.
'Intel iPSC/860 hypercube, gamma model.'                                       

Tests of the real double precision Level 1 PBLAS

The following parameter values will be used:

  Number of Tests           :      4
  Number of process grids   :      4
  P                         :      2     1     2     1
  Q                         :      2     2     1     4
  Stop on failure flag      :      F
  Test for error exits flag :      T
  Leading dimension gap     :     10
  Verbosity level           :      0
  Alpha                     :      2.00000    
  Routines to be tested     :      PDSWAP  ... Yes
                                   PDSCAL  ... Yes
                                   PDCOPY  ... Yes
                                   PDAXPY  ... Yes
                                   PDDOT   ... Yes
                                   PDNRM2  ... Yes
                                   PDASUM  ... Yes
                                   PDAMAX  ... Yes
  Relative machine precision (eps) is taken to be       0.111022E-15

  Tests started.

PBLAS ERROR 'Illegal length of sub( X ) = -1, it must be at least 0'
from {0,1}, pnum=1, Contxt=0, in routine 'PDSWAP'.

PBLAS ERROR 'Illegal length of sub( Y ) = -1, it must be at least 0'
from {0,1}, pnum=1, Contxt=0, in routine 'PDSWAP'.

PBLAS ERROR 'Parameter number 1 had an illegal value'
from {0,1}, pnum=1, Contxt=0, in routine 'PDSWAP'.

{0,1}, pnum=1, Contxt=0, killed other procs, exiting with error #-1.

PBLAS ERROR 'Illegal length of sub( X ) = -1, it must be at least 0'
from {0,2}, pnum=2, Contxt=0, in routine 'PDSWAP'.

PBLAS ERROR 'Illegal length of sub( Y ) = -1, it must be at least 0'
from {0,2}, pnum=2, Contxt=0, in routine 'PDSWAP'.

PBLAS ERROR 'Parameter number 1 had an illegal value'
from {0,2}, pnum=2, Contxt=0, in routine 'PDSWAP'.

{0,2}, pnum=2, Contxt=0, killed other procs, exiting with error #-1.

PBLAS ERROR 'Illegal length of sub( X ) = -1, it must be at least 0'
from {0,0}, pnum=0, Contxt=0, in routine 'PDSWAP'.

PBLAS ERROR 'Illegal length of sub( Y ) = -1, it must be at least 0'
from {0,0}, pnum=0, Contxt=0, in routine 'PDSWAP'.

PBLAS ERROR 'Parameter number 1 had an illegal value'
from {0,0}, pnum=0, Contxt=0, in routine 'PDSWAP'.

{0,0}, pnum=0, Contxt=0, killed other procs, exiting with error #-1.

--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 2 in communicator MPI_COMM_WORLD
with errorcode -1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
[lgw01-amd64-045:02004] 3 more processes have sent help message help-mpi-btl-base.txt / btl:no-nics
[lgw01-amd64-045:02004] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
[lgw01-amd64-045:02004] 2 more processes have sent help message help-mpi-api.txt / mpi-abort

[...]

  https://launchpad.net/ubuntu/+source/scalapack/2.0.2-3/+build/13662891

This build failure does not happen in Debian, and I tracked it down to a
difference in the default dpkg-buildflags used in Debian vs Ubuntu.  Ubuntu
includes -Wl,-Bsymbolic-functions in its LDFLAGS, and Debian does not.

The attached patch filters -Wl,-Bsymbolic-functions out of LDFLAGS, allowing
the package to build in Ubuntu.  Although this is a no-op on Debian, it does
make the package more robust against differences in user-configured build
flags, so I think it makes sense to apply it in Debian.

Perhaps you would also prefer to work with upstream to understand why this
flag causes the tests to fail.  Previous versions of scalapack did not fail
when built with this flag, and it is a sensible default in Ubuntu for some
time.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru scalapack-2.0.2/debian/rules scalapack-2.0.2/debian/rules
--- scalapack-2.0.2/debian/rules	2017-09-10 09:26:09.000000000 -0700
+++ scalapack-2.0.2/debian/rules	2017-11-28 17:37:43.000000000 -0800
@@ -5,6 +5,7 @@
 export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
 export DEB_CXXFLAGS_MAINT_APPEND  = -Wall -pedantic
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
 export DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 export DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 export DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)


More information about the debian-science-maintainers mailing list