xolotl: new package (#48876)
* Adding xolotl package * [@spackbot] updating style on behalf of PhilipFackler * Removing redundant text * Add blank line * Update var/spack/repos/builtin/packages/xolotl/package.py Co-authored-by: Wouter Deconinck <wdconinc@gmail.com> * Update var/spack/repos/builtin/packages/xolotl/package.py Co-authored-by: Wouter Deconinck <wdconinc@gmail.com> * Switch to CudaPackage and remove source dir from runtime env * [@spackbot] updating style on behalf of PhilipFackler --------- Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
This commit is contained in:
parent
933a1a5cd9
commit
f96b6eac2b
65
var/spack/repos/builtin/packages/xolotl/package.py
Normal file
65
var/spack/repos/builtin/packages/xolotl/package.py
Normal file
@ -0,0 +1,65 @@
|
||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Xolotl(CMakePackage, CudaPackage):
|
||||
"""Xolotl is a high-performance computing code using
|
||||
advection-reaction-diffusion (ADR) kinetic rate theory to model the
|
||||
time evolution of the divertor material in next generation tokamaks,
|
||||
like ITER, as well as nuclear fuel in fission reactors."""
|
||||
|
||||
homepage = "https://github.com/ORNL-Fusion/xolotl"
|
||||
url = "https://github.com/ORNL-Fusion/xolotl/archive/refs/tags/v3.1.0.tar.gz"
|
||||
git = "https://github.com/ORNL-Fusion/xolotl.git"
|
||||
|
||||
# notify when the package is updated.
|
||||
maintainers("sblondel", "PhilipFackler")
|
||||
|
||||
license("BSD-3-Clause", checked_by="PhilipFackler")
|
||||
|
||||
version("3.1.0", sha256="68a495ab0c3efb495189f73474d218eb591099b90d52d427ac868b63e8fc2ee8")
|
||||
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("mpi")
|
||||
depends_on("boost +log +program_options")
|
||||
depends_on("hdf5 +mpi")
|
||||
|
||||
variant("int64", default=True, description="Use 64-bit indices")
|
||||
variant("openmp", default=False, description="Activates OpenMP backend")
|
||||
|
||||
conflicts("+cuda", when="cuda_arch=none")
|
||||
conflicts("+openmp", when="+cuda", msg="Can't use both OpenMP and CUDA")
|
||||
|
||||
depends_on("petsc ~fortran +kokkos")
|
||||
depends_on("petsc +int64", when="+int64")
|
||||
depends_on("petsc +openmp", when="+openmp")
|
||||
|
||||
depends_on("plsm@2.0.4", when="@3.1.0")
|
||||
depends_on("plsm")
|
||||
depends_on("plsm +int64", when="+int64")
|
||||
depends_on("plsm +openmp", when="+openmp")
|
||||
|
||||
for cuda_arch in CudaPackage.cuda_arch_values:
|
||||
depends_on(f"petsc+cuda cuda_arch={cuda_arch}", when=f"+cuda cuda_arch={cuda_arch}")
|
||||
depends_on(f"plsm+cuda cuda_arch={cuda_arch}", when=f"+cuda cuda_arch={cuda_arch}")
|
||||
|
||||
variant("papi", default=False, description="Activates PAPI perfHandler")
|
||||
depends_on("papi", when="+papi")
|
||||
|
||||
variant("vtkm", default=False, description="Activates VTK-m vizHandler")
|
||||
depends_on("vtk-m", when="+vtkm")
|
||||
|
||||
depends_on("boost +test", type="test")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [self.define("BUILD_TESTING", self.run_tests)]
|
||||
|
||||
spec = self.spec
|
||||
if "+vtk-m" in spec:
|
||||
args.append(self.define("VTKm_DIR", spec["vtk-m"].prefix))
|
||||
|
||||
return args
|
Loading…
Reference in New Issue
Block a user