2021-01-02 15:10:28 +08:00
|
|
|
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
|
2019-08-28 04:50:31 +08:00
|
|
|
# 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"
|
|
|
|
|
2020-08-13 01:49:30 +08:00
|
|
|
version('master', branch='master', submodules=True, preferred=True)
|
2019-08-28 04:50:31 +08:00
|
|
|
|
2020-08-13 01:49:30 +08:00
|
|
|
variant('test', default=True, description='Adding tests')
|
|
|
|
|
|
|
|
depends_on('cmake@3.15:', type='build')
|
2021-07-14 06:22:55 +08:00
|
|
|
depends_on('boost@1.70.0: cxxstd=17 +program_options')
|
2019-08-28 04:50:31 +08:00
|
|
|
depends_on('mpi')
|
2020-08-13 01:49:30 +08:00
|
|
|
depends_on('hdf5+hl@1.8:')
|
2021-07-14 06:22:55 +08:00
|
|
|
depends_on('flecsi@1.4.2 +external_cinch backend=mpi')
|
2019-08-28 04:50:31 +08:00
|
|
|
depends_on('gsl')
|
2020-08-13 01:49:30 +08:00
|
|
|
depends_on('googletest', when='+test')
|
|
|
|
depends_on("pkgconfig", type='build')
|
|
|
|
|
|
|
|
def setup_run_environment(self, env):
|
|
|
|
env.set('HDF5_ROOT', self.spec['hdf5'].prefix)
|
2019-08-28 04:50:31 +08:00
|
|
|
|
|
|
|
def cmake_args(self):
|
|
|
|
options = ['-DCMAKE_BUILD_TYPE=debug']
|
2020-08-13 01:49:30 +08:00
|
|
|
options.append('-DENABLE_UNIT_TESTS=ON')
|
|
|
|
options.append('-DENABLE_DEBUG=OFF')
|
|
|
|
options.append('-DLOG_STRIP_LEVEL=1')
|
|
|
|
options.append('-DENABLE_UNIT_TESTS=ON')
|
|
|
|
options.append('-DENABLE_DEBUG_TREE=OFF')
|
|
|
|
# add option to build the tests
|
2019-08-28 04:50:31 +08:00
|
|
|
return options
|