Skip to content

Commit

Permalink
Merge pull request #2174 from raminammour/patch-1
Browse files Browse the repository at this point in the history
arch: Correct `march` to `mcpu` for ppc
  • Loading branch information
mloubout authored Aug 8, 2023
2 parents a1506b6 + 7caa50c commit fde335d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def __init__(self, *args, **kwargs):

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

self.cflags += ['-march=native', '-Wno-unused-result',
self.cflags += ['-Wno-unused-result',
'-Wno-unused-variable', '-Wno-unused-but-set-variable']

if configuration['safe-math']:
Expand All @@ -400,6 +400,12 @@ def __init__(self, *args, **kwargs):
# from `=512`
self.cflags.append('-mprefer-vector-width=512')

if platform in [POWER8, POWER9]:
# -march isn't supported on power architectures, is -mtune needed?
self.cflags = ['-mcpu=native'] + self.cflags
else:
self.cflags = ['-march=native'] + self.cflags

language = kwargs.pop('language', configuration['language'])
try:
if self.version >= Version("4.9.0"):
Expand Down

0 comments on commit fde335d

Please sign in to comment.