summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorBOUDAOUD34 <114594090+BOUDAOUD34@users.noreply.github.com>2024-11-28 09:20:48 +0100
committerGitHub <noreply@github.com>2024-11-28 09:20:48 +0100
commitc22d77a38e52957ef152f7f00b5062d8812448ec (patch)
tree75a27d81f7d6245c5519aea1c273a2582dc0d8c1 /var
parentd82bdb3bf774cd2d70cfa8c27a287b15fa388e74 (diff)
downloadspack-c22d77a38e52957ef152f7f00b5062d8812448ec.tar.gz
spack-c22d77a38e52957ef152f7f00b5062d8812448ec.tar.bz2
spack-c22d77a38e52957ef152f7f00b5062d8812448ec.tar.xz
spack-c22d77a38e52957ef152f7f00b5062d8812448ec.zip
dbcsr: patch for resolving .mod file conflicts in ROCm by implementing USE, INTRINSIC (#46181)
Co-authored-by: U-PALLAS\boudaoud <boudaoud@pc44.pallas.cines.fr>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/dbcsr/package.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dbcsr/package.py b/var/spack/repos/builtin/packages/dbcsr/package.py
index f4917e9492..351ab179dd 100644
--- a/var/spack/repos/builtin/packages/dbcsr/package.py
+++ b/var/spack/repos/builtin/packages/dbcsr/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -126,6 +128,18 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
generator("ninja")
depends_on("ninja@1.10:", type="build")
+ @when("+rocm")
+ def patch(self):
+ for directory, subdirectory, files in os.walk(os.getcwd()):
+ for i in files:
+ file_path = os.path.join(directory, i)
+ filter_file("USE ISO_C_BINDING", "USE,INTRINSIC :: ISO_C_BINDING", file_path)
+ filter_file("USE ISO_FORTRAN_ENV", "USE,INTRINSIC :: ISO_FORTRAN_ENV", file_path)
+ filter_file("USE omp_lib", "USE,INTRINSIC :: omp_lib", file_path)
+ filter_file("USE OMP_LIB", "USE,INTRINSIC :: OMP_LIB", file_path)
+ filter_file("USE iso_c_binding", "USE,INTRINSIC :: iso_c_binding", file_path)
+ filter_file("USE iso_fortran_env", "USE,INTRINSIC :: iso_fortran_env", file_path)
+
def cmake_args(self):
spec = self.spec