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 ^hwlow@1.11.11 ^mpich ~slurm +argobots ^hwloc@2.2.0 ^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
^hwloc@2.2.0
^hwlow@1.11.11
^mpich+argobots~slurm
Concretized
--------------------------------
==> Error: An unsatisfiable version constraint has been detected for spec:
hwloc@2.2.0
^pkgconf@1.4.2%gcc@8.3.1 arch=linux-centos8-broadwell
while trying to concretize the partial spec:
gromacs@2020.4%gcc@8.3.1~cuda~double~double_precision+hwloc~ipo~lapack~mdrun_only+mpi~nosuffix~opencl+openmp~plumed+shared build_type=RelWithDebInfo arch=linux-centos8-broadwell
^cmake@3.18.4%gcc@8.3.1~doc+ncurses+openssl+ownlibs~qt arch=linux-centos8-broadwell
^ncurses
^pkgconf@1.4.2%gcc@8.3.1 arch=linux-centos8-broadwell
^openssl
^perl@5.14.0:
^berkeley-db
^gdbm
^readline
^zlib
^fftw@3.3.8%gcc@8.3.1+mpi+openmp~pfft_patches precision=double,float,long_double,quad arch=linux-centos8-broadwell
^mpich@3.3.2%gcc@8.3.1+argobots+fortran+hwloc+hydra+libxml2+pci+romio~slurm~verbs+wrapperrpath device=ch3 netmod=tcp pmi=pmi arch=linux-centos8-broadwell
^argobots@1.0%gcc@8.3.1~debug~valgrind arch=linux-centos8-broadwell
^autoconf@2.67:
^m4@1.4.6:
^automake@1.15:
^findutils@4.6.0%gcc@8.3.1 arch=linux-centos8-broadwell
^hwloc@2.2.0
^libpciaccess
^libtool@2.4.4:
^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 ^hwloc@2.2.0
==> 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
==> autoconf@2.69 : externally installed in /usr
[+] /usr
==> automake@1.16.1 : externally installed in /usr
[+] /usr
==> findutils@4.6.0 : externally installed in /usr
[+] /usr
==> libtool@2.4.6 : externally installed in /usr
[+] /usr
==> pkgconf@1.4.2 : 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
==> m4@1.4.18 : 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 / gcc@8.3.1 --------------------------
dmeqwwj mpich@3.3.2+argobots+fortran+hwloc+hydra+libxml2+pci+romio~slurm~verbs+wrapperrpath device=ch3 netmod=tcp patches=eb982de3366d48cbc55eb5e0df43373a45d9f51df208abf0835a72dc6c0b4774 pmi=pmi
$ spack spec gromacs +mpi ^hwlow@1.11.11 ^/dmeqwwj
Input spec
--------------------------------
gromacs+mpi
^hwlow@1.11.11
^mpich@3.3.2%gcc@8.3.1+argobots+fortran+hwloc+hydra+libxml2+pci+romio~slurm~verbs+wrapperrpath device=ch3 netmod=tcp patches=eb982de3366d48cbc55eb5e0df43373a45d9f51df208abf0835a72dc6c0b4774 pmi=pmi arch=linux-centos8-broadwell
^argobots@1.0%gcc@8.3.1~debug~valgrind arch=linux-centos8-broadwell
^hwloc@2.2.0%gcc@8.3.1~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-centos8-broadwell
^libpciaccess@0.16%gcc@8.3.1 arch=linux-centos8-broadwell
^libxml2@2.9.10%gcc@8.3.1~python arch=linux-centos8-broadwell
^libiconv@1.16%gcc@8.3.1 arch=linux-centos8-broadwell
^xz@5.2.5%gcc@8.3.1~pic arch=linux-centos8-broadwell
^zlib@1.2.11%gcc@8.3.1+optimize+pic+shared arch=linux-centos8-broadwell
Concretized
--------------------------------
==> Error: An unsatisfiable constrain a concrete spec constraint has been detected for spec:
hwloc@2.2.0%gcc@8.3.1~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-centos8-broadwell
^libpciaccess@0.16%gcc@8.3.1 arch=linux-centos8-broadwell
^libxml2@2.9.10%gcc@8.3.1~python arch=linux-centos8-broadwell
^libiconv@1.16%gcc@8.3.1 arch=linux-centos8-broadwell
^xz@5.2.5%gcc@8.3.1~pic arch=linux-centos8-broadwell
^zlib@1.2.11%gcc@8.3.1+optimize+pic+shared arch=linux-centos8-broadwell
while trying to concretize the partial spec:
gromacs@2020.4%gcc@8.3.1~cuda~double~double_precision+hwloc~ipo~lapack~mdrun_only+mpi~nosuffix~opencl+openmp~plumed+shared build_type=RelWithDebInfo arch=linux-centos8-broadwell
^cmake@3.18.4%gcc@8.3.1~doc+ncurses+openssl+ownlibs~qt arch=linux-centos8-broadwell
^ncurses
^pkgconfig
^openssl
^perl@5.14.0:
^berkeley-db
^gdbm
^readline
^zlib@1.2.11%gcc@8.3.1+optimize+pic+shared arch=linux-centos8-broadwell
^fftw@3.3.8%gcc@8.3.1+mpi~openmp~pfft_patches precision=double,float arch=linux-centos8-broadwell
^mpich@3.3.2%gcc@8.3.1+argobots+fortran+hwloc+hydra+libxml2+pci+romio~slurm~verbs+wrapperrpath device=ch3 netmod=tcp patches=eb982de3366d48cbc55eb5e0df43373a45d9f51df208abf0835a72dc6c0b4774 pmi=pmi arch=linux-centos8-broadwell
^argobots@1.0%gcc@8.3.1~debug~valgrind arch=linux-centos8-broadwell
^hwloc@2.2.0%gcc@8.3.1~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-centos8-broadwell
^libpciaccess@0.16%gcc@8.3.1 arch=linux-centos8-broadwell
^libxml2@2.9.10%gcc@8.3.1~python arch=linux-centos8-broadwell
^libiconv@1.16%gcc@8.3.1 arch=linux-centos8-broadwell
^xz@5.2.5%gcc@8.3.1~pic arch=linux-centos8-broadwell
gromacs requires hwloc constrain a concrete spec hwloc@:1.999, but spec asked for hwloc@2.2.0%gcc@8.3.1~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-centos8-broadwell ^libiconv@1.16%gcc@8.3.1 arch=linux-centos8-broadwell ^libpciaccess@0.16%gcc@8.3.1 arch=linux-centos8-broadwell ^libxml2@2.9.10%gcc@8.3.1~python arch=linux-centos8-broadwell ^xz@5.2.5%gcc@8.3.1~pic arch=linux-centos8-broadwell ^zlib@1.2.11%gcc@8.3.1+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
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
Either way, the error message is
It also doesn't matter if one installs first MPICH and attempts to use it to install GROMACS
Information on your system