2023-01-19 06:30:17 +08:00
|
|
|
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2016-05-12 12:22:25 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2022-05-29 00:55:44 +08:00
|
|
|
from spack.package import *
|
2022-03-18 07:42:07 +08:00
|
|
|
from spack.pkg.builtin.boost import Boost
|
2015-11-12 04:33:08 +08:00
|
|
|
|
2016-08-10 16:50:00 +08:00
|
|
|
|
2017-08-05 23:15:18 +08:00
|
|
|
class Cleverleaf(CMakePackage):
|
2016-08-10 16:50:00 +08:00
|
|
|
"""CleverLeaf is a hydrodynamics mini-app that extends CloverLeaf with
|
|
|
|
Adaptive Mesh Refinement using the SAMRAI toolkit from Lawrence
|
|
|
|
Livermore National Laboratory. The primary goal of CleverLeaf is
|
|
|
|
to evaluate the application of AMR to the Lagrangian-Eulerian
|
|
|
|
hydrodynamics scheme used by CloverLeaf.
|
2015-11-24 07:58:33 +08:00
|
|
|
"""
|
2015-11-12 04:33:08 +08:00
|
|
|
|
2021-09-02 14:46:27 +08:00
|
|
|
homepage = "https://uk-mac.github.io/CleverLeaf/"
|
2018-07-23 15:00:15 +08:00
|
|
|
git = "https://github.com/UK-MAC/CleverLeaf_ref.git"
|
2015-11-24 07:58:33 +08:00
|
|
|
|
2018-07-23 15:00:15 +08:00
|
|
|
version("develop", branch="develop")
|
2015-11-12 04:33:08 +08:00
|
|
|
|
2017-08-05 23:15:18 +08:00
|
|
|
depends_on("samrai@3.8.0:")
|
|
|
|
depends_on("hdf5+mpi")
|
2022-03-18 07:42:07 +08:00
|
|
|
|
|
|
|
# TODO: replace this with an explicit list of components of Boost,
|
|
|
|
# for instance depends_on('boost +filesystem')
|
|
|
|
# See https://github.com/spack/spack/pull/22303 for reference
|
|
|
|
depends_on(Boost.with_default_variants)
|
2017-08-05 23:15:18 +08:00
|
|
|
depends_on("cmake@3.1:", type="build")
|
2018-07-06 10:54:05 +08:00
|
|
|
|
2020-07-01 00:02:18 +08:00
|
|
|
# The Fujitsu compiler requires the '--linkfortran'
|
|
|
|
# option to combine C++ and Fortran programs.
|
|
|
|
patch("fujitsu_add_link_flags.patch", when="%fj")
|
|
|
|
|
2018-07-06 10:54:05 +08:00
|
|
|
def flag_handler(self, name, flags):
|
|
|
|
if self.spec.satisfies("%intel") and name in ["cppflags", "cxxflags"]:
|
|
|
|
flags.append(self.compiler.cxx11_flag)
|
|
|
|
|
|
|
|
return (None, None, flags)
|