
* fix remaining flake8 errors * imports: sort imports everywhere in Spack We enabled import order checking in #23947, but fixing things manually drives people crazy. This used `spack style --fix --all` from #24071 to automatically sort everything in Spack so PR submitters won't have to deal with it. This should go in after #24071, as it assumes we're using `isort`, not `flake8-import-order` to order things. `isort` seems to be more flexible and allows `llnl` mports to be in their own group before `spack` ones, so this seems like a good switch.
57 lines
1.6 KiB
Python
57 lines
1.6 KiB
Python
# Copyright 2013-2021 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/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}
|