diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2020-09-05 10:40:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-05 10:40:52 +0200 |
commit | ba257914b30f53600f55019a4e4802fcd969bcda (patch) | |
tree | 79421496677868208327bc51303b876dc58201a0 | |
parent | ea5717171259fc3ab27d3c681cc2ef29ba560c6e (diff) | |
download | spack-ba257914b30f53600f55019a4e4802fcd969bcda.tar.gz spack-ba257914b30f53600f55019a4e4802fcd969bcda.tar.bz2 spack-ba257914b30f53600f55019a4e4802fcd969bcda.tar.xz spack-ba257914b30f53600f55019a4e4802fcd969bcda.zip |
fujitsu: added new package (#18021)
The package is at the moment not installable, just detectable.
Co-authored-by: Toyohisa Kameyama <kameyama@riken.jp>
-rw-r--r-- | var/spack/repos/builtin/packages/fj/package.py | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/fj/package.py b/var/spack/repos/builtin/packages/fj/package.py new file mode 100644 index 0000000000..592960ebea --- /dev/null +++ b/var/spack/repos/builtin/packages/fj/package.py @@ -0,0 +1,55 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +import re + +import llnl.util.tty as tty +import spack.compiler +import spack.util.executable + + +class Fj(Package): + """The Fujitsu compiler system is a high performance, production quality + code generation tool designed for high performance parallel + computing workloads. + """ + + homepage = "https://www.fujitsu.com/global/us" + + maintainers = ['t-karatsu'] + + def install(self, spec, prefix): + raise InstallError( + 'Fujitsu compilers are not installable yet, but can be ' + 'detected on a system where they are supplied by vendor' + ) + + executables = ['^fcc', '^FCC', '^frt'] + + @classmethod + def determine_version(cls, exe): + version_regex = re.compile(r'\((?:FCC|FRT)\) ([a-z\d.]+)') + try: + output = spack.compiler.get_compiler_version_output( + exe, '--version' + ) + match = version_regex.search(output) + if match: + return match.group(1) + except spack.util.executable.ProcessError: + pass + except Exception as e: + tty.debug(e) + + @classmethod + def determine_variants(cls, exes, version_str): + compilers = {} + for exe in exes: + if 'fcc' in exe: + compilers['c'] = exe + if 'FCC' in exe: + compilers['cxx'] = exe + if 'frt' in exe: + compilers['fortran'] = exe + return '', {'compilers': compilers} |