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
|
# 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)
from spack import *
import os
class FujitsuMpi(Package):
"""Fujitsu MPI implementation only for Fujitsu compiler."""
homepage = "https://www.fujitsu.com/us/"
conflicts('%arm')
conflicts('%cce')
conflicts('%apple-clang')
conflicts('%clang')
conflicts('%gcc')
conflicts('%intel')
conflicts('%nag')
conflicts('%pgi')
conflicts('%xl')
conflicts('%xl_r')
provides('mpi@3.1:')
def install(self, spec, prefix):
raise InstallError(
'Fujitsu MPI is not installable; it is vendor supplied')
@property
def headers(self):
hdrs = find_headers('mpi', self.prefix.include, recursive=True)
hdrs.directories = os.path.dirname(hdrs[0])
return hdrs or None
@property
def libs(self):
query_parameters = self.spec.last_query.extra_parameters
libraries = ['libmpi']
if 'cxx' in query_parameters:
libraries = ['libmpi_cxx'] + libraries
return find_libraries(
libraries, root=self.prefix, shared=True, recursive=True
)
def setup_dependent_package(self, module, dependent_spec):
self.spec.mpicc = self.prefix.bin.mpifcc
self.spec.mpicxx = self.prefix.bin.mpiFCC
self.spec.mpif77 = self.prefix.bin.mpifrt
self.spec.mpifc = self.prefix.bin.mpifrt
def setup_dependent_build_environment(self, env, dependent_spec):
self.setup_run_environment(env)
def setup_run_environment(self, env):
# Because MPI are both compilers and runtimes, we set up the compilers
# as part of run environment
env.set('MPICC', self.prefix.bin.mpifcc)
env.set('MPICXX', self.prefix.bin.mpiFCC)
env.set('MPIF77', self.prefix.bin.mpifrt)
env.set('MPIF90', self.prefix.bin.mpifrt)
|