Skip to content

Commit 9218e0f

Browse files
committed
arch: add missing openmp flag for aomp compiler
1 parent dcc1559 commit 9218e0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

devito/arch/compiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,14 +549,16 @@ def __init_finalize__(self, **kwargs):
549549
if not configuration['safe-math']:
550550
self.cflags.append('-ffast-math')
551551

552+
if language == 'openmp':
553+
self.ldflags += ['-fopenmp']
554+
552555
if isinstance(platform, NvidiaDevice):
553556
self.cflags.remove('-std=c99')
554557
elif platform is AMDGPUX:
555558
self.cflags.remove('-std=c99')
556559
# Add flags for OpenMP offloading
557560
if language in ['C', 'openmp']:
558561
self.ldflags += ['-target', 'x86_64-pc-linux-gnu']
559-
self.ldflags += ['-fopenmp']
560562
self.ldflags += [f'--offload-arch={platform.march}']
561563
elif platform in [POWER8, POWER9]:
562564
# It doesn't make much sense to use AOMP on Power, but it should work

0 commit comments

Comments
 (0)