Skip to content

Commit c1b51d6

Browse files
authored
fujitsu frontistr: New package (#28514)
* fujitsu-frontistr: new package. * Add frontistr@5.3 Add fujitsu-frontistr static variant style fix. * update copyrigght year.
1 parent e97bffc commit c1b51d6

2 files changed

Lines changed: 73 additions & 12 deletions

File tree

var/spack/repos/builtin/packages/frontistr/package.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,9 @@
77
from spack import *
88

99

10-
class Frontistr(CMakePackage):
11-
"""Open-Source Large-Scale Parallel FEM Program for
12-
Nonlinear Structural Analysis"""
13-
14-
homepage = "https://www.frontistr.com/"
15-
git = "https://gitlab.com/FrontISTR-Commons/FrontISTR.git"
16-
maintainers = ['hiroshi.okuda', 'kgoto', 'morita', 'inagaki', 'michioga']
17-
18-
version('5.1.1', tag='v5.1.1')
19-
version('5.1', tag='v5.1')
20-
version('5.0', tag='v5.0')
21-
version('master', tag='master')
10+
class FrontistrBase(CMakePackage):
11+
"""Base class for building Frontistr, shared with the Fujitsu optimized version
12+
of the package in the 'fujitsu-frontistr' package."""
2213

2314
variant('build_type', default='RELEASE',
2415
description='CMake build type',
@@ -38,5 +29,26 @@ def cmake_args(self):
3829
define = CMakePackage.define
3930
cmake_args = [
4031
define('WITH_ML', True),
32+
define('REFINER_INCLUDE_PATH',
33+
self.spec['revocap-refiner'].prefix.include),
34+
define('REFINER_LIBRARIES',
35+
join_path(self.spec['revocap-refiner'].prefix.lib,
36+
'libRcapRefiner.a'))
4137
]
4238
return cmake_args
39+
40+
41+
class Frontistr(FrontistrBase):
42+
"""Open-Source Large-Scale Parallel FEM Program for
43+
Nonlinear Structural Analysis"""
44+
45+
homepage = "https://www.frontistr.com/"
46+
git = "https://gitlab.com/FrontISTR-Commons/FrontISTR.git"
47+
maintainers = ['hiroshi.okuda', 'kgoto', 'morita', 'inagaki', 'michioga']
48+
49+
version('5.3', tag='v5.3')
50+
version('5.2', tag='v5.2')
51+
version('5.1.1', tag='v5.1.1')
52+
version('5.1', tag='v5.1')
53+
version('5.0', tag='v5.0')
54+
version('master', tag='master')
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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

Comments
 (0)