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>
This commit is contained in:
parent
d82bdb3bf7
commit
c22d77a38e
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user