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...
This commit is contained in:
Alan Williams 2023-01-31 13:42:43 -07:00 committed by GitHub
parent 931c0edaf4
commit 51702a725b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,8 @@ class NaluWind(CMakePackage, CudaPackage):
) )
variant("openfast", default=False, description="Compile with OpenFAST support") variant("openfast", default=False, description="Compile with OpenFAST support")
variant("tioga", default=False, description="Compile with Tioga 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("catalyst", default=False, description="Compile with Catalyst support")
variant("fftw", default=False, description="Compile with FFTW support") variant("fftw", default=False, description="Compile with FFTW support")
variant("boost", default=False, description="Enable Boost integration") 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("yaml-cpp@0.5.3:")
depends_on( depends_on(
"trilinos@13:" "trilinos@13:"
"+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost" "+exodus+tpetra+zoltan+stk+boost"
"~superlu-dist~superlu+hdf5+shards~hypre+gtest" "~superlu-dist~superlu+hdf5+shards~hypre+gtest"
) )
depends_on("trilinos~cuda~wrapper", when="~cuda") 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("openfast@2.6.0: +cxx", when="+openfast")
depends_on("tioga@master:", when="+tioga") depends_on("tioga@master:", when="+tioga")
depends_on("hypre@2.18.2: ~int64+mpi~superlu-dist", when="+hypre") 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") depends_on("kokkos-nvcc-wrapper", type="build", when="+cuda")
for _arch in CudaPackage.cuda_arch_values: for _arch in CudaPackage.cuda_arch_values:
depends_on( depends_on(
@ -105,6 +111,7 @@ def cmake_args(self):
if "+hypre" in spec: if "+hypre" in spec:
args.append(self.define("HYPRE_DIR", spec["hypre"].prefix)) 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")) args.append(self.define_from_variant("ENABLE_PARAVIEW_CATALYST", "catalyst"))
if "+catalyst" in spec: if "+catalyst" in spec:
args.append( args.append(