From cbc2b91be0700c6a6a24144af24bdba71cd2dd8e Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Thu, 6 Aug 2015 22:53:16 -0400 Subject: [PATCH 1/3] Add PGI compiler toolchain. --- easybuild/toolchains/compiler/pgi.py | 71 ++++++++++++++++++++++++++++ easybuild/toolchains/pgi.py | 36 ++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 easybuild/toolchains/compiler/pgi.py create mode 100755 easybuild/toolchains/pgi.py diff --git a/easybuild/toolchains/compiler/pgi.py b/easybuild/toolchains/compiler/pgi.py new file mode 100644 index 0000000000..bc9cff2654 --- /dev/null +++ b/easybuild/toolchains/compiler/pgi.py @@ -0,0 +1,71 @@ +## +# Copyright 2015 Bart Oldeman +# +# 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://vscentrum.be/nl/en), +# the Hercules foundation (http://www.herculesstichting.be/in_English) +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). +# +# http://github.com/hpcugent/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 . +## +""" +Support for PGI compilers (pgcc, pgc++, pgfortran) as toolchain compilers. + +@author: Bart Oldeman (McGill University, Calcul Quebec, Compute Canada) +""" + +from distutils.version import LooseVersion + +import easybuild.tools.systemtools as systemtools +from easybuild.tools.build_log import EasyBuildError +from easybuild.tools.toolchain.compiler import Compiler + + +TC_CONSTANT_PGI = "PGI" + + +class Pgi(Compiler): + """PGI compiler class + """ + + COMPILER_MODULE_NAME = ['pgi'] + + COMPILER_FAMILY = TC_CONSTANT_PGI + + COMPILER_UNIQUE_OPTION_MAP = { + 'i8': 'i8', + 'r8': 'r8', + 'optarch': '', # default! + 'openmp': 'mp', + 'strict': ['Mnoflushz','Kieee'], + 'precise': ['Mnoflushz'], + 'defaultprec': ['Mflushz'], + 'loose': ['Mfprelaxed'], + 'veryloose': ['Mfprelaxed=div,order,intrinsic,recip,sqrt,rsqrt', 'Mfpapprox'], + } + + COMPILER_CC = 'pgcc' + COMPILER_CXX = 'pgc++' + + COMPILER_F77 = 'pgfortran' + COMPILER_F90 = 'pgfortran' + + LINKER_TOGGLE_STATIC_DYNAMIC = { + 'static': '-Bstatic', + 'dynamic':'-Bdynamic', + } + diff --git a/easybuild/toolchains/pgi.py b/easybuild/toolchains/pgi.py new file mode 100755 index 0000000000..a52a865028 --- /dev/null +++ b/easybuild/toolchains/pgi.py @@ -0,0 +1,36 @@ +## +# Copyright 2015 Bart Oldeman +# +# 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://vscentrum.be/nl/en), +# the Hercules foundation (http://www.herculesstichting.be/in_English) +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). +# +# http://github.com/hpcugent/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 . +## +""" +EasyBuild support for PGI compiler toolchain. + +@author: Bart Oldeman (McGill University, Calcul Quebec, Compute Canada) +""" + +from easybuild.toolchains.compiler.pgi import Pgi + + +class PgiToolchain(Pgi): + """Simple toolchain with just the PGI compilers.""" + NAME = 'pgi' From a1e34f7a87d694fe75a8553a291b3d00eda9ae92 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Fri, 7 Aug 2015 22:36:37 -0400 Subject: [PATCH 2/3] Change copyright, add some comments. --- easybuild/toolchains/compiler/pgi.py | 6 +++++- easybuild/toolchains/pgi.py | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/easybuild/toolchains/compiler/pgi.py b/easybuild/toolchains/compiler/pgi.py index bc9cff2654..f6a347eb13 100644 --- a/easybuild/toolchains/compiler/pgi.py +++ b/easybuild/toolchains/compiler/pgi.py @@ -1,6 +1,9 @@ ## # Copyright 2015 Bart Oldeman # +# This file is triple-licensed under GPLv2 (see below), MIT, and +# BSD three-clause licenses. +# # 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), @@ -46,10 +49,11 @@ class Pgi(Compiler): COMPILER_FAMILY = TC_CONSTANT_PGI + # Reference: https://www.pgroup.com/doc/pgiref.pdf COMPILER_UNIQUE_OPTION_MAP = { 'i8': 'i8', 'r8': 'r8', - 'optarch': '', # default! + 'optarch': '', # PGI by default generates code for the arch it is running on! 'openmp': 'mp', 'strict': ['Mnoflushz','Kieee'], 'precise': ['Mnoflushz'], diff --git a/easybuild/toolchains/pgi.py b/easybuild/toolchains/pgi.py index a52a865028..6f2aad419d 100755 --- a/easybuild/toolchains/pgi.py +++ b/easybuild/toolchains/pgi.py @@ -1,6 +1,9 @@ ## # Copyright 2015 Bart Oldeman # +# This file is triple-licensed under GPLv2 (see below), MIT, and +# BSD three-clause licenses. +# # 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), From ff61664179474b020fe621fd0f50f1b818f415c1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 3 Dec 2015 11:42:29 -0800 Subject: [PATCH 3/3] adding a new toolchain for pgi and mvapich --- easybuild/toolchains/pgimvapich2.py | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 easybuild/toolchains/pgimvapich2.py diff --git a/easybuild/toolchains/pgimvapich2.py b/easybuild/toolchains/pgimvapich2.py new file mode 100755 index 0000000000..599d612024 --- /dev/null +++ b/easybuild/toolchains/pgimvapich2.py @@ -0,0 +1,39 @@ +## +# Copyright 2015 Bart Oldeman +# +# This file is triple-licensed under GPLv2 (see below), MIT, and +# BSD three-clause licenses. +# +# 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://vscentrum.be/nl/en), +# the Hercules foundation (http://www.herculesstichting.be/in_English) +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). +# +# http://github.com/hpcugent/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 . +## +""" +EasyBuild support for PGI compiler toolchain. + +@author: Bart Oldeman (McGill University, Calcul Quebec, Compute Canada) +""" + +from easybuild.toolchains.compiler.pgi import Pgi +from easybuild.toolchains.mpi.mvapich2 import Mvapich2 + +class PgiToolchain(Pgi, Mvapich2): + """Simple toolchain with just the PGI compilers.""" + NAME = 'pgimvapich2'