1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
# 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)
from spack import *
class FujitsuSsl2(Package):
"""Fujitsu SSL2 (Scientific Subroutine Library II) is Math library
for Fujitsu compiler.
Fujitsu SSL2 implementation only for Fujitsu compiler.
Fujitsu SSL2 provides the function of blas, lapack and scalapack.
"""
homepage = "https://www.fujitsu.com/us/"
has_code = False
variant("parallel", default=True, description="Build with thread-parallel versions")
conflicts("%arm")
conflicts("%cce")
conflicts("%apple-clang")
conflicts("%clang")
conflicts("%gcc")
conflicts("%intel")
conflicts("%nag")
conflicts("%pgi")
conflicts("%xl")
conflicts("%xl_r")
provides("blas")
provides("lapack")
provides("scalapack")
def install(self, spec, prefix):
raise InstallError(
"Fujitsu SSL2 is not installable; it is vendor supplied \
You need to specify it as an external package in packages.yaml"
)
@property
def blas_libs(self):
spec = self.spec
libslist = []
if spec.target == "a64fx": # Build with SVE support
if "+parallel" in spec: # parallel
libslist.append("libfjlapackexsve.so")
else:
libslist.append("libfjlapacksve.so")
else:
if "+parallel" in spec: # parallel
libslist.append("libfjlapackex.so")
else:
libslist.append("libfjlapack.so")
libslist.append("libfj90rt2.a")
if spec.target == "a64fx": # Build with SVE support
if "+parallel" in spec: # parallel
libslist.append("libssl2mtexsve.a")
libslist.append("libssl2mtsve.a")
else:
if "+parallel" in spec: # parallel
libslist.append("libssl2mtex.a")
libslist.append("libssl2mt.a")
libslist.append("libfj90i.so")
if spec.target == "a64fx": # Build with SVE support
libslist.append("libfj90fmt_sve.a")
else:
libslist.append("libfj90fmt.a")
libslist.extend(["libfj90f.a", "libfjsrcinfo.a", "libfj90rt.so"])
libspath = find(self.prefix.lib64, libslist, recursive=False)
libs = LibraryList(libspath)
return libs
@property
def lapack_libs(self):
return self.blas_libs
@property
def scalapack_libs(self):
spec = self.spec
libslist = []
if spec.target == "a64fx": # Build with SVE support
libslist.append("libfjscalapacksve.so")
if "+parallel" in spec: # parallel
libslist.append("libfjlapackexsve.so")
else:
libslist.append("libfjlapacksve.so")
libslist.append("libscalapacksve.a")
else:
libslist.append("libfjscalapack.so")
if "+parallel" in spec: # parallel
libslist.append("libfjlapackex.so")
else:
libslist.append("libfjlapack.so")
libslist.append("libscalapack.a")
libslist.extend(
["libmpi_usempi_ignore_tkr.so", "libmpi_mpifh.so", "libfj90rt2.a"]
)
if spec.target == "a64fx": # Build with SVE support
if "+parallel" in spec: # parallel
libslist.append("libssl2mtexsve.a")
libslist.append("libssl2mtsve.a")
else:
if "+parallel" in spec: # parallel
libslist.append("libssl2mtex.a")
libslist.append("libssl2mt.a")
libslist.append("libfj90i.so")
if spec.target == "a64fx": # Build with SVE support
libslist.append("libfj90fmt_sve.a")
else:
libslist.append("libfj90fmt.a")
libslist.extend(["libfj90f.a", "libfjsrcinfo.a", "libfj90rt.so"])
libspath = find(self.prefix.lib64, libslist, recursive=False)
libs = LibraryList(libspath)
return libs
def setup_dependent_build_environment(self, env, dependent_spec):
path = self.prefix.include
env.append_flags(
"fcc_ENV", "-lm -lrt -lpthread -lelf -lz -ldl -idirafter " + path
)
env.append_flags(
"FCC_ENV", "-lm -lrt -lpthread -lelf -lz -ldl -idirafter " + path
)
env.append_flags("FORT90C", "-lm -lrt -lpthread -lelf -lz -ldl")
|