diff options
author | Alan Williams <william@sandia.gov> | 2023-01-31 13:42:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 12:42:43 -0800 |
commit | 51702a725bedf4235cc3516d65828e71bb5cb852 (patch) | |
tree | 57d38396c3c0265fae0c11a192c74f6f30963151 | |
parent | 931c0edaf4337b05905deff9660b9241ec530d67 (diff) | |
download | spack-51702a725bedf4235cc3516d65828e71bb5cb852.tar.gz spack-51702a725bedf4235cc3516d65828e71bb5cb852.tar.bz2 spack-51702a725bedf4235cc3516d65828e71bb5cb852.tar.xz spack-51702a725bedf4235cc3516d65828e71bb5cb852.zip |
Add trilinos-solvers variant to nalu-wind package. (#35267)
* Add trilinos-solvers variant to nalu-wind package.
This allows nalu-wind to be built against a trilinos installation
which doesn't have amesos2, belos, ifpack2, or muelu enabled, if
the nalu-wind user provides the spec 'nalu-wind@master~trilinos-solvers'
Support for these solver-packages remains on by default.
* Fixed a style issue reported by CI.
* Incorporate change in wording suggested from review comments.
... to clarify that at least one, or both, of hypre and/or
trilinos-solvers must be enabled. The error condition is if
both are disabled.
* That style checker is picky...
* It really did want a trailing comma...
-rw-r--r-- | var/spack/repos/builtin/packages/nalu-wind/package.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/nalu-wind/package.py b/var/spack/repos/builtin/packages/nalu-wind/package.py index 26957c57f2..00864e362d 100644 --- a/var/spack/repos/builtin/packages/nalu-wind/package.py +++ b/var/spack/repos/builtin/packages/nalu-wind/package.py @@ -42,7 +42,8 @@ class NaluWind(CMakePackage, CudaPackage): ) variant("openfast", default=False, description="Compile with OpenFAST support") variant("tioga", default=False, description="Compile with Tioga support") - variant("hypre", default=False, description="Compile with Hypre support") + variant("hypre", default=True, description="Compile with Hypre support") + variant("trilinos-solvers", default=True, description="Compile with Trilinos Solvers support") variant("catalyst", default=False, description="Compile with Catalyst support") variant("fftw", default=False, description="Compile with FFTW support") variant("boost", default=False, description="Enable Boost integration") @@ -52,7 +53,7 @@ class NaluWind(CMakePackage, CudaPackage): depends_on("yaml-cpp@0.5.3:") depends_on( "trilinos@13:" - "+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost" + "+exodus+tpetra+zoltan+stk+boost" "~superlu-dist~superlu+hdf5+shards~hypre+gtest" ) depends_on("trilinos~cuda~wrapper", when="~cuda") @@ -62,6 +63,11 @@ class NaluWind(CMakePackage, CudaPackage): depends_on("openfast@2.6.0: +cxx", when="+openfast") depends_on("tioga@master:", when="+tioga") depends_on("hypre@2.18.2: ~int64+mpi~superlu-dist", when="+hypre") + depends_on("trilinos+muelu+belos+amesos2+ifpack2", when="+trilinos-solvers") + conflicts( + "~hypre~trilinos-solvers", + msg="nalu-wind: Must enable at least one of the linear-solvers: hypre or trilinos-solvers", + ) depends_on("kokkos-nvcc-wrapper", type="build", when="+cuda") for _arch in CudaPackage.cuda_arch_values: depends_on( @@ -105,6 +111,7 @@ class NaluWind(CMakePackage, CudaPackage): if "+hypre" in spec: args.append(self.define("HYPRE_DIR", spec["hypre"].prefix)) + args.append(self.define_from_variant("ENABLE_TRILINOS_SOLVERS", "trilinos-solvers")) args.append(self.define_from_variant("ENABLE_PARAVIEW_CATALYST", "catalyst")) if "+catalyst" in spec: args.append( |