spack: Unable to specify dependency by hash
Hello, I’m trying to install lammps with an mvapich2 that is already installed, but Spack still tries to rebuild mvapich2. Am I missing something needed here?
[spack@login03 ~]$ spack find -l -f mvapich2
==> 3 installed packages.
-- linux-centos7-x86_64 / gcc@6.3.0 -----------------------------
qmt35td mvapich2@2.2%gcc
er3die3 mvapich2@2.2%gcc ldflags="-L/cm/shared/apps/slurm/current/lib64"
-- linux-centos7-x86_64 / intel@17.0.4 --------------------------
2hro7lm mvapich2@2.2%intel ldflags="-L/cm/shared/apps/slurm/current/lib64"
[spack@login03 ~]$ spack install --restage lammps %gcc@6.3.0 ^mvapich2/er3die3
==> libpciaccess is already installed in /hpc/spack/opt/spack/linux-centos7-x86_64/gcc-6.3.0/libpciaccess-0.13.5-uwak3icfpwpnppl643wooiqa4mykd5rg
==> bison is already installed in /hpc/spack/opt/spack/linux-centos7-x86_64/gcc-6.3.0/bison-3.0.4-7blhnzv2yrbjgt5rl2vzxsxiul7kmzmy
==> Installing mvapich2
==> Using cached archive: /hpc/spack/var/spack/cache/mvapich2/mvapich2-2.2.tar.gz
==> Staging archive: /hpc/spack/var/spack/stage/mvapich2-2.2-horahftsbn65ipxh3wzwx2tzzxtt66yy/mvapich2-2.2.tar.gz
==> Created stage in /hpc/spack/var/spack/stage/mvapich2-2.2-horahftsbn65ipxh3wzwx2tzzxtt66yy
==> Building mvapich2 [AutotoolsPackage]
==> Executing phase : 'autoreconf'
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 17 (17 by maintainers)
@adamjstewart I haven’t had a chance to catch up on the rest of the conversation, but the counterintuitive hash behavior on the command line that you mention above no longer occurs.
$ spack spec lammps ^mvapich2/er3die3is perfectly legal syntax now, and Spack understands to translate that to$ spack install lammps ^mvapich2@version%compiler@version+variants^dependenciesSpack also still works without specifying the package name.
$ spack spec lammps ^mvapich2/er3die3and$ spack spec lammps ^/er3die3are identical.I made a typographical error, that’s why the first command didn’t work. I wanted the output of
$ spack spec mvapich2@2.2%gcc@6.3.0 ldflags="-L/cm/shared/apps/slurm/current/lib64" ch3_rank_bits=32 ~cuda~debug fabrics=sock process_managers=slurm threads=multiple arch=linux-centos7-x86_64without the
^.Also, can you paste the output of
spack spec lammps %gcc@6.3.0and
spack find -Lvfd mvapich2?spack find --very-longgives:spack spec --install-statusgives:spack install lammps%gcc@6.3.0 ^/er3die3without--restagestill tries to build mvapich2 again:Oh, I completely missed that, sorry. I was looking at the
ldflagsand got confused.The problem is how you’re specifying the dependency. The hash includes the package name, version, variants, compiler, and dependencies. So when you say:
Spack translates this to:
Try this instead: