-
Notifications
You must be signed in to change notification settings - Fork 203
/
iomkl.py
65 lines (57 loc) · 2.6 KB
/
iomkl.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
##
# Copyright 2012-2024 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
EasyBuild support for iomkl compiler toolchain (includes Intel compilers (icc, ifort), OpenMPI,
Intel Math Kernel Library (MKL), and Intel FFTW wrappers.
Authors:
* Stijn De Weirdt (Ghent University)
* Kenneth Hoste (Ghent University)
"""
import re
from easybuild.tools import LooseVersion
from easybuild.toolchains.iompi import Iompi
from easybuild.toolchains.iimkl import Iimkl
from easybuild.toolchains.fft.intelfftw import IntelFFTW
from easybuild.toolchains.linalg.intelmkl import IntelMKL
class Iomkl(Iompi, IntelMKL, IntelFFTW):
"""
Compiler toolchain with Intel compilers (icc/ifort), OpenMPI,
Intel Math Kernel Library (MKL) and Intel FFTW wrappers.
"""
NAME = 'iomkl'
SUBTOOLCHAIN = [Iompi.NAME, Iimkl.NAME]
def is_deprecated(self):
"""Return whether or not this toolchain is deprecated."""
# need to transform a version like '2018b' with something that is safe to compare with '2019'
# comparing subversions that include letters causes TypeErrors in Python 3
# 'a' is assumed to be equivalent with '.01' (January), and 'b' with '.07' (June) (good enough for this purpose)
version = self.version.replace('a', '.01').replace('b', '.07')
# iomkl toolchains older than iomkl/2019a are deprecated since EasyBuild v4.5.0
# make sure a non-symbolic version (e.g., 'system') is used before making comparisons using LooseVersion
if re.match('^[0-9]', version) and LooseVersion(version) < LooseVersion('2019'):
deprecated = True
else:
deprecated = False
return deprecated