From c2aca6692c97b0b06e9392445bea325b284ed309 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Tue, 27 Mar 2018 13:39:04 +0000 Subject: [PATCH] Introduce golf: compiler toolchain with GCC, OpenBLAS, and FFTW. Since BLACS_MODULE_NAME and SCALAPACK_MODULE_NAME are set to None in this case we need to filter out None for the toolchain definition. --- easybuild/toolchains/golf.py | 40 ++++++++++++++++++++++++++ easybuild/tools/toolchain/toolchain.py | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 easybuild/toolchains/golf.py diff --git a/easybuild/toolchains/golf.py b/easybuild/toolchains/golf.py new file mode 100644 index 0000000000..32ce7ecd42 --- /dev/null +++ b/easybuild/toolchains/golf.py @@ -0,0 +1,40 @@ +## +# Copyright 2013-2018 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 . +## +""" +EasyBuild support for golf compiler toolchain (includes GCC, OpenBLAS, LAPACK, and FFTW). + +:author: Kenneth Hoste (Ghent University) +:author: Bart Oldeman (McGill University, Calcul Quebec, Compute Canada) +""" + +from easybuild.toolchains.gcc import GccToolchain +from easybuild.toolchains.fft.fftw import Fftw +from easybuild.toolchains.linalg.openblas import OpenBLAS + + +class Golf(GccToolchain, OpenBLAS, Fftw): + """Compiler toolchain with GCC, OpenBLAS, and FFTW.""" + NAME = 'golf' + SUBTOOLCHAIN = GccToolchain.NAME diff --git a/easybuild/tools/toolchain/toolchain.py b/easybuild/tools/toolchain/toolchain.py index 18e5f8ed82..0ca244d131 100644 --- a/easybuild/tools/toolchain/toolchain.py +++ b/easybuild/tools/toolchain/toolchain.py @@ -412,7 +412,7 @@ def definition(self): var_suff = '_MODULE_NAME' tc_elems = {} for var in dir(self): - if var.endswith(var_suff): + if var.endswith(var_suff) and getattr(self, var) is not None: tc_elems.update({var[:-len(var_suff)]: getattr(self, var)}) self.log.debug("Toolchain definition for %s: %s", self.as_dict(), tc_elems)