spack / spack

A flexible package manager that supports multiple versions, configurations, platforms, and compilers.
https://spack.io
Other
4.42k stars 2.29k forks source link

spack install --overwrite <spec> in environment says spec is not installed when it is #19586

Open davidbeckingsale opened 4 years ago

davidbeckingsale commented 4 years ago

I ran spack install --overwrite <spec>, where <spec> was copied from the spack.yaml environment file. The command reports that the spec will be newly installed, even though the hash is shown to be installed by spack find.

Entering "y" to install the package does correctly try and install the spec.

Steps to reproduce the issue

$ spack install #install environment
$ spack install --overwrite <spec>
...

Error Message

No error, but incorrect output:

$ spack install --overwrite raja@apollo+cuda~shared~openmp cuda_arch=70 %clang@10.0.1 ^apollo@develop%clang@10.0.1 ^callpath%gcc ^spectrum-mpi ^opencv+vsx%gcc
==> The following package specs will be reinstalled:

-- linux-rhel7-ppc64le / clang@10.0.1 ---------------------------
o62ywpb raja@apollo%clang +cuda~openmp~shared build_type=RelWithDebInfo cuda_arch=70
==> The following package specs are not installed and the --overwrite flag was given. The package spec will be newly installed:

-- linux-rhel7-ppc64le / clang@10.0.1 ---------------------------
o62ywpb raja@apollo%clang +cuda~openmp~shared build_type=RelWithDebInfo cuda_arch=70

spack find shows that that spec is installed:

$ spack find -l raja@apollo
==> In environment /g/g92/ukbeck/Projects/apollo/code/apollo-spack-env
==> Root specs
-- no arch / clang@10.0.1 ---------------------------------------
------- raja@apollo%clang@10.0.1 +cuda~openmp~shared cuda_arch=70  ------- raja@apollo%clang@10.0.1 +cuda~openmp~shared cuda_arch=70

==> 1 installed package
-- linux-rhel7-ppc64le / clang@10.0.1 ---------------------------
o62ywpb raja@apollo

Additional information

davidbeckingsale commented 4 years ago

Potentially related to #17060, but in my case Spack does go ahead and try to re-install the package.