spack: Spack does not respect openmpi version

I have the following in my ~/.spack/packages.yml

packages:
    all:
        providers:
            mpi: [openmpi]

    gcc:
        version: [4.8.5]
        variants: ~binutils
    openmpi:
        version: [1.8.8]
    zlib:
        version: [1.2.8]
    libxml2:
        version: [2.9.2]
        variants: ~python
    boost:
        version: [1.55.0]
        variants: +mpi
    hdf5:
        version: [1.8.12]
        variants: ~fortran +mpi
    parallel-netcdf:
        version: [1.6.1]
        variants: ~fortran
    netcdf:
        version: [4.3.3.1]
        variants: +mpi +parallel-netcdf ~shared
    cmake:
        version: [3.1.0]

Testing on openmpi works as it fetches the correct 1.8.8 version:

$ spack spec -I openmpi
     openmpi@1.8.8%gcc@6.2.1~mxm~pmi~psm~psm2~slurm~sqlite3~thread_multiple~tm~verbs+vt arch=linux-fedora24-x86_64
         ^hwloc@1.11.4%gcc@6.2.1 arch=linux-fedora24-x86_64
             ^libpciaccess@0.13.4%gcc@6.2.1 arch=linux-fedora24-x86_64
                 ^libtool@2.4.6%gcc@6.2.1 arch=linux-fedora24-x86_64
                     ^m4@1.4.17%gcc@6.2.1+sigsegv arch=linux-fedora24-x86_64
                         ^libsigsegv@2.10%gcc@6.2.1 arch=linux-fedora24-x86_64
                 ^pkg-config@0.29.1%gcc@6.2.1+internal_glib arch=linux-fedora24-x86_64
                 ^util-macros@1.19.0%gcc@6.2.1 arch=linux-fedora24-x86_64

However, testing on boost produces

$ spack spec -I boost
  boost@1.55.0%gcc@6.2.1+atomic+chrono+date_time~debug+filesystem~graph~icu+iostreams+locale+log+math+mpi+multithreaded+program_options~python+random+regex+serialization+shared+signals~singlethreaded+system~taggedlayout+test+thread+timer+wave arch=linux-fedora24-x86_64
         ^bzip2@1.0.6%gcc@6.2.1 arch=linux-fedora24-x86_64
         ^openmpi@2.0.1%gcc@6.2.1~mxm~pmi~psm~psm2~slurm~sqlite3~thread_multiple~tm~verbs+vt arch=linux-fedora24-x86_64
             ^hwloc@1.11.4%gcc@6.2.1 arch=linux-fedora24-x86_64
                 ^libpciaccess@0.13.4%gcc@6.2.1 arch=linux-fedora24-x86_64
                     ^libtool@2.4.6%gcc@6.2.1 arch=linux-fedora24-x86_64
                         ^m4@1.4.17%gcc@6.2.1+sigsegv arch=linux-fedora24-x86_64
                             ^libsigsegv@2.10%gcc@6.2.1 arch=linux-fedora24-x86_64
                     ^pkg-config@0.29.1%gcc@6.2.1+internal_glib arch=linux-fedora24-x86_64
                     ^util-macros@1.19.0%gcc@6.2.1 arch=linux-fedora24-x86_64
         ^zlib@1.2.8%gcc@6.2.1 arch=linux-fedora24-x86_64

So it picks up openmpi 2.0.1 instead of 1.8.8. Same thing happens when trying other packages depending on mpi, such as hdf5

$ spack spec -I hdf5
     hdf5@1.8.12%gcc@6.2.1+cxx~debug~fortran+mpi+shared~szip~threadsafe arch=linux-fedora24-x86_64
         ^openmpi@2.0.1%gcc@6.2.1~mxm~pmi~psm~psm2~slurm~sqlite3~thread_multiple~tm~verbs+vt arch=linux-fedora24-x86_64
             ^hwloc@1.11.4%gcc@6.2.1 arch=linux-fedora24-x86_64
                 ^libpciaccess@0.13.4%gcc@6.2.1 arch=linux-fedora24-x86_64
                     ^libtool@2.4.6%gcc@6.2.1 arch=linux-fedora24-x86_64
                         ^m4@1.4.17%gcc@6.2.1+sigsegv arch=linux-fedora24-x86_64
                             ^libsigsegv@2.10%gcc@6.2.1 arch=linux-fedora24-x86_64
                     ^pkg-config@0.29.1%gcc@6.2.1+internal_glib arch=linux-fedora24-x86_64
                     ^util-macros@1.19.0%gcc@6.2.1 arch=linux-fedora24-x86_64
         ^zlib@1.2.8%gcc@6.2.1 arch=linux-fedora24-x86_64

Am I doing something wrong here?

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 28 (28 by maintainers)

Most upvoted comments

So about the original problem of not respecing OpenMPI versions…?

On Wed, Dec 21, 2016 at 3:46 PM, Adam J. Stewart notifications@github.com wrote:

I could think of splitting the configuration files into user-defined and generated, and then merging them when spack is running but I don’t think it’s worth it.

Yeah, we already kind of do that. Spack comes with it’s own defaults in etc/spack/defaults that get merged with the user settings in ~/.spack. Like I said, anything that removes auto-generated settings would also affect other Spack installations. Spack would have no means of telling whether or not other Spack installations exist.

I think this is pretty standard for UNIX applications. It allows you to completely remove and reinstall or update a package without changing the settings you’ve meticulously crafted.

I think the thing to do for this particular situation is what we discussed in #2599 https://github.com/LLNL/spack/issues/2599. Spack should be smart enough to pick up new compilers if they are added.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LLNL/spack/issues/2342#issuecomment-268634940, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1cdw28-o7i8aYgiGufjUJ5WMXJeOsYks5rKZAZgaJpZM4Ky4Ux .