Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clingo fails to use externals with patches=abcde variants #28201

Closed
3 tasks done
psakievich opened this issue Jan 2, 2022 · 15 comments
Closed
3 tasks done

Clingo fails to use externals with patches=abcde variants #28201

psakievich opened this issue Jan 2, 2022 · 15 comments
Assignees

Comments

@psakievich
Copy link
Contributor

psakievich commented Jan 2, 2022

Steps to reproduce

The environment from the attached files fails to concretize unless I use the --reuse flag, but if I use original concretizer it concretizes successfully. The error message below is not very helpful.

externals.yaml.txt
include.yaml.txt
spack.lock.txt
spack.yaml.txt

Error message

# spack concretize -f
==> Error: nalu-wind@master dev_path=/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/nalu-wind is unsatisfiable, errors are:
  External package does not satisfy external spec

    To see full clingo unsat cores, re-run with `spack --show-cores=full`
    For full, subset-minimal unsat cores, re-run with `spack --show-cores=minimized
    Warning: This may take (up to) hours for some specs

nalu-wind is not an external in this case, but all of its dependencies are.

Also it looks like clingo is just getting this wrong even with the --reuse flag. When I use the original concretizer all of the dependencies of externals are dropped off the DAG as they should be:

# spack concretize -f
==> Starting concretization
==> Warning: the original concretizer is currently being used.
        Upgrade to "clingo" at your earliest convenience. The original concretizer will be removed from Spack starting at v0.18.0
==> Environment concretized in 1.94 seconds.
==> Concretized nalu-wind
 -   zuen3dq  nalu-wind@master%apple-clang@13.0.0~asan~boost~catalyst~cuda~fftw~hypre~ipo~openfast+pic~tioga~wind-utils abs_tol=1e-15 build_type=Release cxxstd=14 dev_path=/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/nalu-wind rel_tol=1e-12 arch=darwin-bigsur-x86_64
 -   nnb45q4      ^cmake@3.22.1%apple-clang@13.0.0~doc+ncurses+openssl+ownlibs~qt build_type=Release arch=darwin-bigsur-x86_64
 -   jp5eb2e          ^ncurses@6.2%apple-clang@13.0.0~symlinks+termlib abi=none arch=darwin-bigsur-x86_64
 -   urfcd2b          ^openssl@1.1.1l%apple-clang@13.0.0~docs certs=system arch=darwin-bigsur-x86_64
 -   p6iffau              ^perl@5.34.0%apple-clang@13.0.0+cpanm+shared+threads arch=darwin-bigsur-x86_64
[+]  emdbkn6                  ^berkeley-db@18.1.40%apple-clang@13.0.0+cxx~docs+stl patches=b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522 arch=darwin-bigsur-x86_64
 -   5rkx5ve                  ^bzip2@1.0.8%apple-clang@13.0.0~debug~pic+shared arch=darwin-bigsur-x86_64
 -   auehue2                  ^gdbm@1.19%apple-clang@13.0.0 arch=darwin-bigsur-x86_64
 -   aq3pp7d                      ^readline@8.1%apple-clang@13.0.0 arch=darwin-bigsur-x86_64
 -   xn23wj7                  ^zlib@1.2.11%apple-clang@13.0.0+optimize+pic+shared arch=darwin-bigsur-x86_64
 -   a3bis3e      ^mpich@3.4.2%apple-clang@13.0.0~argobots+fortran+hwloc+hydra+libxml2~pci+romio~slurm~two_level_namespace~verbs+wrapperrpath device=ch4 netmod=ofi pmi=pmi arch=darwin-bigsur-x86_64
 -   prylbnf      ^nccmp@1.9.0.1%apple-clang@13.0.0~ipo build_type=Release arch=darwin-bigsur-x86_64
 -   lncyukj      ^netcdf-c@4.7.4%apple-clang@13.0.0~dap~fsync~hdf4~jna+mpi+parallel-netcdf+pic+shared patches=2c88dfbd6d339a0336a43b14a65a1d1df995b853b645e4af612617612a642a53 arch=darwin-bigsur-x86_64
 -   yf22dt6      ^trilinos@develop%apple-clang@13.0.0~adios2~amesos+amesos2~anasazi~aztec~basker+belos+boost~chaco~complex~cuda~cuda_rdc~debug~dtk~epetra~epetraext~epetraextbtf~epetraextexperimental~epetraextgraphreorderings+exodus+explicit_template_instantiation~float+fortran+gtest+hdf5~hypre~ifpack+ifpack2~intrepid~intrepid2~ipo~isorropia+kokkos~mesquite~minitensor~ml+mpi+muelu~mumps~nox~openmp~phalanx~piro~python~rol~rythmos~sacado~scorec+shards~shared~shylu+stk~stk_unit_tests~stokhos~stratimikos~strumpack~suite-sparse~superlu~superlu-dist~teko~tempus+tpetra~trilinoscouplings~wrapper~x11+zoltan+zoltan2 build_type=Release cxxstd=14 gotype=long arch=darwin-bigsur-x86_64
 -   atsihfw      ^yaml-cpp@0.6.3%apple-clang@13.0.0~ipo+pic+shared~tests build_type=Release arch=darwin-bigsur-x86_64

but when I use clingo it resolves all of them as if the externals didn't exist:

# spack concretize -f --reuse
==> Starting concretization
==> Environment concretized in 106.29 seconds.
==> Concretized nalu-wind
-   vrigxcw  nalu-wind@master%apple-clang@13.0.0~asan~boost~catalyst~cuda~fftw~hypre~ipo~openfast+pic~tioga~wind-utils abs_tol=1e-15 build_type=Release cxxstd=14 dev_path=/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/nalu-wind rel_tol=1e-12 arch=darwin-bigsur-x86_64
[+]  7zgbrwt      ^cmake@3.22.1%apple-clang@13.0.0~doc+ncurses+openssl+ownlibs~qt build_type=Release arch=darwin-bigsur-x86_64
[+]  bjyawbo          ^ncurses@6.2%apple-clang@13.0.0~symlinks+termlib abi=none arch=darwin-bigsur-x86_64
[+]  rbk6qlu          ^openssl@1.1.1l%apple-clang@13.0.0~docs certs=system arch=darwin-bigsur-x86_64
[+]  tpha2u5              ^perl@5.34.0%apple-clang@13.0.0+cpanm+shared+threads arch=darwin-bigsur-x86_64
[+]  emdbkn6                  ^berkeley-db@18.1.40%apple-clang@13.0.0+cxx~docs+stl patches=b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522 arch=darwin-bigsur-x86_64
[+]  c5yi4rw                  ^bzip2@1.0.8%apple-clang@13.0.0~debug~pic+shared arch=darwin-bigsur-x86_64
[+]  ddpmn74                  ^gdbm@1.19%apple-clang@13.0.0 arch=darwin-bigsur-x86_64
[+]  nyieiyv                      ^readline@8.1%apple-clang@13.0.0 arch=darwin-bigsur-x86_64
[+]  dyvjhhi                  ^zlib@1.2.11%apple-clang@13.0.0+optimize+pic+shared arch=darwin-bigsur-x86_64
[+]  qyudgfm      ^mpich@3.4.2%apple-clang@13.0.0~argobots+fortran+hwloc+hydra+libxml2~pci+romio~slurm~two_level_namespace~verbs+wrapperrpath device=ch4 netmod=ofi pmi=pmi arch=darwin-bigsur-x86_64
[+]  r5ojspl          ^hwloc@2.6.0%apple-clang@13.0.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml~opencl~pci~rocm+shared arch=darwin-bigsur-x86_64
[+]  3dwrkpb              ^libxml2@2.9.12%apple-clang@13.0.0~python arch=darwin-bigsur-x86_64
[+]  nk3agj6                  ^libiconv@1.16%apple-clang@13.0.0 libs=shared,static arch=darwin-bigsur-x86_64
[+]  fjw5kip                  ^xz@5.2.5%apple-clang@13.0.0~pic libs=shared,static arch=darwin-bigsur-x86_64
[+]  wv2wsxj          ^libfabric@1.14.0%apple-clang@13.0.0~debug~kdreg fabrics=sockets,tcp,udp arch=darwin-bigsur-x86_64
-   xnkgcib      ^nccmp@1.9.0.1%apple-clang@13.0.0~ipo build_type=Release arch=darwin-bigsur-x86_64
[+]  n4gs6ty      ^netcdf-c@4.7.4%apple-clang@13.0.0~dap~fsync~hdf4~jna+mpi+parallel-netcdf+pic+shared patches=2c88dfbd6d339a0336a43b14a65a1d1df995b853b645e4af612617612a642a53 arch=darwin-bigsur-x86_64
[+]  un52msk          ^hdf5@1.10.7%apple-clang@13.0.0+cxx~fortran+hl~ipo~java+mpi+shared~szip~threadsafe+tools api=default build_type=RelWithDebInfo arch=darwin-bigsur-x86_64
[+]  exg6xuo              ^pkgconf@1.8.0%apple-clang@13.0.0 arch=darwin-bigsur-x86_64
[+]  nqacc3j          ^parallel-netcdf@1.12.2%apple-clang@13.0.0~burstbuffer+cxx+fortran+pic+shared arch=darwin-bigsur-x86_64
[+]  wlq6nfb      ^trilinos@develop%apple-clang@13.0.0~adios2~amesos+amesos2~anasazi~aztec~basker+belos+boost~chaco~complex~cuda~cuda_rdc~debug~dtk~epetra~epetraext~epetraextbtf~epetraextexperimental~epetraextgraphreorderings+exodus+explicit_template_instantiation~float+fortran+gtest+hdf5~hypre~ifpack+ifpack2~intrepid~intrepid2~ipo~isorropia+kokkos~mesquite~minitensor~ml+mpi+muelu~mumps~nox~openmp~phalanx~piro~python~rol~rythmos~sacado~scorec+shards~shared~shylu+stk~stk_unit_tests~stokhos~stratimikos~strumpack~suite-sparse~superlu~superlu-dist~teko~tempus+tpetra~trilinoscouplings~wrapper~x11+zoltan+zoltan2 build_type=Release cxxstd=14 gotype=long arch=darwin-bigsur-x86_64
[+]  ubgmhjo          ^boost@1.76.0%apple-clang@13.0.0+atomic+chrono~clanglibcpp~container~context~coroutine+date_time~debug+exception~fiber+filesystem+graph~icu+iostreams+locale+log+math~mpi+multithreaded~numpy~pic+program_options~python+random+regex+serialization+shared+signals~singlethreaded+system~taggedlayout+test+thread+timer~versionedlayout+wave cxxstd=14 visibility=hidden arch=darwin-bigsur-x86_64
[+]  6xkx2ww          ^cgns@4.2.0%apple-clang@13.0.0~base_scope~fortran+hdf5~int64~ipo~legacy~mem_debug+mpi+scoping+shared~static~testing build_type=Release arch=darwin-bigsur-x86_64
[+]  6vidxvd          ^matio@1.5.17%apple-clang@13.0.0+hdf5+shared+zlib arch=darwin-bigsur-x86_64
[+]  476kcsv          ^metis@5.1.0%apple-clang@13.0.0~gdb~int64~real64+shared build_type=Release patches=4991da938c1d3a1d3dea78e49bbebecba00273f98df2a656e38b83d55b281da1 arch=darwin-bigsur-x86_64
[+]  hnrhwka          ^netlib-lapack@3.9.1%apple-clang@13.0.0~external-blas~ipo+lapacke+shared~xblas build_type=Release arch=darwin-bigsur-x86_64
[+]  en3mcnb          ^parmetis@4.0.3%apple-clang@13.0.0~gdb~int64~ipo+shared build_type=Release patches=4f892531eb0a807eb1b82e683a416d3e35154a455274cf9b162fb02054d11a5b,50ed2081bc939269689789942067c58b3e522c269269a430d5d34c00edbc5870,704b84f7c7444d4372cb59cca6e1209df4ef3b033bc4ee3cf50f369bce972a9d arch=darwin-bigsur-x86_64
-   s5zgjix      ^yaml-cpp@0.6.3%apple-clang@13.0.0~ipo+pic+shared~tests build_type=Release arch=darwin-bigsur-x86_64

Here is the output from the package blame:

# spack config blame packages
---                                                                                    packages:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:2      amr-wind:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:3        externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:4        - spec: amr-wind@main%apple-clang@13.0.0~asan~cuda+hypre+internal-amrex~ipo~masa+mpi+netcdf~openfast~openmp~rocm+shared+tests+unit
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:4            build_type=Release arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:6          prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:7        buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:8      hypre:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:9        externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:10       - spec: hypre@develop%apple-clang@13.0.0~complex~cuda~debug+fortran~int64~internal-superlu~mixedint+mpi~openmp+shared~superlu-dist~unified-memory
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:10           arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:12         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:13       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:5          variants: +shared
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:6          version: [develop]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:14     mpich:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:15       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:16       - spec: mpich@3.4.2%apple-clang@13.0.0~argobots+fortran+hwloc+hydra+libxml2~pci+romio~slurm~two_level_namespace~verbs+wrapperrpath
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:16           device=ch4 netmod=ofi pmi=pmi arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:18         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:19       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:20     hwloc:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:21       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:22       - spec: hwloc@2.6.0%apple-clang@13.0.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml~opencl~pci~rocm+shared
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:22           arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:24         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:25       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:26     libxml2:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:27       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:28       - spec: libxml2@2.9.12%apple-clang@13.0.0~python arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:29         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:30       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:31     libiconv:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:32       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:33       - spec: libiconv@1.16%apple-clang@13.0.0 libs=shared,static arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:34         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:35       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:36     xz:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:37       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:38       - spec: xz@5.2.5%apple-clang@13.0.0~pic libs=shared,static arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:39         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:40       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:41     zlib:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:42       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:43       - spec: zlib@1.2.11%apple-clang@13.0.0+optimize+pic+shared arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:44         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:45       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:46     ncurses:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:47       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:48       - spec: ncurses@6.2%apple-clang@13.0.0~symlinks+termlib abi=none arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:49         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:50       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:51     libfabric:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:52       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:53       - spec: libfabric@1.14.0%apple-clang@13.0.0~debug~kdreg fabrics=sockets,tcp,udp
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:53           arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:55         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:56       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:57     netlib-lapack:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:58       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:59       - spec: netlib-lapack@3.9.1%apple-clang@13.0.0~external-blas~ipo+lapacke+shared~xblas
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:59           build_type=Release arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:61         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:62       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:63     netcdf-c:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:64       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:65       - spec: netcdf-c@4.7.4%apple-clang@13.0.0~dap~fsync~hdf4~jna+mpi+parallel-netcdf+pic+shared
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:65           patches=2c88dfbd6d339a0336a43b14a65a1d1df995b853b645e4af612617612a642a53 arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:67         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:68       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:22         version: [4.7.4]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:23         variants: +parallel-netcdf maxdims=65536 maxvars=524288
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:69     hdf5:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:70       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:71       - spec: hdf5@1.10.7%apple-clang@13.0.0+cxx~fortran+hl~ipo~java+mpi+shared~szip~threadsafe+tools
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:71           api=default build_type=RelWithDebInfo arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:73         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:74       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:19         version: [1.10.7]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:20         variants: +cxx+hl
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:75     pkgconf:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:76       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:77       - spec: pkgconf@1.8.0%apple-clang@13.0.0 arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:78         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:79       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:80     parallel-netcdf:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:81       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:82       - spec: parallel-netcdf@1.12.2%apple-clang@13.0.0~burstbuffer+cxx+fortran+pic+shared
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:82           arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:84         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:85       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:28         version: [1.12.2]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:86     nccmp:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:87       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:88       - spec: nccmp@1.9.0.1%apple-clang@13.0.0~ipo build_type=Release arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:89         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:90       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:91     tioga:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:92       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:93       - spec: tioga@develop%apple-clang@13.0.0~cuda~ipo~nodegid+pic+shared~stats~timers
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:93           build_type=Release cxxstd=11 arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:95         prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:96       buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:30         version: [develop]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:97     trilinos:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:98       externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:99       - spec: trilinos@develop%apple-clang@13.0.0~adios2~amesos+amesos2~anasazi~aztec~basker+belos+boost~chaco~complex~cuda~cuda_rdc~debug~dtk~epetra~epetraext~epetraextbtf~epetraextexperimental~epetraextgraphreorderings+exodus+explicit_template_instantiation~float+fortran+gtest+hdf5~hypre~ifpack+ifpack2~intrepid~intrepid2~ipo~isorropia+kokkos~mesquite~minitensor~ml+mpi+muelu~mumps~nox~openmp~phalanx~piro~python~rol~rythmos~sacado~scorec+shards~shared~shylu+stk~stk_unit_tests~stokhos~stratimikos~strumpack~suite-sparse~superlu~superlu-dist~teko~tempus+tpetra~trilinoscouplings~wrapper~x11+zoltan+zoltan2
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:99           build_type=Release cxxstd=14 gotype=long arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:101        prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:102      buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:34         version: [develop]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:35         variants: ~adios2~alloptpkgs~amesos+amesos2~anasazi~aztec+belos+boost~chaco~complex~debug~dtk~epetra~epetraext+exodus+explicit_template_instantiation~float+fortran~fortrilinos+glm+gtest+hdf5~hypre~ifpack+ifpack2~intrepid~intrepid2~isorropia+kokkos~mesquite+metis~minitensor~ml+mpi+muelu~mumps~nox~openmp~phalanx~piro~python~rol~rythmos~sacado+shards~shylu+stk~stratimikos~suite-sparse~superlu~superlu-dist~teko~tempus+teuchos+tpetra~x11~xsdkflags+zlib+zoltan+zoltan2
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:35           gotype=long cxxstd=14 build_type=Release
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:103    boost:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:104      externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:105      - spec: boost@1.76.0%apple-clang@13.0.0+atomic+chrono~clanglibcpp~container~context~coroutine+date_time~debug+exception~fiber+filesystem+graph~icu+iostreams+locale+log+math~mpi+multithreaded~numpy~pic+program_options~python+random+regex+serialization+shared+signals~singlethreaded+system~taggedlayout+test+thread+timer~versionedlayout+wave
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:105          cxxstd=14 visibility=hidden arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:107        prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:108      buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:16         version: [1.76.0]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:17         variants: cxxstd=14
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:109    bzip2:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:110      externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:111      - spec: bzip2@1.0.8%apple-clang@13.0.0~debug~pic+shared arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:112        prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:113      buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:114    cgns:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:115      externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:116      - spec: cgns@4.2.0%apple-clang@13.0.0~base_scope~fortran+hdf5~int64~ipo~legacy~mem_debug+mpi+scoping+shared~static~testing
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:116          build_type=Release arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:118        prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:119      buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:120    matio:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:121      externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:122      - spec: matio@1.5.17%apple-clang@13.0.0+hdf5+shared+zlib arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:123        prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:124      buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:125    metis:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:126      externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:127      - spec: metis@5.1.0%apple-clang@13.0.0~gdb~int64~real64+shared build_type=Release
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:127          patches=4991da938c1d3a1d3dea78e49bbebecba00273f98df2a656e38b83d55b281da1 arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:129        prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:130      buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:131    parmetis:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:132      externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:133      - spec: parmetis@4.0.3%apple-clang@13.0.0~gdb~int64~ipo+shared build_type=Release
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:133          patches=4f892531eb0a807eb1b82e683a416d3e35154a455274cf9b162fb02054d11a5b,50ed2081bc939269689789942067c58b3e522c269269a430d5d34c00edbc5870,704b84f7c7444d4372cb59cca6e1209df4ef3b033bc4ee3cf50f369bce972a9d
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:133          arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:136        prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:137      buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:138    yaml-cpp:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:139      externals:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:140      - spec: yaml-cpp@0.6.3%apple-clang@13.0.0~ipo+pic+shared~tests build_type=Release
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:140          arch=darwin-bigsur-x86_64
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:142        prefix: /Users/psakiev/soft/spack-manager/views/exawind/snapshots/skylake/20220101/cpu/.
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/externals.yaml:143      buildable: False
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:32         version: [0.6.3]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:7        all:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:8          target: [x86_64]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:18                compiler: [apple-clang, gcc, clang, intel, pgi, xl, nag, fj, aocc]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:10         providers:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:11           mpi: [mpich, openmpi]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:21                  blas: [netlib-lapack, openblas, amdblis]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:36                  lapack: [netlib-lapack, openblas, amdlibflame]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:24                  elf: [libelf, elfutils]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:27                  fuse: [macfuse, libfuse]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:54                  unwind: [apple-libunwind, libunwind]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:55                  uuid: [apple-libuuid, util-linux-uuid, libuuid]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:20                  awk: [gawk]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:22                  D: [ldc]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:23                  daal: [intel-daal]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:25                  fftw-api: [fftw, amdfftw]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:26                  flame: [libflame, amdlibflame]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:28                  gl: [mesa+opengl, mesa18, opengl]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:29                  glu: [mesa-glu, openglu]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:30                  glx: [mesa+glx, mesa18+glx, opengl]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:31                  golang: [gcc]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:32                  iconv: [libiconv]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:33                  ipp: [intel-ipp]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:34                  java: [openjdk, jdk, ibm-java]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:35                  jpeg: [libjpeg-turbo, libjpeg]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:37                  lua-lang: [lua, lua-luajit]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:38                  mariadb-client: [mariadb-c-client, mariadb]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:39                  mkl: [intel-mkl]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:40                  mpe: [mpe2]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:42                  mysql-client: [mysql, mariadb-c-client]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:43                  opencl: [pocl]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:44                  onedal: [intel-oneapi-dal]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:45                  osmesa: [mesa+osmesa, mesa18+osmesa]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:46                  pbs: [openpbs, torque]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:47                  pil: [py-pillow]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:48                  pkgconfig: [pkgconf, pkg-config]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:49                  rpc: [libtirpc]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:50                  scalapack: [netlib-scalapack, amdscalapack]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:51                  sycl: [hipsycl]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:52                  szip: [libaec, libszip]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:53                  tbb: [intel-tbb]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:56                  xxd: [xxd-standalone, vim]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:57                  yacc: [bison, byacc]
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:58                  ziglang: [zig]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:14         variants: build_type=Release +mpi
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:59                permissions:
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:60                  read: world
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/packages.yaml:61                  write: user
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:24       openfast:
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:25         version: [2.6.0]
/Users/psakiev/soft/spack-manager/environments/build_from_snapshot/include.yaml:26         variants: +cxx
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:28       apple-libunwind:
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:29         buildable: False
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:30         externals:
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:30         
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:30         # Apple bundles libunwind version 35.3 with macOS 10.9 and later,
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:30         # although the version number used here isn't critical
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:33         - spec: apple-libunwind@35.3
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:34           prefix: /usr
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:35       apple-libuuid:
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:36         buildable: False
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:37         externals:
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:37         
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:37         # Apple bundles libuuid in libsystem_c version 1353.100.2,
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:37         # although the version number used here isn't critical
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:40         - spec: apple-libuuid@1353.100.2
/Users/psakiev/soft/spack-manager/spack/etc/spack/defaults/darwin/packages.yaml:41           prefix: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.

Information on your system

spack debug report
* **Spack:** 0.17.1-681-fc9bfe5317
* **Python:** 3.9.7
* **Platform:** darwin-bigsur-skylake
* **Concretizer:** clingo

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output
@psakievich psakievich added bug triage The issue needs to be prioritized labels Jan 2, 2022
@alalazo alalazo added this to To do in Spack v0.18.0 release via automation Jan 3, 2022
@psakievich psakievich changed the title Clingo fails unless re-use flag applied, original concretizer succeeds Clingo fails unless re-use flag applied, but is still wrong; original concretizer succeeds Jan 3, 2022
@alalazo alalazo self-assigned this Jan 5, 2022
@psakievich
Copy link
Contributor Author

spack.lock.txt
externals.yaml.txt
include.yaml.txt
spack.yaml.txt

Uploading corrected config files.

@psakievich
Copy link
Contributor Author

@scheibelp

@alalazo alalazo added this to To do in Spack reuse specs by default via automation Mar 16, 2022
@alalazo
Copy link
Member

alalazo commented Apr 26, 2022

I'm finally getting to this, apologies for the delay.

Also it looks like clingo is just getting this wrong even with the --reuse flag. When I use the original concretizer all of the dependencies of externals are dropped off the DAG as they should be [ ... ]

I think this is not a bug, but the expected behavior. If you ask for reuse, Spack will try to reuse whatever you installed if it fits the requirements. If there are installed specs built by Spack with their dependencies that can be reused, those are preferred to the externals declared in packages.yaml. For instance, you had mpich already installed and that gets reused instead of relying on the external.

I'm also marking this as unreproducible, since I can't obtain the same results as you report above. I think there's at least a custom repository that is missing and might enter into concretization.:

repos:
- $spack/../repos/exawind

What I currently get are errors like:

$ spack -e . concretize
==> Starting concretization
==> Error: variant "asan" not found in package "amr-wind"

which point to an external that is constrained with variants that don't exist in the builtin repository.

@alalazo
Copy link
Member

alalazo commented Apr 26, 2022

Let me know if you still have a reliable reproducer for this and I'll get back to the issue asap.

@alalazo alalazo added unreproducible and removed triage The issue needs to be prioritized labels Apr 26, 2022
@alalazo
Copy link
Member

alalazo commented Apr 26, 2022

For the record, @psakievich provided a reproducer:

$ docker pull ecpe4s/exawind-snapshot:2022-04-25
$ docker run -it --rm ecpe4s/exawind-snapshot:2022-04-25
root@867c1a118880 > quick-develop -n demo -s nalu-wind@master

Currently trying to trim the issue down to its root cause.

@alalazo
Copy link
Member

alalazo commented Apr 26, 2022

The issue is triggered by having the external specs not buildable and overconstrained with the patches= variant. By applying this diff to externals.yaml:

10c10
<     - spec: berkeley-db@18.1.40%gcc@9.4.0+cxx~docs+stl patches=b231fcc arch=linux-ubuntu20.04-x86_64
---
>     - spec: berkeley-db@18.1.40%gcc@9.4.0+cxx~docs+stl arch=linux-ubuntu20.04-x86_64
16c16
<         cxxstd=14 patches=a440f96 visibility=hidden arch=linux-ubuntu20.04-x86_64
---
>         cxxstd=14 visibility=hidden arch=linux-ubuntu20.04-x86_64
48c48
<     - spec: findutils@4.8.0%gcc@9.4.0 patches=440b954 arch=linux-ubuntu20.04-x86_64
---
>     - spec: findutils@4.8.0%gcc@9.4.0  arch=linux-ubuntu20.04-x86_64
59c59
<         api=default build_type=RelWithDebInfo patches=2a1e311 arch=linux-ubuntu20.04-x86_64
---
>         api=default build_type=RelWithDebInfo  arch=linux-ubuntu20.04-x86_64
106c106
<     - spec: m4@1.4.19%gcc@9.4.0+sigsegv patches=9dc5fbd,bfdffa7 arch=linux-ubuntu20.04-x86_64
---
>     - spec: m4@1.4.19%gcc@9.4.0+sigsegv  arch=linux-ubuntu20.04-x86_64
116c116
<     - spec: metis@5.1.0%gcc@9.4.0~gdb~int64~real64+shared build_type=Release patches=4991da9,b1225da
---
>     - spec: metis@5.1.0%gcc@9.4.0~gdb~int64~real64+shared build_type=Release 
139c139
<         patches=2c88dfb arch=linux-ubuntu20.04-x86_64
---
>          arch=linux-ubuntu20.04-x86_64
166c166
<     - spec: parmetis@4.0.3%gcc@9.4.0~gdb~int64~ipo+shared build_type=Release patches=4f89253,50ed208,704b84f
---
>     - spec: parmetis@4.0.3%gcc@9.4.0~gdb~int64~ipo+shared build_type=Release 
188c188
<         cxxstd=11 patches=9880387 arch=linux-ubuntu20.04-x86_64
---
>         cxxstd=11  arch=linux-ubuntu20.04-x86_64
214c214
<     - spec: zlib@1.2.12%gcc@9.4.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu20.04-x86_64
---
>     - spec: zlib@1.2.12%gcc@9.4.0+optimize+pic+shared  arch=linux-ubuntu20.04-x86_64

I can concretize correctly. Screenshot attached.
Screenshot from 2022-04-26 15-48-15

@alalazo
Copy link
Member

alalazo commented Apr 26, 2022

This issue is unrelated to --reuse, which seems to be working correctly. A smaller reproducer is:

spack:
  specs:
  - hdf5~mpi
  packages:
    zlib:
      externals:
      - spec: zlib@1.2.12 patches=abcde
        prefix: /usr
      buildable: false

Trying to concretize the environment above gives the same unsat result as shown here.

@psakievich
Copy link
Contributor Author

@alalazo thank you for this. I'm curious for a suggestion on how to fix this for our project which is using the spack api to generate our external specs. The source code is here: https://github.com/psakievich/spack-manager/blob/189807ef1a4ca8b545892a74ba7e979cd95adc1f/spack-scripting/scripting/cmd/manager_cmds/external.py#L95

Should we just manually prune out patches from the spec like we do with the dev_path or is there a more proper way to do this in the api?

@psakievich
Copy link
Contributor Author

It seems like this is more our fault than spack's. But it would be a nice feature to be able to generate a spec that is not over constrained but still has the variants.

@alalazo
Copy link
Member

alalazo commented Apr 26, 2022

Part of the problem is that the patches variant is special and is not meant to be added to externals. It's added after the solve, based on the other properties of the spec. The solver thus finds no way to add the right patches=abcd and it fails since it can't build the spec.

I would say that the proper way to do this would be to expose the DB with the specs and add the --reuse option. Or does that trigger other issues?

@alalazo alalazo changed the title Clingo fails unless re-use flag applied, but is still wrong; original concretizer succeeds Clingo fails to use externals with patches=abcde variant Apr 26, 2022
@alalazo alalazo changed the title Clingo fails to use externals with patches=abcde variant Clingo fails to use externals with patches=abcde variants Apr 26, 2022
@psakievich
Copy link
Contributor Author

So this is how we are generating the external specs

def _spec_string_minus_dev_path(spec):
    full_spec = spec.format(
        '{name}{@version}{%compiler}{variants}{arch=architecture}')
    spec_components = full_spec.split(' ')
    pruned_componets = [x for x in spec_components if 'dev_path=' not in x]
    pruned_spec = ' '.join(pruned_componets)
    return pruned_spec

but we are probably doing something that is not quite kosher because we communicate across spack instances. The features allows a user to point to another environment (often from another spack instance with a different database) and pull all the specs in that environment into an externals.yaml file. We are just using the environment's views to populate the paths, and the information from loading the environment to populate the specs. I'm assuming this is coming from the lock file and not the database.

@psakievich
Copy link
Contributor Author

psakievich commented Apr 26, 2022

This seems like it is likely an issue with us pushing spack into a new territory. We just want to take complete control over the packages we are building with for developer environments and not rely on what the concretizer may choose for us. It might be worth following up more on slack or in one of the weekly meetups. I think I know everything I need to know to be able to close this issue from my end. This could also be fixed in Spack proper, but I think it warrants more discussion to decide how, and if it is worth it to pursue.

@alalazo
Copy link
Member

alalazo commented Apr 26, 2022

In a few days we'll merge #28504 and then make reuse the default. I think your use case should then work when you e.g. use the other installation tree as an upstream. Let's keep this one open a bit more and verify it works when we get there.

@alalazo
Copy link
Member

alalazo commented May 3, 2023

@psakievich Was this issue solved in the end?

@psakievich
Copy link
Contributor Author

@alalazo we solved it our end with some string manipulation. It's not clear to me that spack needs a solution for this. I'll go ahead and close it.

@alalazo alalazo removed this from the v0.20.0 milestone May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants