Skip to content

Artificial constraints imposed by the concretizer #19764

@victorusu

Description

@victorusu

For some packages, the concretizer creates artificial global constraints, even if one asks for specific ones.
These artificial constraints block the possibility to make certain installations even though they are completely possible outside of Spack, especially when using RPATH.

An example is to attempt to compile GROMACS 2020.4 with MPICH 3.3.2. Since GROMACS requires hwloc version up to 1.x and MPICH 3.3.x requires hwloc version 2.x.

Steps to reproduce the issue

$ git clone https://github.com/spack/spack.git
$ . ./spack/share/spack/setup-env.sh
$ spack spec gromacs +mpi  ^mpich ~slurm +argobots ^fftw +mpi +openmp precision=long_double,double,quad,float
or
$ spack spec gromacs +mpi ^[email protected] ^mpich ~slurm +argobots ^[email protected] ^fftw +mpi +openmp precision=long_double,double,quad,float

Either way, the error message is

Input spec
--------------------------------
gromacs+mpi
    ^fftw+mpi+openmp precision=double,float,long_double,quad
    ^[email protected]
    ^[email protected]
    ^mpich+argobots~slurm

Concretized
--------------------------------
==> Error: An unsatisfiable version constraint has been detected for spec:

    [email protected]
        ^[email protected]%[email protected] arch=linux-centos8-broadwell


while trying to concretize the partial spec:

    [email protected]%[email protected]~cuda~double~double_precision+hwloc~ipo~lapack~mdrun_only+mpi~nosuffix~opencl+openmp~plumed+shared build_type=RelWithDebInfo arch=linux-centos8-broadwell
        ^[email protected]%[email protected]~doc+ncurses+openssl+ownlibs~qt arch=linux-centos8-broadwell
            ^ncurses
                ^[email protected]%[email protected] arch=linux-centos8-broadwell
            ^openssl
                ^[email protected]:
                    ^berkeley-db
                    ^gdbm
                        ^readline
                ^zlib
        ^[email protected]%[email protected]+mpi+openmp~pfft_patches precision=double,float,long_double,quad arch=linux-centos8-broadwell
            ^[email protected]%[email protected]+argobots+fortran+hwloc+hydra+libxml2+pci+romio~slurm~verbs+wrapperrpath device=ch3 netmod=tcp pmi=pmi arch=linux-centos8-broadwell
                ^[email protected]%[email protected]~debug~valgrind arch=linux-centos8-broadwell
                ^[email protected]:
                    ^[email protected]:
                ^[email protected]:
                ^[email protected]%[email protected] arch=linux-centos8-broadwell
                ^[email protected]
                ^libpciaccess
                    ^[email protected]:
                    ^util-macros
                ^libxml2
                    ^iconv
                    ^xz


gromacs requires hwloc version :1.999, but spec asked for 2.2.0...

It also doesn't matter if one installs first MPICH and attempts to use it to install GROMACS

$ spack install mpich ~slurm +argobots ^[email protected] 
==> Installing argobots
==> No binary for argobots found: installing from source
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/36/36a0815f7bf99900a9c9c1eef61ef9b3b76aa2cfc4594a304f6c8c3296da8def.tar.gz
############################################################################################################################# 100.0%
==> argobots: Executing phase: 'autoreconf'
==> argobots: Executing phase: 'configure'
==> argobots: Executing phase: 'build'
==> argobots: Executing phase: 'install'
[+] /users/user/spack/opt/spack/linux-centos8-broadwell/gcc-8.3.1/argobots-1.0-hyko5poasp3efwogzzf7wbl3a2nejov5
==> [email protected] : externally installed in /usr
[+] /usr
==> [email protected] : externally installed in /usr
[+] /usr
==> [email protected] : externally installed in /usr
[+] /usr
==> [email protected] : externally installed in /usr
[+] /usr
==> [email protected] : externally installed in /usr
[+] /usr
==> Installing util-macros
==> No binary for util-macros found: installing from source
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/18/18d459400558f4ea99527bc9786c033965a3db45bf4c6a32eefdc07aa9e306a6.tar.bz2
############################################################################################################################# 100.0%
==> util-macros: Executing phase: 'autoreconf'
==> util-macros: Executing phase: 'configure'
==> util-macros: Executing phase: 'build'
==> util-macros: Executing phase: 'install'
[+] /users/user/spack/opt/spack/linux-centos8-broadwell/gcc-8.3.1/util-macros-1.19.1-pw3zua37sci5ssxu5e6pogvsbmnstag5
[+] /users/user/spack/opt/spack/linux-centos8-broadwell/gcc-8.3.1/libiconv-1.16-5xigvm27i5rrhnuzkdtoxqp4it7cferz
[+] /users/user/spack/opt/spack/linux-centos8-broadwell/gcc-8.3.1/xz-5.2.5-xja6u5dzeoihio4n55fc7vu3hkvtmdte
[+] /users/user/spack/opt/spack/linux-centos8-broadwell/gcc-8.3.1/zlib-1.2.11-y5gmir5k3aljdcqorisvp3emvpnohr75
==> [email protected] : externally installed in /usr
[+] /usr
==> Installing libpciaccess
==> No binary for libpciaccess found: installing from source
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/84/84413553994aef0070cf420050aa5c0a51b1956b404920e21b81e96db6a61a27.tar.gz
############################################################################################################################# 100.0%
==> libpciaccess: Executing phase: 'autoreconf'
==> libpciaccess: Executing phase: 'configure'
==> libpciaccess: Executing phase: 'build'
==> libpciaccess: Executing phase: 'install'
[+] /users/user/spack/opt/spack/linux-centos8-broadwell/gcc-8.3.1/libpciaccess-0.16-5budu7syhvxnqag4hcbd3cxuelpvp3ev
[+] /users/user/spack/opt/spack/linux-centos8-broadwell/gcc-8.3.1/libxml2-2.9.10-wkncmwylkzn4hwyepm7qiwpeo75maozx
==> Installing hwloc
==> No binary for hwloc found: installing from source
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/2d/2defba03ddd91761b858cbbdc2e3a6e27b44e94696dbfa21380191328485a433.tar.gz
############################################################################################################################# 100.0%
==> hwloc: Executing phase: 'autoreconf'
==> hwloc: Executing phase: 'configure'
==> hwloc: Executing phase: 'build'
==> hwloc: Executing phase: 'install'
[+] /users/user/spack/opt/spack/linux-centos8-broadwell/gcc-8.3.1/hwloc-2.2.0-jrnyxhctfsc4642fbdfab3bhvckiolvp
==> Installing mpich
==> No binary for mpich found: installing from source
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/4b/4bfaf8837a54771d3e4922c84071ef80ffebddbb6971a006038d91ee7ef959b9.tar.gz
############################################################################################################################# 100.0%
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/eb/eb982de3366d48cbc55eb5e0df43373a45d9f51df208abf0835a72dc6c0b4774
############################################################################################################################# 100.0%
==> mpich: Executing phase: 'autoreconf'
==> mpich: Executing phase: 'configure'
==> mpich: Executing phase: 'build'
==> mpich: Executing phase: 'install'
[+] /users/user/spack/opt/spack/linux-centos8-broadwell/gcc-8.3.1/mpich-3.3.2-dmeqwwj5wxgsbblcuikkffbbtux4mf4j


$ spack find -vl mpich 
==> 1 installed package
-- linux-centos8-broadwell / [email protected] --------------------------
dmeqwwj [email protected]+argobots+fortran+hwloc+hydra+libxml2+pci+romio~slurm~verbs+wrapperrpath device=ch3 netmod=tcp patches=eb982de3366d48cbc55eb5e0df43373a45d9f51df208abf0835a72dc6c0b4774 pmi=pmi


$ spack spec gromacs +mpi ^[email protected] ^/dmeqwwj
Input spec
--------------------------------
gromacs+mpi
    ^[email protected]
    ^[email protected]%[email protected]+argobots+fortran+hwloc+hydra+libxml2+pci+romio~slurm~verbs+wrapperrpath device=ch3 netmod=tcp patches=eb982de3366d48cbc55eb5e0df43373a45d9f51df208abf0835a72dc6c0b4774 pmi=pmi arch=linux-centos8-broadwell
        ^[email protected]%[email protected]~debug~valgrind arch=linux-centos8-broadwell
        ^[email protected]%[email protected]~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-centos8-broadwell
            ^[email protected]%[email protected] arch=linux-centos8-broadwell
            ^[email protected]%[email protected]~python arch=linux-centos8-broadwell
                ^[email protected]%[email protected] arch=linux-centos8-broadwell
                ^[email protected]%[email protected]~pic arch=linux-centos8-broadwell
                ^[email protected]%[email protected]+optimize+pic+shared arch=linux-centos8-broadwell

Concretized
--------------------------------
==> Error: An unsatisfiable constrain a concrete spec constraint has been detected for spec:

    [email protected]%[email protected]~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-centos8-broadwell
        ^[email protected]%[email protected] arch=linux-centos8-broadwell
        ^[email protected]%[email protected]~python arch=linux-centos8-broadwell
            ^[email protected]%[email protected] arch=linux-centos8-broadwell
            ^[email protected]%[email protected]~pic arch=linux-centos8-broadwell
            ^[email protected]%[email protected]+optimize+pic+shared arch=linux-centos8-broadwell


while trying to concretize the partial spec:

    [email protected]%[email protected]~cuda~double~double_precision+hwloc~ipo~lapack~mdrun_only+mpi~nosuffix~opencl+openmp~plumed+shared build_type=RelWithDebInfo arch=linux-centos8-broadwell
        ^[email protected]%[email protected]~doc+ncurses+openssl+ownlibs~qt arch=linux-centos8-broadwell
            ^ncurses
                ^pkgconfig
            ^openssl
                ^[email protected]:
                    ^berkeley-db
                    ^gdbm
                        ^readline
                ^[email protected]%[email protected]+optimize+pic+shared arch=linux-centos8-broadwell
        ^[email protected]%[email protected]+mpi~openmp~pfft_patches precision=double,float arch=linux-centos8-broadwell
            ^[email protected]%[email protected]+argobots+fortran+hwloc+hydra+libxml2+pci+romio~slurm~verbs+wrapperrpath device=ch3 netmod=tcp patches=eb982de3366d48cbc55eb5e0df43373a45d9f51df208abf0835a72dc6c0b4774 pmi=pmi arch=linux-centos8-broadwell
                ^[email protected]%[email protected]~debug~valgrind arch=linux-centos8-broadwell
                ^[email protected]%[email protected]~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-centos8-broadwell
                    ^[email protected]%[email protected] arch=linux-centos8-broadwell
                    ^[email protected]%[email protected]~python arch=linux-centos8-broadwell
                        ^[email protected]%[email protected] arch=linux-centos8-broadwell
                        ^[email protected]%[email protected]~pic arch=linux-centos8-broadwell


gromacs requires hwloc constrain a concrete spec hwloc@:1.999, but spec asked for [email protected]%[email protected]~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-centos8-broadwell ^[email protected]%[email protected] arch=linux-centos8-broadwell ^[email protected]%[email protected] arch=linux-centos8-broadwell ^[email protected]%[email protected]~python arch=linux-centos8-broadwell ^[email protected]%[email protected]~pic arch=linux-centos8-broadwell ^[email protected]%[email protected]+optimize+pic+shared arch=linux-centos8-broadwell

Information on your system

$ spack debug report
* **Spack:** 0.13.3-4834-cc6ee3e56
* **Python:** 3.6.8
* **Platform:** linux-centos8-broadwell

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconcretizationtriageThe issue needs to be prioritized

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions