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

Chaining existing spack-stack installation is not working as expected on Derecho #1503

Open
uturuncoglu opened this issue Feb 10, 2025 · 7 comments

Comments

@uturuncoglu
Copy link
Contributor

uturuncoglu commented Feb 10, 2025

I am trying to use chaining on Hercules to extend the existing installation for UFS Coastal. So, I did following,

git clone --recursive https://github.com/JCSDA/spack-stack.git
cd spack-stack
# edit packages slightly in configs/common/ and configs/sites/tier1/derecho/ to match with the exiting space-stack installation
. setup.sh
spack stack create env --name cop --template empty --site derecho --compiler intel --upstream /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/unified-env/install
cd envs/cop
spack env activate .
spack add conduit@develop+python+adios ^[email protected] ^[email protected] ^[email protected]
spack add esmf@=8.8.0
spack concretize --force --deprecated

After that, I check the modules with the spack find -c and it looks like following,

==> In environment /glade/work/turuncu/COP/spack-stack/envs/cop
==> 2 root specs
 -  conduit@develop +adios+python   -  [email protected]

-- linux-sles15-zen3 / [email protected] --------------------------
 -   [email protected]          -   conduit@develop     -   [email protected]              -   [email protected]        -   [email protected]              -   [email protected]        -   [email protected]   -   [email protected]
[e]  [email protected]        [e]  [email protected]  [e]  [email protected]                  -   [email protected]       -   [email protected]           -   [email protected]        -   [email protected]    -   [email protected]
[e]  [email protected]      [e]  [email protected]         [e]  [email protected]                 -   [email protected]   -   [email protected]     -   [email protected]        -   [email protected]    -   [email protected]
 -   [email protected]  [e]  [email protected]       -   [email protected]                 -   [email protected]       -   [email protected]   -   [email protected]        -   [email protected]   -   [email protected]
 -   [email protected]             -   [email protected]          -   [email protected]                -   [email protected]      -   [email protected]        -   [email protected]          -   [email protected]   -   [email protected]
 -   [email protected]           -   [email protected]         -   [email protected]                -   [email protected]      -   [email protected]           -   [email protected]          -   [email protected]      -   [email protected]
 -   [email protected]       [e]  [email protected]     -   [email protected]   -   [email protected]       -   [email protected]              -   [email protected]        -   [email protected]      -   [email protected]
 -   [email protected]        -   [email protected]           -   [email protected]   -   [email protected]         [e]  [email protected]        -   [email protected]   -   [email protected]
 -   [email protected]          -   [email protected]           -   [email protected]        [e]  [email protected]           -   [email protected]        -   [email protected]   -   [email protected]
 -   [email protected]          -   [email protected]      -   [email protected]         -   [email protected]         -   [email protected]        -   [email protected]       [e]  [email protected]
==> 8 installed packages
==> 69 concretized packages to be installed

There are couple of issues with the output,

  • Some modules are listed twice such as [email protected]. I also checked with the spack find -c -f -vto see those have different compiler, variances but they look identical. So, I am not sure why spack is trying to install same package twice (maybe one of each new package - esmf vs. conduit). I also tried by passing--fresh-roots --reuse-depsto thespack concretize` but it did not helped.

  • The local installation does not seem to see the upstream packages and modules. The spack find -c command shows that they will be still installed. I also tried to add following to the upstream section of my local spack.yaml but again it is still same.

  upstreams:
    spack-stack-1.6.0-unified-env:
      install_tree: /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/unified-env/install
      modules:
        lmod: /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/unified-env/install/modulefiles

At this point, I just wonder if anyone tried to chain exiting spack-stack installation before. Any suggestion would be helpful at this point.

@climbfuji
Copy link
Collaborator

If you have duplicates for basic packages (one from the original environment, one from your chained env), then that's an indication that everything that depends on these will be rebuilt if uses these. Look at the diffs between the duplicates, e.g. spack diff /hash1 /hash2.

@uturuncoglu
Copy link
Contributor Author

@climbfuji Thanks for the tip. I am not seeing any particular difference between two hashes (except new_strategies variant for zlib-ng).

$ spack diff /x2dna55 /m5suhmz
==> Warning: This interface is subject to change.

--- [email protected]/x2dna55nczunusjqxjeveuqw7a4tikht
+++ [email protected]/m5suhmz4xokkqnw56arlpnthacftytxz
@@ hash @@
-  cmake doogtyd4au3iurzj4hmzyztn7rtzxrqz
+  cmake pl3j7xwea5ti5boxm3ytbbylhlvvcp4i
-  hwloc 42tu5qejscecjfxjq6sjy2rolqfkfaqe
+  hwloc rntkrzx4body4ahjvutolfifkxy2zja6
-  intel-oneapi-mkl x2dna55nczunusjqxjeveuqw7a4tikht
+  intel-oneapi-mkl m5suhmz4xokkqnw56arlpnthacftytxz
-  intel-tbb zr5oehbydozrll3k6qpikeelg2zd4mhk
+  intel-tbb b7wy6brovlmqzmjtejj7lppojmaq4kwn
-  libxml2 jbzklgflc7cp6jv67ldbcgexlo2v46kh
+  libxml2 f5tstilfsyxuwboxqh7kmfu427o2m73c
-  zlib-ng hf24kknkomts76iqfomafoxe6axgt7kr
+  zlib-ng g5szkxqbp6mlqpij6sgozhuh65d6vkqr
@@ variant_value @@
-  zlib-ng new_strategies True
+  zlib-ng new_strategies False

@uturuncoglu
Copy link
Contributor Author

Maybe if I fix the variant issue I would have only one copy of intel-oneapi-mkl. Let me try.

@uturuncoglu
Copy link
Contributor Author

@climbfuji Okay. After adding following to conduit package ^[email protected] ^zlib-ng+compat~new_strategies+opt+pic+shared. I could able to get single version of packages. I am not sure why spack not trying to use same variants for different packages but that is fine at this point. The only issue left at this point accessing to the modules provided by the upstream but I could still go ahead and install packages locally even if they are available in the upstream.

@climbfuji
Copy link
Collaborator

The concretizer should mark packages available in upstream (i.e. identical hash) as [^]. If it doesn't, then the hash is different and it can't reuse them.

@uturuncoglu
Copy link
Contributor Author

@climbfuji Is there any way to compare the package in the upstream with the local one like we did with spack diff. Then , I could find the underlying difference and trying to fix those too.

@climbfuji
Copy link
Collaborator

The hash must be different, thus spack diff /hash1 /hash2 should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants