charm: provide MPI (#8647)
* Charm: provide MPI * add mpicc wrappers * clarify MPI comment
This commit is contained in:
parent
79b407f59e
commit
4df673e401
@ -92,6 +92,25 @@ class Charm(Package):
|
||||
variant("production", default=True, description="Build charm++ with all optimizations")
|
||||
variant("tracing", default=False, description="Enable tracing modules")
|
||||
|
||||
# FIXME: backend=mpi also provides mpi, but spack does not support
|
||||
# depends_on("mpi") and provides("mpi") in the same package currently.
|
||||
for b in ['multicore', 'netlrts', 'verbs', 'gni', 'ofi', 'pami',
|
||||
'pamilrts']:
|
||||
provides('mpi@2', when='@6.7.1: build-target=AMPI backend={0}'.format(b))
|
||||
provides('mpi@2', when='@6.7.1: build-target=LIBS backend={0}'.format(b))
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
|
||||
spack_env.set('MPICC', join_path(self.prefix.bin, 'ampicc'))
|
||||
spack_env.set('MPICXX', join_path(self.prefix.bin, 'ampicxx'))
|
||||
spack_env.set('MPIF77', join_path(self.prefix.bin, 'ampif77'))
|
||||
spack_env.set('MPIF90', join_path(self.prefix.bin, 'ampif90'))
|
||||
|
||||
def setup_dependent_package(self, module, dependent_spec):
|
||||
self.spec.mpicc = join_path(self.prefix.bin, 'ampicc')
|
||||
self.spec.mpicxx = join_path(self.prefix.bin, 'ampicxx')
|
||||
self.spec.mpifc = join_path(self.prefix.bin, 'ampif90')
|
||||
self.spec.mpif77 = join_path(self.prefix.bin, 'ampif77')
|
||||
|
||||
depends_on("mpi", when="backend=mpi")
|
||||
depends_on("papi", when="+papi")
|
||||
depends_on("cuda", when="+cuda")
|
||||
|
Loading…
Reference in New Issue
Block a user