JCSDA / spack-stack

Creative Commons Zero v1.0 Universal
27 stars 45 forks source link

Install spack-stack 1.8.0 (and all add-on envs needed for UFS WM @ develop) with LLVM compilers on Hera #1345

Open rickgrubin-noaa opened 2 weeks ago

rickgrubin-noaa commented 2 weeks ago

Is your feature request related to a problem? Please describe.

Install spack-stack @ v1.8.0 with LLVM compilers on hera

Describe the solution you'd like

Configure and build spack-stack @ v1.8.0 for LLVM compilers installed on hera (as noted here: Track availability / installation of Intel oneAPI (LLVM) compilers on tier1 hosts

Additional context

Build and test the UFS WM @ branch develop against the installed stack.

Build with both ifort and ifx (different stacks) as the Fortran compiler.

rickgrubin-noaa commented 1 week ago

On hera, trying to configure spack-stack @ release/1.8.0 for LLVM compilers.

For these two modules (per module available):

intel/2024.2.1 and impi/2024.2.1

configs/sites/tier1/hera/compilers.yaml

compilers:
- compiler:
  spec: oneapi@2042.2.1
  paths:
   cc: /apps/oneapi/compiler/2024.2/bin/icx
   cxx: /apps/oneapi/compiler/2024.2/bin/icx
   f77: /apps/oneapi/compiler/2024.2/bin/ifx
   fc: /apps/oneapi/compiler/2024.2/bin/ifx
  flags: {}
  operating_system: rocky8
  modules:
  - intel/2024.2.1
  environment:
   prepend_path:
    PATH: '/apps/spack/linux-rocky8-x86_64/gcc-8.5.0/gcc-14.2.0-27o6emykdlx4ze3ooerg4bofx7lgn35p/bin'
    LD_LIBRARY_PATH: '/apps/spack/linux-rocky8-x86_64/gcc-8.5.0/gcc-14.2.0-27o6emykdlx4ze3ooerg4bofx7lgn35p/lib64'
    CPATH: '/apps/spack/linux-rocky8-x86_64/gcc-8.5.0/gcc-14.2.0-27o6emykdlx4ze3ooerg4bofx7lgn35p/include'
  extra_rpaths: []

configs/sites/tier1/hera/packages_oneapi.yaml

packages:
 all:
  compiler:: [oneapi@2024.2.1]
  providers:
   mpi:: [intel-oneapi-mpi@2021.13]
   # Remove the next three lines to switch to intel-oneapi-mkl
   blas:: [openblas]
   fftw-api:: [fftw]
   lapack:: [openblas]
 mpi:
  buildable: False
 intel-oneapi-mpi:
  externals:
  - spec: intel-oneapi-mpi@2021.13%oneapi@2024.2.1
   modules:
   - impi/2024.2.1
   prefix: /apps/oneapi
[...]

Choosing mpi:: [intel-oneapi-mpi@2021.13] because

% module show impi/2024.2.1
-----------------------------------------------------------------------------------------------------------------------------
  /apps/modules/modulefamilies/intel_2024.2.1/impi/2024.2.1:
-----------------------------------------------------------------------------------------------------------------------------
whatis("Name: Intel(R) MPI Library")
whatis("Version: modulefiles/2021.13")
setenv("I_MPI_ROOT","/apps/oneapi/mpi/2021.13")

Concretization fails as:

% spack concretize --force 2>&1 | tee $DIR/$ENV/log.concretize
==> Error: concretization failed for the following reasons:

  1. Attempted to use external for 'intel-oneapi-mpi' which does not satisfy any configured external spec
  2. Attempted to build package intel-oneapi-mpi which is not buildable and does not have a satisfying external
    attr('node_compiler_version_satisfies', 'intel-oneapi-mpi', 'oneapi', '2024.2.1') is an external constraint for intel-oneapi-mpi which was not satisfied

hera does provide a module named intel-llvm/2024.2.1 (not sure why), which is functionally identical to intel/2024.2.1 -- using it yields the same result.

Ideas / suggestions?