Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-21054

build: mpitests configure check does not link, broken MPI fails build

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • Lustre 2.18.0
    • None
    • 3
    • 9223372036854775807

      LB_CONFIG_MPITESTS in config/lustre-core.m4 checks whether the MPI
      tests can be built with AC_COMPILE_IFELSE, so the test program is
      only compiled ("mpicc -c") and never linked. A broken MPI library
      installation passes the check, mpitests are enabled, and the build
      then fails later when linking the programs in lustre/tests/mpi
      (createmany_mpi, cascading_rw, mdsrate, ...).

      --enable-mpitests is enabled by default and uses whatever "mpicc"
      is in PATH, so this hits builds that did not ask for MPI tests.

      Seen on ARM64 Ubuntu clients with OpenMPI 5.0.11 installed
      system-wide for Slurm. That libmpi.so was built on a host with
      Lustre headers, so it has a NEEDED entry for liblustreapi.so.1.
      When building Lustre on a client where Lustre is not yet installed,
      liblustreapi.so.1 cannot be found and the link in lustre/tests/mpi
      fails with:

      error while loading shared libraries: liblustreapi.so.1: cannot
      open shared object file

      Steps to reproduce:
      1. Put an mpicc in PATH whose libmpi.so cannot be linked (e.g. has
      an unresolvable NEEDED library).
      2. ./configure (without --disable-mpitests)
      -> "checking whether mpitests can be built... yes"
      3. make (or make debs)
      -> link failure in lustre/tests/mpi

      Workaround: configure with --disable-mpitests.

      Fix: use AC_LINK_IFELSE in the mpitests check so that an MPI
      library that cannot be linked disables mpitests at configure time
      instead of failing the build.

            yujian Jian Yu
            yujian Jian Yu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: