Skip to content

Commit

Permalink
arch: Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Jun 7, 2023
1 parent 25fbc79 commit 9636366
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

platform = kwargs.pop('platform', configuration['platform'])

# Graviton flag
if platform is GRAVITON:
self.cflags += ['-mcpu=neoverse-n1']
Expand Down Expand Up @@ -493,13 +494,13 @@ class AOMPCompiler(Compiler):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

language = kwargs.pop('language', configuration['language'])
platform = kwargs.pop('platform', configuration['platform'])

self.cflags += ['-Wno-unused-result', '-Wno-unused-variable']
if not configuration['safe-math']:
self.cflags.append('-ffast-math')

language = kwargs.pop('language', configuration['language'])
platform = kwargs.pop('platform', configuration['platform'])

if platform is NVIDIAX:
self.cflags.remove('-std=c99')
elif platform is AMDGPUX:
Expand Down Expand Up @@ -685,6 +686,7 @@ def __init__(self, *args, **kwargs):

platform = kwargs.pop('platform', configuration['platform'])
language = kwargs.pop('language', configuration['language'])

self.cflags.append("-xHost")

if configuration['safe-math']:
Expand Down Expand Up @@ -730,10 +732,10 @@ class IntelKNLCompiler(IntelCompiler):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

self.cflags.append('-xMIC-AVX512')

language = kwargs.pop('language', configuration['language'])

self.cflags.append('-xMIC-AVX512')

if language != 'openmp':
warning("Running on Intel KNL without OpenMP is highly discouraged")

Expand Down

0 comments on commit 9636366

Please sign in to comment.