Skip to content

Commit cbc2b91

Browse files
committed
Add PGI compiler toolchain.
1 parent c7a3777 commit cbc2b91

2 files changed

Lines changed: 107 additions & 0 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
##
2+
# Copyright 2015 Bart Oldeman
3+
#
4+
# This file is part of EasyBuild,
5+
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
6+
# with support of Ghent University (http://ugent.be/hpc),
7+
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
8+
# the Hercules foundation (http://www.herculesstichting.be/in_English)
9+
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
10+
#
11+
# http://github.com/hpcugent/easybuild
12+
#
13+
# EasyBuild is free software: you can redistribute it and/or modify
14+
# it under the terms of the GNU General Public License as published by
15+
# the Free Software Foundation v2.
16+
#
17+
# EasyBuild is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
24+
##
25+
"""
26+
Support for PGI compilers (pgcc, pgc++, pgfortran) as toolchain compilers.
27+
28+
@author: Bart Oldeman (McGill University, Calcul Quebec, Compute Canada)
29+
"""
30+
31+
from distutils.version import LooseVersion
32+
33+
import easybuild.tools.systemtools as systemtools
34+
from easybuild.tools.build_log import EasyBuildError
35+
from easybuild.tools.toolchain.compiler import Compiler
36+
37+
38+
TC_CONSTANT_PGI = "PGI"
39+
40+
41+
class Pgi(Compiler):
42+
"""PGI compiler class
43+
"""
44+
45+
COMPILER_MODULE_NAME = ['pgi']
46+
47+
COMPILER_FAMILY = TC_CONSTANT_PGI
48+
49+
COMPILER_UNIQUE_OPTION_MAP = {
50+
'i8': 'i8',
51+
'r8': 'r8',
52+
'optarch': '', # default!
53+
'openmp': 'mp',
54+
'strict': ['Mnoflushz','Kieee'],
55+
'precise': ['Mnoflushz'],
56+
'defaultprec': ['Mflushz'],
57+
'loose': ['Mfprelaxed'],
58+
'veryloose': ['Mfprelaxed=div,order,intrinsic,recip,sqrt,rsqrt', 'Mfpapprox'],
59+
}
60+
61+
COMPILER_CC = 'pgcc'
62+
COMPILER_CXX = 'pgc++'
63+
64+
COMPILER_F77 = 'pgfortran'
65+
COMPILER_F90 = 'pgfortran'
66+
67+
LINKER_TOGGLE_STATIC_DYNAMIC = {
68+
'static': '-Bstatic',
69+
'dynamic':'-Bdynamic',
70+
}
71+

easybuild/toolchains/pgi.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
##
2+
# Copyright 2015 Bart Oldeman
3+
#
4+
# This file is part of EasyBuild,
5+
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
6+
# with support of Ghent University (http://ugent.be/hpc),
7+
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
8+
# the Hercules foundation (http://www.herculesstichting.be/in_English)
9+
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
10+
#
11+
# http://github.com/hpcugent/easybuild
12+
#
13+
# EasyBuild is free software: you can redistribute it and/or modify
14+
# it under the terms of the GNU General Public License as published by
15+
# the Free Software Foundation v2.
16+
#
17+
# EasyBuild is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
24+
##
25+
"""
26+
EasyBuild support for PGI compiler toolchain.
27+
28+
@author: Bart Oldeman (McGill University, Calcul Quebec, Compute Canada)
29+
"""
30+
31+
from easybuild.toolchains.compiler.pgi import Pgi
32+
33+
34+
class PgiToolchain(Pgi):
35+
"""Simple toolchain with just the PGI compilers."""
36+
NAME = 'pgi'

0 commit comments

Comments
 (0)