Skip to content

Commit

Permalink
compiler: Accommodate earlier versions of icx/clang
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Jul 21, 2023
1 parent 62c9085 commit 12180b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def sniff_compiler_version(cc):
compiler = "clang"
elif ver.startswith("Homebrew clang"):
compiler = "clang"
elif ver.startswith("Intel"):
compiler = "icx"
elif ver.startswith("icc"):
compiler = "icc"
elif ver.startswith("icx"):
Expand Down Expand Up @@ -761,6 +763,12 @@ def __init__(self, *args, **kwargs):
platform = kwargs.pop('platform', configuration['platform'])
language = kwargs.pop('language', configuration['language'])

# Since OneAPI 2023.2.0 (clang17 underneath), we can use '-qopenmp'
# for all our tests
if self.version >= Version('17.0.0') and language == 'openmp':
self.ldflags.remove('-qopenmp')
self.ldflags.append('-fopenmp')

if language == 'sycl':
self.cflags.append('-fsycl')
if platform is NVIDIAX:
Expand Down

0 comments on commit 12180b3

Please sign in to comment.