Skip to content

Commit edba79e

Browse files
authored
Merge pull request #4039 from ComputeCanada/icx-ftz
don't use -ftz for Intel oneAPI compilers versions before 2022.x
2 parents c1e5196 + 1f4d59d commit edba79e

File tree

4 files changed

+49
-4
lines changed

4 files changed

+49
-4
lines changed

easybuild/toolchains/compiler/intel_compilers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
"""
3030
import os
3131

32+
from distutils.version import LooseVersion
33+
3234
from easybuild.toolchains.compiler.inteliccifort import IntelIccIfort
3335
from easybuild.tools.toolchain.compiler import Compiler
3436

@@ -68,7 +70,9 @@ def set_variables(self):
6870
self.COMPILER_F90 = 'ifx'
6971
self.COMPILER_FC = 'ifx'
7072
# fp-model source is not supported by icx but is equivalent to precise
71-
self.options.options_map['defaultprec'] = ['ftz', 'fp-speculation=safe', 'fp-model precise']
73+
self.options.options_map['defaultprec'] = ['fp-speculation=safe', 'fp-model precise']
74+
if LooseVersion(self.get_software_version(self.COMPILER_MODULE_NAME)[0]) >= LooseVersion('2022'):
75+
self.options.options_map['defaultprec'].insert(0, 'ftz')
7276
# icx doesn't like -fp-model fast=1; fp-model fast is equivalent
7377
self.options.options_map['loose'] = ['fp-model fast']
7478
# fp-model fast=2 gives "warning: overriding '-ffp-model=fast=2' option with '-ffp-model=fast'"

test/framework/modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555

5656
# number of modules included for testing purposes
57-
TEST_MODULES_COUNT = 90
57+
TEST_MODULES_COUNT = 91
5858

5959

6060
class ModulesTest(EnhancedTestCase):
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#%Module
2+
proc ModulesHelp { } {
3+
puts stderr {
4+
5+
Description
6+
===========
7+
Intel C, C++ & Fortran compilers (classic and oneAPI)
8+
9+
10+
More information
11+
================
12+
- Homepage: https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit.html
13+
}
14+
}
15+
16+
module-whatis {Description: Intel C, C++ & Fortran compilers (classic and oneAPI)}
17+
module-whatis {Homepage: https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit.html}
18+
module-whatis {URL: https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit.html}
19+
20+
set root /tmp/intel-compilers/2022.1.0
21+
22+
conflict intel-compilers
23+
24+
prepend-path CPATH $root/tbb/2022.1.0/include
25+
prepend-path LD_LIBRARY_PATH $root/compiler/2022.1.0/linux/lib
26+
prepend-path LD_LIBRARY_PATH $root/compiler/2022.1.0/linux/lib/x64
27+
prepend-path LD_LIBRARY_PATH $root/compiler/2022.1.0/linux/compiler/lib/intel64_lin
28+
prepend-path LD_LIBRARY_PATH $root/tbb/2022.1.0/lib/intel64/gcc4.8
29+
prepend-path LIBRARY_PATH $root/compiler/2022.1.0/linux/lib
30+
prepend-path LIBRARY_PATH $root/compiler/2022.1.0/linux/lib/x64
31+
prepend-path LIBRARY_PATH $root/compiler/2022.1.0/linux/compiler/lib/intel64_lin
32+
prepend-path LIBRARY_PATH $root/tbb/2022.1.0/lib/intel64/gcc4.8
33+
prepend-path OCL_ICD_FILENAMES $root/compiler/2022.1.0/linux/lib/x64/libintelocl.so
34+
prepend-path PATH $root/compiler/2022.1.0/linux/bin
35+
prepend-path PATH $root/compiler/2022.1.0/linux/bin/intel64
36+
prepend-path TBBROOT $root/tbb/2022.1.0
37+
setenv EBROOTINTELMINCOMPILERS "$root"
38+
setenv EBVERSIONINTELMINCOMPILERS "2022.1.0"
39+
setenv EBDEVELINTELMINCOMPILERS "$root/easybuild/Core-intel-compilers-2022.1.0-easybuild-devel"
40+
41+
# Built with EasyBuild version 4.5.0dev

test/framework/toolchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def test_optarch_generic(self):
705705
tcs = {
706706
'gompi': ('2018a', "-march=x86-64 -mtune=generic"),
707707
'iccifort': ('2018.1.163', "-xSSE2 -ftz -fp-speculation=safe -fp-model source"),
708-
'intel-compilers': ('2021.4.0', "-xSSE2 -ftz -fp-speculation=safe -fp-model precise"),
708+
'intel-compilers': ('2021.4.0', "-xSSE2 -fp-speculation=safe -fp-model precise"),
709709
}
710710
for tcopt_optarch in [False, True]:
711711
for tcname in tcs:
@@ -1953,7 +1953,7 @@ def test_independence(self):
19531953
('CrayIntel', '2015.06-XC'),
19541954
('GCC', '6.4.0-2.28'),
19551955
('iccifort', '2018.1.163'),
1956-
('intel-compilers', '2021.4.0'),
1956+
('intel-compilers', '2022.1.0'),
19571957
]
19581958

19591959
# purposely obtain toolchains several times in a row, value for $CFLAGS should not change

0 commit comments

Comments
 (0)