Skip to content

Commit ea8433d

Browse files
authored
Merge pull request #4377 from bartoldeman/intelcompilers-openmp
Use `-qopenmp` instead of `-fiopenmp` for OpenMP in Intel compilers
2 parents 731649d + ee99d87 commit ea8433d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

easybuild/toolchains/compiler/intel_compilers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ def set_variables(self):
109109
self.options.options_map['loose'] = ['fp-model fast']
110110
# fp-model fast=2 gives "warning: overriding '-ffp-model=fast=2' option with '-ffp-model=fast'"
111111
self.options.options_map['veryloose'] = ['fp-model fast']
112-
# recommended in porting guide
113-
self.options.options_map['openmp'] = ['fiopenmp']
112+
# recommended in porting guide: qopenmp, unlike fiopenmp, works for both classic and oneapi compilers
113+
# https://www.intel.com/content/www/us/en/developer/articles/guide/porting-guide-for-ifort-to-ifx.html
114+
self.options.options_map['openmp'] = ['qopenmp']
114115

115116
# -xSSE2 is not supported by Intel oneAPI compilers,
116117
# so use -march=x86-64 -mtune=generic when using optarch=GENERIC

test/framework/toolchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,7 @@ def test_independence(self):
20362036
'CrayIntel': "-O2 -ftz -fp-speculation=safe -fp-model source -fopenmp -craype-verbose",
20372037
'GCC': "-O2 -ftree-vectorize -test -fno-math-errno -fopenmp",
20382038
'iccifort': "-O2 -test -ftz -fp-speculation=safe -fp-model source -fopenmp",
2039-
'intel-compilers': "-O2 -test -ftz -fp-speculation=safe -fp-model precise -fiopenmp",
2039+
'intel-compilers': "-O2 -test -ftz -fp-speculation=safe -fp-model precise -qopenmp",
20402040
}
20412041

20422042
toolchains = [

0 commit comments

Comments
 (0)