|
| 1 | +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other |
| 2 | +# Spack Project Developers. See the top-level COPYRIGHT file for details. |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: (Apache-2.0 OR MIT) |
| 5 | + |
| 6 | + |
| 7 | +from spack import * |
| 8 | +from spack.pkg.builtin.frontistr import FrontistrBase |
| 9 | + |
| 10 | + |
| 11 | +class FujitsuFrontistr(FrontistrBase): |
| 12 | + """This is a fork repository of the FrontISTR tuned for A64FX.""" |
| 13 | + |
| 14 | + _name = 'fujitsu-frontistr' |
| 15 | + homepage = "https://www.frontistr.com/" |
| 16 | + url = "https://github.com/fujitsu/FrontISTR/archive/refs/tags/v5.2_tuned.tar.gz" |
| 17 | + git = "https://github.com/fujitsu/FrontISTR" |
| 18 | + maintainers = ['kinagaki-fj', 'kinagaki', 'm-shunji'] |
| 19 | + |
| 20 | + version('master', branch='fj-master') |
| 21 | + version('5.2', sha256='ebf73a96c33ae7c9e616c99f9ce07ec90d802764dbf6abf627b0083c3bbd2b2e') |
| 22 | + version('5.0', sha256='7a3a2dd0f834048fb71cc254c9da6c2637fb23110e79b5efaf208d6f69a5b30a') |
| 23 | + |
| 24 | + variant('static', default=True, description='Build with static linkage') |
| 25 | + depends_on('metis ~shared', when='+static') |
| 26 | + depends_on('mumps ~shared', when='+static') |
| 27 | + depends_on('trilinos ~shared', when='+static') |
| 28 | + |
| 29 | + def url_for_version(self, version): |
| 30 | + url = "https://github.com/fujitsu/FrontISTR/archive/refs/tags/v{0}_tuned.tar.gz" |
| 31 | + return url.format(version) |
| 32 | + |
| 33 | + def cmake_args(self): |
| 34 | + define = CMakePackage.define |
| 35 | + args = super(FujitsuFrontistr, self).cmake_args() |
| 36 | + if self.spec.satisfies('%fj'): |
| 37 | + args.extend([ |
| 38 | + define('CMAKE_C_FLAGS', |
| 39 | + '-Kcmodel=large -Nlst=t -Kocl -Kfast -Kzfill -Koptmsg=2'), |
| 40 | + define('CMAKE_CXX_FLAGS', |
| 41 | + '-Kcmodel=large -Nlst=t -Kocl -Kfast -Kzfill -Koptmsg=2'), |
| 42 | + define('CMAKE_Fortran_FLAGS', |
| 43 | + '-Kcmodel=large -Nlst=t -Kocl -Kfast -Kzfill -Koptmsg=2'), |
| 44 | + define('CMAKE_Fortran_MODDIR_FLAG', 'M'), |
| 45 | + define('OpenMP_C_FLAGS', '-Kopenmp'), |
| 46 | + define('OpenMP_CXX_FLAGS', '-Kopenmp'), |
| 47 | + define('OpenMP_Fortran_FLAGS', '-Kopenmp') |
| 48 | + ]) |
| 49 | + return args |
0 commit comments