lammps: use the Cray GTL (#46090)

This commit is contained in:
etiennemlb 2025-02-12 23:07:51 +01:00 committed by GitHub
parent ae50757f3c
commit a011b49e1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -857,6 +857,22 @@ def url_for_version(self, version):
root_cmakelists_dir = "cmake" root_cmakelists_dir = "cmake"
def flag_handler(self, name, flags):
wrapper_flags = []
build_system_flags = []
if self.spec.satisfies("+mpi+cuda") or self.spec.satisfies("+mpi+rocm"):
if self.spec.satisfies("^[virtuals=mpi] cray-mpich"):
gtl_lib = self.spec["cray-mpich"].package.gtl_lib
build_system_flags.extend(gtl_lib.get(name) or [])
# hipcc is not wrapped, we need to pass the flags via the build
# system.
build_system_flags.extend(flags)
else:
wrapper_flags.extend(flags)
return (wrapper_flags, [], build_system_flags)
def cmake_args(self): def cmake_args(self):
spec = self.spec spec = self.spec