Adding FleCSPH package. (#12525)

* Adding flecsph package

* Correcting header

* Boost version update

* Correcting Flake8 errors

* Correcting headers
This commit is contained in:
Julien Loiseau 2019-08-27 14:50:31 -06:00 committed by Christoph Junghans
parent 72ad072422
commit 02bb1d5ec6
2 changed files with 47 additions and 0 deletions

View File

@ -21,6 +21,8 @@ class Flecsi(CMakePackage):
git = 'https://github.com/laristra/flecsi.git'
version('develop', branch='master', submodules=False)
version('flecsph', branch='feature/flecsph', submodules=False)
variant('backend', default='mpi', values=('serial', 'mpi', 'legion'),
description='Backend to use for distributed memory')
variant('caliper', default=False,
@ -51,6 +53,16 @@ def cmake_args(self):
options = ['-DCMAKE_BUILD_TYPE=debug']
options.append('-DCINCH_SOURCE_DIR=' + self.spec['cinch'].prefix)
# FleCSI for FleCSPH flags
if self.spec.satisfies('@flecsph:'):
options.append('-DENABLE_MPI=ON')
options.append('-DENABLE_OPENMP=ON')
options.append('-DCXX_CONFORMANCE_STANDARD=c++17')
options.append('-DFLECSI_RUNTIME_MODEL=mpi')
options.append('-DENABLE_FLECSIT=OFF')
options.append('-DENABLE_FLECSI_TUTORIAL=OFF')
return options
if self.spec.variants['backend'].value == 'legion':
options.append('-DFLECSI_RUNTIME_MODEL=legion')
elif self.spec.variants['backend'].value == 'mpi':

View File

@ -0,0 +1,35 @@
# Copyright 2013-2019 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 Flecsph(CMakePackage):
"""FleCSPH is a multi-physics compact application that exercises FleCSI
parallel data structures for tree-based particle methods. In particular,
FleCSPH implements a smoothed-particle hydrodynamics (SPH) solver for
the solution of Lagrangian problems in astrophysics and cosmology. FleCSPH
includes support for gravitational forces using the fast multipole method
(FMM)."""
homepage = "http://flecsi.lanl.com"
git = "https://github.com/laristra/flecsph.git"
version('develop', branch='master', submodules=True)
depends_on('cmake@3.1:', type='build')
depends_on('boost@1.59.0: cxxstd=11 +program_options')
depends_on('mpi')
depends_on('hdf5@1.10.5 +mpi')
depends_on('flecsi@flecsph backend=mpi')
depends_on('gsl')
def cmake_args(self):
options = ['-DCMAKE_BUILD_TYPE=debug']
options.append('-DENABLE_MPI=ON')
options.append('-DENABLE_OPENMP=ON')
options.append('-DENABLE_CLOG=ON')
options.append('-DCXX_CONFORMANCE_STANDARD=c++17')
return options