diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/fujitsu-ssl2/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/fujitsu-ssl2/package.py | 128 |
1 files changed, 68 insertions, 60 deletions
diff --git a/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py b/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py index cb617301e8..3d5d8f875f 100644 --- a/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py +++ b/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py @@ -42,36 +42,41 @@ class FujitsuSsl2(Package): @property def blas_libs(self): spec = self.spec - sharedlibslist = ["libfj90i", "libfj90f", "libfjsrcinfo", "libfj90rt"] - staticlibslist = [] - + libslist = [] if spec.target == "a64fx": # Build with SVE support - sharedlibslist += ["libfjlapacksve"] + 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 - staticlibslist = ["libssl2mtexsve"] + libslist.append("libssl2mtex.a") + libslist.append("libssl2mt.a") - staticlibslist += ["libssl2mtsve", "libfj90rt2", "libfj90fmt_sve"] + libslist.append("libfj90i.so") - else: # Build with NEON support - sharedlibslist += ["libfjlapack"] + if spec.target == "a64fx": # Build with SVE support + libslist.append("libfj90fmt_sve.a") + else: + libslist.append("libfj90fmt.a") - if "+parallel" in spec: # parallel - staticlibslist = ["libssl2mtex"] + libslist.extend(["libfj90f.a", "libfjsrcinfo.a", "libfj90rt.so"]) - staticlibslist += [ - "libssl2mt", - "libfj90rt2", - "libfj90fmt" - ] + libspath = find(self.prefix.lib64, libslist, recursive=False) + libs = LibraryList(libspath) - sharedlibs = find_libraries( - sharedlibslist, self.prefix.lib64, shared=True, recursive=False - ) - staticlibs = find_libraries( - staticlibslist, self.prefix.lib64, shared=False, recursive=False - ) - libs = sharedlibs + staticlibs return libs @property @@ -81,53 +86,56 @@ class FujitsuSsl2(Package): @property def scalapack_libs(self): spec = self.spec - sharedlibslist = [ - "libmpi_usempi_ignore_tkr", - "libmpi_mpifh", - "libfj90i", - "libfj90f", - "libfjsrcinfo", - "libfj90rt", - ] - staticlibslist = [] - + libslist = [] if spec.target == "a64fx": # Build with SVE support - sharedlibslist += ["libfjscalapacksve", "libfjlapacksve"] - + libslist.append("libfjscalapacksve.so") if "+parallel" in spec: # parallel - staticlibslist = ["libssl2mtexsve"] + libslist.append("libfjlapackexsve.so") + else: + libslist.append("libfjlapacksve.so") + libslist.append("libscalapacksve.a") - staticlibslist += [ - "libscalapacksve", - "libssl2mtsve", - "libfj90rt2", - "libfj90fmt_sve", - ] + else: + libslist.append("libfjscalapack.so") + if "+parallel" in spec: # parallel + libslist.append("libfjlapackex.so") + else: + libslist.append("libfjlapack.so") + libslist.append("libscalapack.a") - else: # Build with NEON support - sharedlibslist += ["libfjscalapack", "libfjlapack"] + 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 - staticlibslist = ["libssl2mtex"] + libslist.append("libssl2mtexsve.a") + libslist.append("libssl2mtsve.a") + else: + if "+parallel" in spec: # parallel + libslist.append("libssl2mtex.a") + libslist.append("libssl2mt.a") - staticlibslist += [ - "libscalapack", - "libssl2mt", - "libfj90rt2", - "libfj90fmt" - ] + 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) - sharedlibs = find_libraries( - sharedlibslist, self.prefix.lib64, shared=True, recursive=False - ) - staticlibs = find_libraries( - staticlibslist, self.prefix.lib64, shared=False, recursive=False - ) - libs = sharedlibs + staticlibs return libs def setup_dependent_build_environment(self, env, dependent_spec): - self.setup_run_environment(env) - env.append_flags("fcc_ENV", "-lm -lrt -lpthread -lelf -lz -ldl") - env.append_flags("FCC_ENV", "-lm -lrt -lpthread -lelf -lz -ldl") + 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") |