yambo: improve Yambo recipe and add new DeviceXlib recipe both with GPU support#4923
yambo: improve Yambo recipe and add new DeviceXlib recipe both with GPU support#4923nicspalla wants to merge 9 commits into
Conversation
* add CUDA-Fortran support for GPU-accelerated Yambo builds * add DeviceXlib dependency and integration * extend compiler support (NVHPC, GCC, Intel, oneAPI) * add optional ScaLAPACK, PETSc, and SLEPc support * improve MPI/OpenMP and parallel I/O handling * add variants for optional Yambo projects (ph, rt, sc, nl) * improve dependency management, patches, and build compatibility across HPC systems
|
@spackbot fix style |
|
Let me see if I can fix that for you! |
|
I was able to run spack style --fixrepos/spack_repo/builtin/packages/devicexlib/package.py
repos/spack_repo/builtin/packages/yambo/package.py
�[1;34m==> �[0mrunning ruff format
2 files reformatted
�[1;34m==> �[0mrunning ruff check
Found 2 errors (2 fixed, 0 remaining).
�[1;34m==> �[0mstyle checks passed
I've updated the branch with style fixes. |
alalazo
left a comment
There was a problem hiding this comment.
Started reviewing. I have a first batch of comments. Let me know if anything is unclear.
| with when("+cuda"): | ||
| variant( | ||
| "cuda_rt", | ||
| values=str, |
There was a problem hiding this comment.
Hmm, a generic string seems a bit too broad for this variant.
There was a problem hiding this comment.
do you think that float is better?
| if "%nvhpc" in spec: | ||
| env.set("CC", "nvc") | ||
| env.set("FC", "nvfortran") | ||
| env.set("F90", "nvfortran") | ||
| env.set("CPP", "cpp -E") | ||
| env.set("FPP", "nvfortran -Mpreprocess -E") | ||
| env.set("F90SUFFIX", ".f90") | ||
|
|
||
| if "%gcc" in spec: | ||
| env.set("CC", "gcc") | ||
| env.set("FC", "gfortran") | ||
| env.set("F90", "gfortran") | ||
| env.set("CPP", "gcc -E -P") | ||
| env.set("FPP", "gfortran -E -P") | ||
| env.set("F90SUFFIX", ".f90") |
There was a problem hiding this comment.
These are wrong in the current model. Spack allows to use %c=gcc and fortran=nvfortran etc. You can't assume that the toolchain is always homogeneous.
There was a problem hiding this comment.
ok, so do you suggest to simply remove them? or substitute them with something else?
Summary
This PR significantly extends and modernizes the Spack recipes for Yambo and add the recipe for DeviceXlib, improving GPU support, compiler compatibility, dependency handling, and portability across HPC systems.
Main developments
GPU accelerated compilation with CUDA-Fortran
Added support for GPU-enabled Yambo builds using CUDA-Fortran:
DeviceXlib integration
Added DeviceXlib as a dependency of Yambo.
DeviceXlib is a library developed by the Yambo team that provides wrappers for accelerator-oriented routines and abstracts device-specific operations.
The recipe now supports both CPU-only and GPU-enabled configurations with automatic DeviceXlib integration.
Compiler and HPC library support
Improved support for:
Added optional support for:
Additional improvements
ph,rt,sc,nl),