summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pavel <rspavel@lanl.gov>2019-06-12 15:46:14 -0600
committerChristoph Junghans <junghans@lanl.gov>2019-06-12 15:46:14 -0600
commita32382e78772da78058d7560e33046d8d9617389 (patch)
tree90948a63dea7863680a5d9c057aae19f634e6a5e
parent4e812090c00a3ec2775d5123a542fd670626de05 (diff)
downloadspack-a32382e78772da78058d7560e33046d8d9617389.tar.gz
spack-a32382e78772da78058d7560e33046d8d9617389.tar.bz2
spack-a32382e78772da78058d7560e33046d8d9617389.tar.xz
spack-a32382e78772da78058d7560e33046d8d9617389.zip
Fixed Flecsi Backend Dependencies (#11679)
Fixed logic behind flecsi backends to not require legion for an mpi build and to better support required combinations. Also made graphviz support and tutorial building optional
-rw-r--r--var/spack/repos/builtin/packages/flecsi/package.py42
1 files changed, 28 insertions, 14 deletions
diff --git a/var/spack/repos/builtin/packages/flecsi/package.py b/var/spack/repos/builtin/packages/flecsi/package.py
index ce2a867cf5..33a148a4c9 100644
--- a/var/spack/repos/builtin/packages/flecsi/package.py
+++ b/var/spack/repos/builtin/packages/flecsi/package.py
@@ -21,30 +21,44 @@ class Flecsi(CMakePackage):
git = "https://github.com/laristra/flecsi.git"
version('develop', branch='master', submodules=True)
+ variant('backend', default='mpi', values=('serial', 'mpi', 'legion'),
+ description="Backend to use for distributed memory")
+ variant('graphviz', default=False,
+ description='Enable GraphViz Support')
+ variant('tutorial', default=False,
+ description='Build FleCSI Tutorials')
- variant('mpi', default=True,
- description='Build on top of mpi conduit for mpi inoperability')
- variant('legion', default=False)
-
- depends_on("cmake@3.1:")
- depends_on("mpi")
- depends_on("gasnet~pshm")
- depends_on("legion")
- depends_on("legion+shared", when='~mpi')
- depends_on("legion+shared+mpi", when='+mpi')
- depends_on("boost@1.59.0 cxxstd=11 +program_options")
+ depends_on("cmake@3.1:", type='build')
+ depends_on('mpi', when='backend=mpi')
+ depends_on('mpi', when='backend=legion')
+ depends_on("gasnet~pshm", when='backend=legion')
+ depends_on("legion+shared+mpi", when='backend=legion')
+ depends_on("boost@1.59.0: cxxstd=11 +program_options")
depends_on("metis@5.1.0:")
depends_on("parmetis@4.0.3:")
depends_on("caliper")
depends_on("gotcha")
- depends_on("graphviz")
+ depends_on("graphviz", when='+graphviz')
+ depends_on('python@3.0:', when='+tutorial')
def cmake_args(self):
- options = ['-DCMAKE_BUILD_TYPE=debug -DFLECSI_RUNTIME_MODEL=mpi']
+ options = ['-DCMAKE_BUILD_TYPE=debug']
- if '~mpi' in self.spec:
+ if self.spec.variants['backend'].value == 'legion':
+ options.extend(['-DFLECSI_RUNTIME_MODEL=legion'])
+ elif self.spec.variants['backend'].value == 'mpi':
+ options.extend(['-DFLECSI_RUNTIME_MODEL=mpi'])
+ else:
+ options.extend(['-DFLECSI_RUNTIME_MODEL=serial'])
options.extend([
'-DENABLE_MPI=OFF',
])
+ if '+tutorial' in self.spec:
+ options.extend(['-DENABLE_FLECSIT=ON'])
+ options.extend(['-DENABLE_FLECSI_TUTORIAL=ON'])
+ else:
+ options.extend(['-DENABLE_FLECSIT=OFF'])
+ options.extend(['-DENABLE_FLECSI_TUTORIAL=OFF'])
+
return options