ACCESS-NRI / ACCESS-OM3

ACCESS-OM3 repository for spack configuration information
Apache License 2.0
0 stars 0 forks source link

Cannot concretize with an existing environment install #10

Closed anton-seaice closed 1 month ago

anton-seaice commented 1 month ago

When I create a new environment from https://github.com/ACCESS-NRI/ACCESS-OM3/tree/4ee6f99ef02163ef233cb8f0db13c6b1cb3ff4e8, it fails to concretise with this error:

==> [2024-09-16-12:56:37.760098] the C compiler None does not exist, or does not run correctly. The compiler intel@=2021.11.1 will not be used during concretization.
==> [2024-09-16-12:56:55.775201] UnsatisfiableSpecError: concretization failed for the following reasons:

   1. cannot satisfy a requirement for package 'access-om3-nuopc'.

This is the currently installed pacakges:

$spack find
-- linux-rocky8-x86_64 / intel@2021.6.0 -------------------------
access-om3-nuopc@git.0.3.0=0.3.0  c-blosc@1.21.5  diffutils@3.10  fms@2023.02       glibc@2.28   hdf5@1.14.3   libiconv@1.17    lz4@1.9.4  netcdf-c@4.9.2        openmpi@4.1.5     pkgconf@2.2.0  zlib-ng@2.1.6
bzip2@1.0.8                       cmake@3.24.2    esmf@8.5.0      fortranxml@4.1.2  gmake@4.4.1  libaec@1.0.6  libsigsegv@2.14  m4@1.4.19  netcdf-fortran@4.6.1  parallelio@2.6.2  snappy@1.1.10  zstd@1.5.6

-- linux-rocky8-x86_64 / intel@2021.10.0 ------------------------
access-om3@git.2024.04.0=2024.04.0      bzip2@1.0.8     cmake@3.24.2    esmf@8.5.0   glibc@2.28   hdf5@develop-1.14  libiconv@1.17    lz4@1.9.4  netcdf-c@4.9.2        parallelio@2.6.2  snappy@1.1.10  zstd@1.5.6
access-om3-nuopc@git.main=0.3.0-git.11  c-blosc@1.21.5  diffutils@3.10  fms@2023.02  gmake@4.4.1  libaec@1.0.6       libsigsegv@2.14  m4@1.4.19  netcdf-fortran@4.6.1  pkgconf@2.2.0     zlib-ng@2.1.6
==> 47 installed packages

I believe the expected result is we can have two versions of access-om3-nuopc installed

anton-seaice commented 1 month ago

The workaround is do a spack uninstall access-om-nuopc before concretising. Its not a very feasible solution long-term. You can only have one environment per spack instance if you have can only have one install of a binary.

harshula commented 1 month ago

It looks like Spack environments, by default, restrict the same package being installed even if it is a different version. Using --fresh appears to be a workaround.

1) spack.yaml: @git.0.3.0 (Works) 2) spack.yaml: @git.0.2.0 (Fails) 3) spack.yaml: @main (Fails) 4) spack.yaml: @git.0.3.0 (Works) 5) CLI: spack install access-om3-nuopc@git.0.2.0 %intel@2021.10.0 target=x86_64 (Works) 6) CLI: spack install access-om3-nuopc@main %intel@2021.10.0 target=x86_64 (Works) 7) spack.yaml: @main with --fresh (Works)

[root@d513c5c7de56 ACCESS-OM3]# git diff
diff --git a/spack.yaml b/spack.yaml
index 635ffa3..4f8d340 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -10,6 +10,9 @@ spack:
     access-om3-nuopc:
       require:
         - '@git.0.3.0'
+        # - '@git.96f91599f746b4866bbd3f05ee6eb192ba70d391'
+        # - '@git.main'
+        # - '@main'

     # Other Dependencies
     esmf:
[root@d513c5c7de56 ACCESS-OM3]# spack env create access-om3-hash spack.yaml 
==> Created environment access-om3-hash in: /opt/environments/access-om3-hash
==> Activate with: spack env activate access-om3-hash
[root@d513c5c7de56 ACCESS-OM3]# spack env activate access-om3-hash
[root@d513c5c7de56 ACCESS-OM3]# spack concretize -f
==> Concretized access-om3@git.2024.04.0=2024.04.0
[+]  3wmuolq  access-om3@git.2024.04.0=2024.04.0%intel@2021.10.0 build_system=bundle arch=linux-rocky8-x86_64
[+]  yfwltud      ^access-om3-nuopc@git.0.3.0=0.3.0%intel@2021.10.0~install_libraries~ipo~mom_symmetric~openmp build_system=cmake build_type=Release cice_io=PIO configurations=CICE6-WW3,MOM6-CICE6,MOM6-CICE6-WW3 generator=make arch=linux-rocky8-x86_64
[+]  m6clc3w          ^cmake@3.24.4%intel@2021.10.0~doc+ncurses+ownlibs build_system=generic build_type=RelWithDebInfo arch=linux-rocky8-x86_64
[+]  ixjkeea              ^curl@8.7.1%intel@2021.10.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-rocky8-x86_64
[+]  x6z35ea                  ^nghttp2@1.57.0%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  y7n7vkn                      ^diffutils@3.10%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  eg3yw5o                  ^openssl@3.3.0%intel@2021.10.0~docs+shared build_system=generic certs=mozilla arch=linux-rocky8-x86_64
[+]  e4abmsj                      ^ca-certificates-mozilla@2023-05-30%intel@2021.10.0 build_system=generic arch=linux-rocky8-x86_64
[+]  qxjalh4              ^ncurses@6.5%intel@2021.10.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=linux-rocky8-x86_64
[+]  wa2x7rh              ^zlib-ng@2.1.6%intel@2021.10.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  r4qrxpa          ^esmf@8.5.0%intel@2021.10.0 cflags='-fp-model precise' fflags='-fp-model precise' ~debug~external-lapack+external-parallelio+mpi+netcdf~pnetcdf+shared~xerces build_system=makefile esmf_comm=auto esmf_os=auto esmf_pio=auto patches=f63d405 snapshot=none arch=linux-rocky8-x86_64
[+]  aom2yuj              ^netcdf-c@4.9.2%intel@2021.10.0+blosc~byterange~dap~fsync~hdf4~ipo~jna+mpi~nczarr_zip+optimize~parallel-netcdf+pic+shared+szip+zstd build_system=cmake build_type=RelWithDebInfo generator=make patches=0161eb8 arch=linux-rocky8-x86_64
[+]  357vng5                  ^bzip2@1.0.8%intel@2021.10.0~debug~pic+shared build_system=generic arch=linux-rocky8-x86_64
[+]  nu6k2ib                  ^c-blosc@1.21.5%intel@2021.10.0+avx2~ipo build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[+]  7a5olrr                      ^lz4@1.9.4%intel@2021.10.0+pic build_system=makefile libs=shared,static arch=linux-rocky8-x86_64
[+]  odz62m6                      ^snappy@1.1.10%intel@2021.10.0~ipo+pic+shared build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[+]  4cvtvhf                  ^hdf5@1.14.3%intel@2021.10.0~cxx~fortran+hl~ipo~java~map+mpi+shared~subfiling~szip~threadsafe+tools api=default build_system=cmake build_type=RelWithDebInfo generator=make patches=82088c8 arch=linux-rocky8-x86_64
[+]  zmhrfg5                  ^libaec@1.0.6%intel@2021.10.0~ipo+shared build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[+]  rglvnt5                  ^m4@1.4.19%intel@2021.10.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-rocky8-x86_64
[+]  ou7jkjx                      ^libsigsegv@2.14%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  lqgxpfx                  ^zstd@1.5.6%intel@2021.10.0+programs build_system=makefile compression=none libs=shared,static arch=linux-rocky8-x86_64
[+]  4dbjczt          ^fms@2023.02%intel@2021.10.0~deprecated_io~gfs_phys+internal_file_nml~ipo+large_file~openmp~pic~quad_precision~yaml build_system=cmake build_type=RelWithDebInfo constants=GFDL generator=make precision=32,64 arch=linux-rocky8-x86_64
[+]  bcbruwv          ^fortranxml@4.1.2%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  doeoclg          ^gmake@4.4.1%intel@2021.10.0~guile build_system=generic arch=linux-rocky8-x86_64
[+]  vqsb6jy          ^netcdf-fortran@4.6.1%intel@2021.10.0~doc+pic+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  vjk5ujc          ^openmpi@4.1.5%intel@2021.10.0~atomics~cuda~cxx~cxx_exceptions~gpfs~internal-hwloc~internal-libevent~internal-pmix~java~legacylaunchers~lustre~memchecker~openshmem~orterunprefix~romio+rsh~singularity~static+vt+wrapper-rpath build_system=autotools fabrics=none romio-filesystem=none schedulers=none arch=linux-rocky8-x86_64
[+]  ttmbevu              ^hwloc@2.9.1%intel@2021.10.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-rocky8-x86_64
[+]  toioath                  ^libpciaccess@0.17%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  rzovald                      ^util-macros@1.19.3%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  27uhbc2                  ^libxml2@2.10.3%intel@2021.10.0+pic~python+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  55ipnye                      ^libiconv@1.17%intel@2021.10.0 build_system=autotools libs=shared,static arch=linux-rocky8-x86_64
[+]  fwcrp5u                      ^xz@5.4.6%intel@2021.10.0~pic build_system=autotools libs=shared,static arch=linux-rocky8-x86_64
[+]  kevlg4e              ^libevent@2.1.12%intel@2021.10.0+openssl build_system=autotools arch=linux-rocky8-x86_64
[+]  t3rlsc7              ^numactl@2.0.14%intel@2021.10.0 build_system=autotools patches=4e1d78c,62fc8a8,ff37630 arch=linux-rocky8-x86_64
[+]  k2zb4k4                  ^autoconf@2.72%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  vj2jeim                  ^automake@1.16.5%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  fr2gbqc                  ^libtool@2.4.6%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  h3b27zq                      ^findutils@4.9.0%intel@2021.10.0 build_system=autotools patches=440b954 arch=linux-rocky8-x86_64
[+]  hnpfkhs              ^openssh@9.7p1%intel@2021.10.0+gssapi build_system=autotools arch=linux-rocky8-x86_64
[+]  v6vhpoc                  ^krb5@1.20.1%intel@2021.10.0+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  u5z5toh                      ^bison@3.8.2%intel@2021.10.0~color build_system=autotools arch=linux-rocky8-x86_64
[+]  wa26ziu                      ^gettext@0.22.5%intel@2021.10.0+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-rocky8-x86_64
[+]  i4om3aq                          ^tar@1.34%intel@2021.10.0 build_system=autotools zip=pigz arch=linux-rocky8-x86_64
[+]  r66n7xr                              ^pigz@2.8%intel@2021.10.0 build_system=makefile arch=linux-rocky8-x86_64
[+]  dqfpfpz                  ^libedit@3.1-20230828%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  a2hfddn                  ^libxcrypt@4.4.35%intel@2021.10.0~obsolete_api build_system=autotools patches=4885da3 arch=linux-rocky8-x86_64
[e]  an3rtsv              ^perl@5.26.3%intel@2021.10.0+cpanm+opcode+open+shared+threads build_system=generic patches=8cf4302 arch=linux-rocky8-x86_64
[+]  vrupasu              ^pkgconf@2.2.0%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  dw3g7la              ^pmix@4.2.2%intel@2021.10.0~docs+pmi_backwards_compatibility~python~restful build_system=autotools arch=linux-rocky8-x86_64
[+]  m2zhcv4          ^parallelio@2.6.2%intel@2021.10.0 cflags='-qno-opt-dynamic-align -fp-model precise -std=gnu99' fflags='-traceback -fp-model source -assume realloc_lhs -ftz -assume byterecl -convert big_endian -qno-opt-dynamic-align' +fortran~ipo~logging+mpi~ncint~pnetcdf+shared~timing build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[e]  5elnsoi      ^glibc@2.28%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64

==> Updating view at /opt/environments/access-om3-hash/.spack-env/view
[root@d513c5c7de56 ACCESS-OM3]# spack env deactivate 
[root@d513c5c7de56 ACCESS-OM3]# spack env rm access-om3-hash
==> Really remove environment access-om3-hash? [y/N] y
==> Successfully removed environment 'access-om3-hash'

[root@d513c5c7de56 ACCESS-OM3]# git diff
diff --git a/spack.yaml b/spack.yaml
index 635ffa3..6fa7811 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -9,7 +9,11 @@ spack:
     # Main Dependencies
     access-om3-nuopc:
       require:
-        - '@git.0.3.0'
+        # - '@git.0.3.0'
+        - '@git.0.2.0'
+        # - '@git.96f91599f746b4866bbd3f05ee6eb192ba70d391'
+        # - '@git.main'
+        # - '@main'

     # Other Dependencies
     esmf:
[root@d513c5c7de56 ACCESS-OM3]# spack env create access-om3-hash spack.yaml 
==> Created environment access-om3-hash in: /opt/environments/access-om3-hash
==> Activate with: spack env activate access-om3-hash
[root@d513c5c7de56 ACCESS-OM3]# spack env activate access-om3-hash
[root@d513c5c7de56 ACCESS-OM3]# spack concretize -f
==> Error: concretization failed for the following reasons:

   1. cannot satisfy a requirement for package 'access-om3-nuopc'.

[root@d513c5c7de56 ACCESS-OM3]# spack env deactivate 
[root@d513c5c7de56 ACCESS-OM3]# spack env rm access-om3-hash
==> Really remove environment access-om3-hash? [y/N] y
==> Successfully removed environment 'access-om3-hash'

[root@d513c5c7de56 ACCESS-OM3]# git diff
diff --git a/spack.yaml b/spack.yaml
index 635ffa3..3c9df3b 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -9,7 +9,11 @@ spack:
     # Main Dependencies
     access-om3-nuopc:
       require:
-        - '@git.0.3.0'
+        # - '@git.0.3.0'
+        # - '@git.0.2.0'
+        # - '@git.96f91599f746b4866bbd3f05ee6eb192ba70d391'
+        # - '@git.main'
+        - '@main'

     # Other Dependencies
     esmf:

[root@d513c5c7de56 ACCESS-OM3]# spack env create access-om3 spack.yaml 
==> Created environment access-om3 in: /opt/environments/access-om3
==> Activate with: spack env activate access-om3
[root@d513c5c7de56 ACCESS-OM3]# spack env activate access-om3

[root@d513c5c7de56 ACCESS-OM3]# spack concretize -f
==> Error: concretization failed for the following reasons:

   1. cannot satisfy a requirement for package 'access-om3-nuopc'.

[root@d513c5c7de56 ACCESS-OM3]# spack env deactivate 
[root@d513c5c7de56 ACCESS-OM3]# spack env rm access-om3
==> Really remove environment access-om3? [y/N] y
==> Successfully removed environment 'access-om3'

[root@d513c5c7de56 ACCESS-OM3]# git diff
diff --git a/spack.yaml b/spack.yaml
index 635ffa3..daac8f8 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -10,6 +10,10 @@ spack:
     access-om3-nuopc:
       require:
         - '@git.0.3.0'
+        # - '@git.0.2.0'
+        # - '@git.96f91599f746b4866bbd3f05ee6eb192ba70d391'
+        # - '@git.main'
+        # - '@main'

     # Other Dependencies
     esmf:
[root@d513c5c7de56 ACCESS-OM3]# spack env create access-om3 spack.yaml 
==> Created environment access-om3 in: /opt/environments/access-om3
==> Activate with: spack env activate access-om3
[root@d513c5c7de56 ACCESS-OM3]# spack env activate access-om3
[root@d513c5c7de56 ACCESS-OM3]# spack concretize -f
==> Concretized access-om3@git.2024.04.0=2024.04.0
[+]  3wmuolq  access-om3@git.2024.04.0=2024.04.0%intel@2021.10.0 build_system=bundle arch=linux-rocky8-x86_64
[+]  yfwltud      ^access-om3-nuopc@git.0.3.0=0.3.0%intel@2021.10.0~install_libraries~ipo~mom_symmetric~openmp build_system=cmake build_type=Release cice_io=PIO configurations=CICE6-WW3,MOM6-CICE6,MOM6-CICE6-WW3 generator=make arch=linux-rocky8-x86_64
[+]  m6clc3w          ^cmake@3.24.4%intel@2021.10.0~doc+ncurses+ownlibs build_system=generic build_type=RelWithDebInfo arch=linux-rocky8-x86_64
[+]  ixjkeea              ^curl@8.7.1%intel@2021.10.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-rocky8-x86_64
[+]  x6z35ea                  ^nghttp2@1.57.0%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  y7n7vkn                      ^diffutils@3.10%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  eg3yw5o                  ^openssl@3.3.0%intel@2021.10.0~docs+shared build_system=generic certs=mozilla arch=linux-rocky8-x86_64
[+]  e4abmsj                      ^ca-certificates-mozilla@2023-05-30%intel@2021.10.0 build_system=generic arch=linux-rocky8-x86_64
[+]  qxjalh4              ^ncurses@6.5%intel@2021.10.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=linux-rocky8-x86_64
[+]  wa2x7rh              ^zlib-ng@2.1.6%intel@2021.10.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  r4qrxpa          ^esmf@8.5.0%intel@2021.10.0 cflags='-fp-model precise' fflags='-fp-model precise' ~debug~external-lapack+external-parallelio+mpi+netcdf~pnetcdf+shared~xerces build_system=makefile esmf_comm=auto esmf_os=auto esmf_pio=auto patches=f63d405 snapshot=none arch=linux-rocky8-x86_64
[+]  aom2yuj              ^netcdf-c@4.9.2%intel@2021.10.0+blosc~byterange~dap~fsync~hdf4~ipo~jna+mpi~nczarr_zip+optimize~parallel-netcdf+pic+shared+szip+zstd build_system=cmake build_type=RelWithDebInfo generator=make patches=0161eb8 arch=linux-rocky8-x86_64
[+]  357vng5                  ^bzip2@1.0.8%intel@2021.10.0~debug~pic+shared build_system=generic arch=linux-rocky8-x86_64
[+]  nu6k2ib                  ^c-blosc@1.21.5%intel@2021.10.0+avx2~ipo build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[+]  7a5olrr                      ^lz4@1.9.4%intel@2021.10.0+pic build_system=makefile libs=shared,static arch=linux-rocky8-x86_64
[+]  odz62m6                      ^snappy@1.1.10%intel@2021.10.0~ipo+pic+shared build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[+]  4cvtvhf                  ^hdf5@1.14.3%intel@2021.10.0~cxx~fortran+hl~ipo~java~map+mpi+shared~subfiling~szip~threadsafe+tools api=default build_system=cmake build_type=RelWithDebInfo generator=make patches=82088c8 arch=linux-rocky8-x86_64
[+]  zmhrfg5                  ^libaec@1.0.6%intel@2021.10.0~ipo+shared build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[+]  rglvnt5                  ^m4@1.4.19%intel@2021.10.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-rocky8-x86_64
[+]  ou7jkjx                      ^libsigsegv@2.14%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  lqgxpfx                  ^zstd@1.5.6%intel@2021.10.0+programs build_system=makefile compression=none libs=shared,static arch=linux-rocky8-x86_64
[+]  4dbjczt          ^fms@2023.02%intel@2021.10.0~deprecated_io~gfs_phys+internal_file_nml~ipo+large_file~openmp~pic~quad_precision~yaml build_system=cmake build_type=RelWithDebInfo constants=GFDL generator=make precision=32,64 arch=linux-rocky8-x86_64
[+]  bcbruwv          ^fortranxml@4.1.2%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  doeoclg          ^gmake@4.4.1%intel@2021.10.0~guile build_system=generic arch=linux-rocky8-x86_64
[+]  vqsb6jy          ^netcdf-fortran@4.6.1%intel@2021.10.0~doc+pic+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  vjk5ujc          ^openmpi@4.1.5%intel@2021.10.0~atomics~cuda~cxx~cxx_exceptions~gpfs~internal-hwloc~internal-libevent~internal-pmix~java~legacylaunchers~lustre~memchecker~openshmem~orterunprefix~romio+rsh~singularity~static+vt+wrapper-rpath build_system=autotools fabrics=none romio-filesystem=none schedulers=none arch=linux-rocky8-x86_64
[+]  ttmbevu              ^hwloc@2.9.1%intel@2021.10.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-rocky8-x86_64
[+]  toioath                  ^libpciaccess@0.17%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  rzovald                      ^util-macros@1.19.3%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  27uhbc2                  ^libxml2@2.10.3%intel@2021.10.0+pic~python+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  55ipnye                      ^libiconv@1.17%intel@2021.10.0 build_system=autotools libs=shared,static arch=linux-rocky8-x86_64
[+]  fwcrp5u                      ^xz@5.4.6%intel@2021.10.0~pic build_system=autotools libs=shared,static arch=linux-rocky8-x86_64
[+]  kevlg4e              ^libevent@2.1.12%intel@2021.10.0+openssl build_system=autotools arch=linux-rocky8-x86_64
[+]  t3rlsc7              ^numactl@2.0.14%intel@2021.10.0 build_system=autotools patches=4e1d78c,62fc8a8,ff37630 arch=linux-rocky8-x86_64
[+]  k2zb4k4                  ^autoconf@2.72%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  vj2jeim                  ^automake@1.16.5%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  fr2gbqc                  ^libtool@2.4.6%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  h3b27zq                      ^findutils@4.9.0%intel@2021.10.0 build_system=autotools patches=440b954 arch=linux-rocky8-x86_64
[+]  hnpfkhs              ^openssh@9.7p1%intel@2021.10.0+gssapi build_system=autotools arch=linux-rocky8-x86_64
[+]  v6vhpoc                  ^krb5@1.20.1%intel@2021.10.0+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  u5z5toh                      ^bison@3.8.2%intel@2021.10.0~color build_system=autotools arch=linux-rocky8-x86_64
[+]  wa26ziu                      ^gettext@0.22.5%intel@2021.10.0+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-rocky8-x86_64
[+]  i4om3aq                          ^tar@1.34%intel@2021.10.0 build_system=autotools zip=pigz arch=linux-rocky8-x86_64
[+]  r66n7xr                              ^pigz@2.8%intel@2021.10.0 build_system=makefile arch=linux-rocky8-x86_64
[+]  dqfpfpz                  ^libedit@3.1-20230828%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  a2hfddn                  ^libxcrypt@4.4.35%intel@2021.10.0~obsolete_api build_system=autotools patches=4885da3 arch=linux-rocky8-x86_64
[e]  an3rtsv              ^perl@5.26.3%intel@2021.10.0+cpanm+opcode+open+shared+threads build_system=generic patches=8cf4302 arch=linux-rocky8-x86_64
[+]  vrupasu              ^pkgconf@2.2.0%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  dw3g7la              ^pmix@4.2.2%intel@2021.10.0~docs+pmi_backwards_compatibility~python~restful build_system=autotools arch=linux-rocky8-x86_64
[+]  m2zhcv4          ^parallelio@2.6.2%intel@2021.10.0 cflags='-qno-opt-dynamic-align -fp-model precise -std=gnu99' fflags='-traceback -fp-model source -assume realloc_lhs -ftz -assume byterecl -convert big_endian -qno-opt-dynamic-align' +fortran~ipo~logging+mpi~ncint~pnetcdf+shared~timing build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[e]  5elnsoi      ^glibc@2.28%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64

==> Updating view at /opt/environments/access-om3/.spack-env/view

[root@d513c5c7de56 ACCESS-OM3]# git diff
diff --git a/spack.yaml b/spack.yaml
index 635ffa3..3c9df3b 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -9,7 +9,11 @@ spack:
     # Main Dependencies
     access-om3-nuopc:
       require:
-        - '@git.0.3.0'
+        # - '@git.0.3.0'
+        # - '@git.0.2.0'
+        # - '@git.96f91599f746b4866bbd3f05ee6eb192ba70d391'
+        # - '@git.main'
+        - '@main'

     # Other Dependencies
     esmf:
[root@d513c5c7de56 ACCESS-OM3]# spack env create access-om3 spack.yaml 
==> Created environment access-om3 in: /opt/environments/access-om3
==> Activate with: spack env activate access-om3
[root@d513c5c7de56 ACCESS-OM3]# spack env activate access-om3
[root@d513c5c7de56 ACCESS-OM3]# spack concretize -f
==> Error: concretization failed for the following reasons:

   1. cannot satisfy a requirement for package 'access-om3-nuopc'.

[root@d513c5c7de56 ACCESS-OM3]# spack concretize -f --fresh
==> Concretized access-om3@git.2024.04.0=2024.04.0
 -   kqlnm7g  access-om3@git.2024.04.0=2024.04.0%intel@2021.10.0 build_system=bundle arch=linux-rocky8-x86_64
 -   hcykg4t      ^access-om3-nuopc@main%intel@2021.10.0~install_libraries~ipo~mom_symmetric~openmp build_system=cmake build_type=Release cice_io=PIO configurations=CICE6-WW3,MOM6-CICE6,MOM6-CICE6-WW3 generator=make arch=linux-rocky8-x86_64
[+]  m6clc3w          ^cmake@3.24.4%intel@2021.10.0~doc+ncurses+ownlibs build_system=generic build_type=RelWithDebInfo arch=linux-rocky8-x86_64
[+]  ixjkeea              ^curl@8.7.1%intel@2021.10.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-rocky8-x86_64
[+]  x6z35ea                  ^nghttp2@1.57.0%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  y7n7vkn                      ^diffutils@3.10%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  eg3yw5o                  ^openssl@3.3.0%intel@2021.10.0~docs+shared build_system=generic certs=mozilla arch=linux-rocky8-x86_64
[+]  e4abmsj                      ^ca-certificates-mozilla@2023-05-30%intel@2021.10.0 build_system=generic arch=linux-rocky8-x86_64
[+]  qxjalh4              ^ncurses@6.5%intel@2021.10.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=linux-rocky8-x86_64
[+]  wa2x7rh              ^zlib-ng@2.1.6%intel@2021.10.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-rocky8-x86_64
 -   4mvxlr3          ^esmf@8.5.0%intel@2021.10.0 cflags='-fp-model precise' fflags='-fp-model precise' ~debug~external-lapack+external-parallelio+mpi+netcdf~pnetcdf+shared~xerces build_system=makefile esmf_comm=auto esmf_os=auto esmf_pio=auto patches=f63d405 snapshot=none arch=linux-rocky8-x86_64
[+]  aom2yuj              ^netcdf-c@4.9.2%intel@2021.10.0+blosc~byterange~dap~fsync~hdf4~ipo~jna+mpi~nczarr_zip+optimize~parallel-netcdf+pic+shared+szip+zstd build_system=cmake build_type=RelWithDebInfo generator=make patches=0161eb8 arch=linux-rocky8-x86_64
[+]  357vng5                  ^bzip2@1.0.8%intel@2021.10.0~debug~pic+shared build_system=generic arch=linux-rocky8-x86_64
[+]  nu6k2ib                  ^c-blosc@1.21.5%intel@2021.10.0+avx2~ipo build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[+]  7a5olrr                      ^lz4@1.9.4%intel@2021.10.0+pic build_system=makefile libs=shared,static arch=linux-rocky8-x86_64
[+]  odz62m6                      ^snappy@1.1.10%intel@2021.10.0~ipo+pic+shared build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[+]  4cvtvhf                  ^hdf5@1.14.3%intel@2021.10.0~cxx~fortran+hl~ipo~java~map+mpi+shared~subfiling~szip~threadsafe+tools api=default build_system=cmake build_type=RelWithDebInfo generator=make patches=82088c8 arch=linux-rocky8-x86_64
[+]  zmhrfg5                  ^libaec@1.0.6%intel@2021.10.0~ipo+shared build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[+]  rglvnt5                  ^m4@1.4.19%intel@2021.10.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-rocky8-x86_64
[+]  ou7jkjx                      ^libsigsegv@2.14%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  lqgxpfx                  ^zstd@1.5.6%intel@2021.10.0+programs build_system=makefile compression=none libs=shared,static arch=linux-rocky8-x86_64
[+]  4dbjczt          ^fms@2023.02%intel@2021.10.0~deprecated_io~gfs_phys+internal_file_nml~ipo+large_file~openmp~pic~quad_precision~yaml build_system=cmake build_type=RelWithDebInfo constants=GFDL generator=make precision=32,64 arch=linux-rocky8-x86_64
[+]  bcbruwv          ^fortranxml@4.1.2%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  doeoclg          ^gmake@4.4.1%intel@2021.10.0~guile build_system=generic arch=linux-rocky8-x86_64
[+]  vqsb6jy          ^netcdf-fortran@4.6.1%intel@2021.10.0~doc+pic+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  vjk5ujc          ^openmpi@4.1.5%intel@2021.10.0~atomics~cuda~cxx~cxx_exceptions~gpfs~internal-hwloc~internal-libevent~internal-pmix~java~legacylaunchers~lustre~memchecker~openshmem~orterunprefix~romio+rsh~singularity~static+vt+wrapper-rpath build_system=autotools fabrics=none romio-filesystem=none schedulers=none arch=linux-rocky8-x86_64
[+]  ttmbevu              ^hwloc@2.9.1%intel@2021.10.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-rocky8-x86_64
[+]  toioath                  ^libpciaccess@0.17%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  rzovald                      ^util-macros@1.19.3%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  27uhbc2                  ^libxml2@2.10.3%intel@2021.10.0+pic~python+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  55ipnye                      ^libiconv@1.17%intel@2021.10.0 build_system=autotools libs=shared,static arch=linux-rocky8-x86_64
[+]  fwcrp5u                      ^xz@5.4.6%intel@2021.10.0~pic build_system=autotools libs=shared,static arch=linux-rocky8-x86_64
[+]  kevlg4e              ^libevent@2.1.12%intel@2021.10.0+openssl build_system=autotools arch=linux-rocky8-x86_64
[+]  t3rlsc7              ^numactl@2.0.14%intel@2021.10.0 build_system=autotools patches=4e1d78c,62fc8a8,ff37630 arch=linux-rocky8-x86_64
[+]  k2zb4k4                  ^autoconf@2.72%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  vj2jeim                  ^automake@1.16.5%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  fr2gbqc                  ^libtool@2.4.6%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  h3b27zq                      ^findutils@4.9.0%intel@2021.10.0 build_system=autotools patches=440b954 arch=linux-rocky8-x86_64
[+]  hnpfkhs              ^openssh@9.7p1%intel@2021.10.0+gssapi build_system=autotools arch=linux-rocky8-x86_64
[+]  v6vhpoc                  ^krb5@1.20.1%intel@2021.10.0+shared build_system=autotools arch=linux-rocky8-x86_64
[+]  u5z5toh                      ^bison@3.8.2%intel@2021.10.0~color build_system=autotools arch=linux-rocky8-x86_64
[+]  wa26ziu                      ^gettext@0.22.5%intel@2021.10.0+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-rocky8-x86_64
[+]  i4om3aq                          ^tar@1.34%intel@2021.10.0 build_system=autotools zip=pigz arch=linux-rocky8-x86_64
[+]  r66n7xr                              ^pigz@2.8%intel@2021.10.0 build_system=makefile arch=linux-rocky8-x86_64
[+]  dqfpfpz                  ^libedit@3.1-20230828%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  a2hfddn                  ^libxcrypt@4.4.35%intel@2021.10.0~obsolete_api build_system=autotools patches=4885da3 arch=linux-rocky8-x86_64
[e]  an3rtsv              ^perl@5.26.3%intel@2021.10.0+cpanm+opcode+open+shared+threads build_system=generic patches=8cf4302 arch=linux-rocky8-x86_64
[+]  vrupasu              ^pkgconf@2.2.0%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64
[+]  dw3g7la              ^pmix@4.2.2%intel@2021.10.0~docs+pmi_backwards_compatibility~python~restful build_system=autotools arch=linux-rocky8-x86_64
 -   vyk7xmb          ^parallelio@2.6.2%intel@2021.10.0 cflags='-fp-model precise -std=gnu99 -qno-opt-dynamic-align' fflags='-ftz -qno-opt-dynamic-align -fp-model source -assume realloc_lhs -convert big_endian -assume byterecl -traceback' +fortran~ipo~logging+mpi~ncint~pnetcdf+shared~timing build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rocky8-x86_64
[e]  5elnsoi      ^glibc@2.28%intel@2021.10.0 build_system=autotools arch=linux-rocky8-x86_64

==> Updating view at /opt/environments/access-om3/.spack-env/view
harshula commented 1 month ago

Hi @CodeGat , Is this what you found with CI/CD?

harshula commented 1 month ago

Note: new versions (new hashes) of packages where installed in the process:

[root@d513c5c7de56 ACCESS-OM3]# spack find --long
...
-- linux-rocky8-x86_64 / intel@2021.10.0 ------------------------
kqlnm7g access-om3@git.2024.04.0=2024.04.0  toioath libpciaccess@0.17
3wmuolq access-om3@git.2024.04.0=2024.04.0  ou7jkjx libsigsegv@2.14
yfwltud access-om3-nuopc@git.0.3.0=0.3.0    fr2gbqc libtool@2.4.6
hcykg4t access-om3-nuopc@main               a2hfddn libxcrypt@4.4.35
k2zb4k4 autoconf@2.72                       27uhbc2 libxml2@2.10.3
vj2jeim automake@1.16.5                     7a5olrr lz4@1.9.4
u5z5toh bison@3.8.2                         rglvnt5 m4@1.4.19
357vng5 bzip2@1.0.8                         qxjalh4 ncurses@6.5
nu6k2ib c-blosc@1.21.5                      aom2yuj netcdf-c@4.9.2
e4abmsj ca-certificates-mozilla@2023-05-30  vqsb6jy netcdf-fortran@4.6.1
m6clc3w cmake@3.24.4                        x6z35ea nghttp2@1.57.0
ixjkeea curl@8.7.1                          t3rlsc7 numactl@2.0.14
y7n7vkn diffutils@3.10                      vjk5ujc openmpi@4.1.5
r4qrxpa esmf@8.5.0                          hnpfkhs openssh@9.7p1
4mvxlr3 esmf@8.5.0                          eg3yw5o openssl@3.3.0
h3b27zq findutils@4.9.0                     vyk7xmb parallelio@2.6.2
4dbjczt fms@2023.02                         m2zhcv4 parallelio@2.6.2
bcbruwv fortranxml@4.1.2                    an3rtsv perl@5.26.3
wa26ziu gettext@0.22.5                      r66n7xr pigz@2.8
5elnsoi glibc@2.28                          vrupasu pkgconf@2.2.0
doeoclg gmake@4.4.1                         dw3g7la pmix@4.2.2
4cvtvhf hdf5@1.14.3                         odz62m6 snappy@1.1.10
ttmbevu hwloc@2.9.1                         i4om3aq tar@1.34
v6vhpoc krb5@1.20.1                         rzovald util-macros@1.19.3
zmhrfg5 libaec@1.0.6                        fwcrp5u xz@5.4.6
dqfpfpz libedit@3.1-20230828                wa2x7rh zlib-ng@2.1.6
kevlg4e libevent@2.1.12                     lqgxpfx zstd@1.5.6
55ipnye libiconv@1.17
==> 102 installed packages
harshula commented 1 month ago

Note: There appears to be no need to remove and recreate the environment after a dependency change in the spack.yaml . Simply editing the environment's spack.yaml and re-concretizing appears to be sufficient:

[root@d513c5c7de56 ACCESS-OM3]# vi ../environments/access-om3/spack.yaml 

[root@d513c5c7de56 ACCESS-OM3]# spack find
==> In environment access-om3
==> 1 root specs
[+] access-om3@git.2024.04.0=2024.04.0

==> Installed packages
-- linux-rocky8-x86_64 / intel@2021.10.0 ------------------------
access-om3@git.2024.04.0=2024.04.0  gmake@4.4.1           netcdf-fortran@4.6.1
access-om3-nuopc@main               hdf5@1.14.3           nghttp2@1.57.0
...

[root@d513c5c7de56 ACCESS-OM3]# spack concretize -f --fresh
==> Concretized access-om3@git.2024.04.0=2024.04.0
...

[root@d513c5c7de56 ACCESS-OM3]# spack find
==> In environment access-om3
==> 1 root specs
[+] access-om3@git.2024.04.0=2024.04.0

==> Installed packages
-- linux-rocky8-x86_64 / intel@2021.10.0 ------------------------
access-om3@git.2024.04.0=2024.04.0
access-om3-nuopc@git.96f91599f746b4866bbd3f05ee6eb192ba70d391=0.3.0-git.15
...
CodeGat commented 1 month ago

Indeed, this is what we do in the CI/CD - the --fresh flag.

And yes, you don't have to remove the environment - editing the spack.yaml under $SPACK_ROOT/../environments/access-om3/spack.yaml is okay. We just don't do that with CD because we want to give the user the possibility of comparing between commits.

anton-seaice commented 1 month ago

Doing a spack concretise --fresh fixed the problem.

anton-seaice commented 1 month ago

I think the error message should be better though :)