130 const auto add_bool = [&](
const std::string_view capability,
133 {
return add(capability, value, doc); };
134 const auto add_int = [&](
const std::string_view capability,
137 {
return add(capability, value, doc); };
138 const auto add_string = [&](
const std::string_view capability,
139 const std::string_view value,
141 {
return add(capability, std::string(value), doc); };
144 const auto have = [&](
const std::string & capability,
const std::string & doc) ->
Capability &
145 {
return add_bool(capability,
true, doc +
" is available."); };
146 const auto missing = [&](
const std::string & capability,
147 const std::string & doc,
149 {
return add_bool(capability,
false, doc +
" is not available. " +
help); };
151 const auto have_version = [&](
const std::string & capability,
152 const std::string & doc,
154 {
return add_string(capability, version, doc +
" version " + version +
" is available."); };
155 const auto petsc_missing = [&](
const std::string & capability,
159 capability,
false, doc +
" is not available. Check your PETSc configure options.");
161 const auto libmesh_missing = [&](
const std::string & capability,
162 const std::string & doc,
163 const std::string & config_option) ->
Capability &
165 return add_bool(capability,
167 doc +
" is not available. It is controlled by the `" + config_option +
168 "` libMesh configure option.");
172 const auto doc =
"LibTorch machine learning and parallel tensor algebra library";
173#ifdef MOOSE_LIBTORCH_ENABLED
174 add_string(
"libtorch", TORCH_VERSION, doc);
179 "https://mooseframework.inl.gov/moose/getting_started/installation/"
180 "install_libtorch.html for "
181 "instructions on how to configure and build moose with libTorch.");
186 const auto doc =
"MFEM finite element library";
187#ifdef MOOSE_MFEM_ENABLED
188 add_string(
"mfem", MFEM_VERSION_STRING, doc);
192 "Install mfem using the scripts/update_and_rebuild_mfem.sh script after "
193 "first running scripts/update_and_rebuild_conduit.sh. Finally, configure "
194 "moose with ./configure --with-mfem");
199 const auto doc =
"New Engineering Material model Library, version 3";
205 "Install neml2 using the scripts/update_and_rebuild_neml2.sh script, then "
206 "configure moose with ./configure --with-neml2 --with-libtorch");
211 const auto doc =
"Embedded CPython interpreter linked into the executable (host "
212 "libpython), enabling the NEML2 eager runtime and other "
213 "embedded-Python features";
215 have(
"embedded_python", doc);
217 missing(
"embedded_python",
219 "Configure moose with ./configure --with-neml2 --with-libtorch, which links "
220 "libpython into the executable.");
225 const auto doc =
"gperftools code performance analysis and profiling library";
226#ifdef HAVE_GPERFTOOLS
227 have(
"gperftools", doc);
229 missing(
"gperftools",
231 "Check https://mooseframework.inl.gov/application_development/profiling.html "
232 "for instructions on profiling MOOSE based applications.");
237 const auto doc =
"libPNG portable network graphics format library";
238#ifdef MOOSE_HAVE_LIBPNG
243 "Install libpng through conda or your distribution and check that it gets "
244 "detected through pkg-config, then reconfigure and rebuild MOOSE.");
249 const auto doc =
"NVIDIA GPU parallel computing platform";
250#ifdef PETSC_HAVE_CUDA
251 const std::string version = QUOTE(PETSC_PKG_CUDA_VERSION_MAJOR)
"." QUOTE(
252 PETSC_PKG_CUDA_VERSION_MINOR)
"." QUOTE(PETSC_PKG_CUDA_VERSION_SUBMINOR);
253 add_string(
"cuda", version, doc);
255 missing(
"cuda", doc,
"Add the CUDA bin directory to your path and rebuild PETSc.");
260 const auto doc =
"AMD GPU parallel computing platform";
261#ifdef PETSC_HAVE_HIPROCM
262 const std::string version = QUOTE(PETSC_PKG_HIP_VERSION_MAJOR)
"." QUOTE(
263 PETSC_PKG_HIP_VERSION_MINOR)
"." QUOTE(PETSC_PKG_HIP_VERSION_SUBMINOR);
264 add_string(
"hip", version, doc);
266 missing(
"hip", doc,
"Add the HIP bin directory to your path and rebuild PETSc.");
271 const auto doc =
"Intel GPU parallel computing platform";
272#ifdef PETSC_HAVE_SYCL
273 const std::string version = QUOTE(PETSC_PKG_SYCL_VERSION_MAJOR)
"." QUOTE(
274 PETSC_PKG_SYCL_VERSION_MINOR)
"." QUOTE(PETSC_PKG_SYCL_VERSION_SUBMINOR);
275 add_string(
"sycl", version, doc);
277 missing(
"sycl", doc,
"Add the SYCL bin directory to your path and rebuild PETSc.");
282 const auto doc =
"Kokkos performance portability programming ecosystem";
283#ifdef MOOSE_KOKKOS_ENABLED
284 const std::string version = QUOTE(PETSC_PKG_KOKKOS_VERSION_MAJOR)
"." QUOTE(
285 PETSC_PKG_KOKKOS_VERSION_MINOR)
"." QUOTE(PETSC_PKG_KOKKOS_VERSION_SUBMINOR);
286 add_string(
"kokkos", version, doc);
290 "Rebuild PETSc with Kokkos support and libMesh. Then, reconfigure MOOSE with "
296 const auto doc =
"Kokkos support for PETSc";
297#ifdef PETSC_HAVE_KOKKOS
298 const std::string version = QUOTE(PETSC_PKG_KOKKOS_VERSION_MAJOR)
"." QUOTE(
299 PETSC_PKG_KOKKOS_VERSION_MINOR)
"." QUOTE(PETSC_PKG_KOKKOS_VERSION_SUBMINOR);
300 add_string(
"petsc_kokkos", version, doc);
303 "petsc_kokkos", doc,
"Rebuild PETSc with Kokkos support, then rebuild libMesh and MOOSE.");
308 const auto doc =
"Intel OneAPI XPU accelerator support";
310 if (torch::xpu::is_available())
313 missing(
"xpu", doc,
"No usable XPU devices have been found.");
315 missing(
"xpu", doc,
"The torch version used to build this app has no XPU support.");
321 MOOSE_AD_MAX_DOFS_PER_ELEM,
322 "MOOSE was configured and built with a dual number backing store size of " +
324 ". Complex simulations with many variables or contact problems may require larger "
325 "values. Reconfigure MOOSE with the --with-derivative-size=<n> option in the root of the "
330 const std::string method = QUOTE(METHOD);
331 add_string(
"method", method,
"The executable was built with METHOD=\"" + method +
"\"")
333 .setEnumeration({
"dbg",
"devel",
"oprof",
"opt"});
337 const std::string version = QUOTE(LIBMESH_DETECTED_PETSC_VERSION_MAJOR)
"." QUOTE(
338 LIBMESH_DETECTED_PETSC_VERSION_MINOR)
"." QUOTE(LIBMESH_DETECTED_PETSC_VERSION_SUBMINOR);
339 add_string(
"petsc", version,
"Using PETSc version " + version +
".");
342#ifdef LIBMESH_PETSC_USE_DEBUG
343 add_bool(
"petsc_debug",
true,
"PETSc was built with debugging options.");
345 add_bool(
"petsc_debug",
false,
"PETSc was built without debugging options.");
349 const auto doc =
"SuperLU direct solver";
350#ifdef LIBMESH_PETSC_HAVE_SUPERLU_DIST
351 const std::string version = QUOTE(PETSC_PKG_SUPERLU_DIST_VERSION_MAJOR)
"." QUOTE(
352 PETSC_PKG_SUPERLU_DIST_VERSION_MINOR)
"." QUOTE(PETSC_PKG_SUPERLU_DIST_VERSION_SUBMINOR);
353 add_string(
"superlu", version, doc);
355 petsc_missing(
"superlu", doc);
360 const auto doc =
"MUltifrontal Massively Parallel sparse direct Solver (MUMPS)";
361#ifdef LIBMESH_PETSC_HAVE_MUMPS
362 const std::string version = QUOTE(PETSC_PKG_MUMPS_VERSION_MAJOR)
"." QUOTE(
363 PETSC_PKG_MUMPS_VERSION_MINOR)
"." QUOTE(PETSC_PKG_MUMPS_VERSION_SUBMINOR);
364 add_string(
"mumps", version, doc);
366 petsc_missing(
"mumps", doc);
371 const auto doc =
"STRUMPACK - STRUctured Matrix PACKage solver library";
372#ifdef LIBMESH_PETSC_HAVE_STRUMPACK
373 const std::string version = QUOTE(PETSC_PKG_STRUMPACK_VERSION_MAJOR)
"." QUOTE(
374 PETSC_PKG_STRUMPACK_VERSION_MINOR)
"." QUOTE(PETSC_PKG_STRUMPACK_VERSION_SUBMINOR);
375 add_string(
"strumpack", version, doc);
377 petsc_missing(
"strumpack", doc);
382 const auto doc =
"Parmetis partitioning library";
383#if defined(LIBMESH_PETSC_HAVE_PARMETIS)
384 const std::string version = QUOTE(PETSC_PKG_PARMETIS_VERSION_MAJOR)
"." QUOTE(
385 PETSC_PKG_PARMETIS_VERSION_MINOR)
"." QUOTE(PETSC_PKG_PARMETIS_VERSION_SUBMINOR);
386 add_string(
"parmetis", version, doc);
387#elif defined(LIBMESH_HAVE_PARMETIS)
388 have(
"parmetis", doc);
390 petsc_missing(
"parmetis", doc);
395 const auto doc =
"Chaco graph partitioning library";
396#ifdef LIBMESH_PETSC_HAVE_CHACO
399 petsc_missing(
"chaco", doc);
404 const auto doc =
"Party matrix or graph partitioning library";
405#ifdef LIBMESH_PETSC_HAVE_PARTY
408 petsc_missing(
"party", doc);
413 const auto doc =
"PT-Scotch graph partitioning library";
414#ifdef LIBMESH_PETSC_HAVE_PTSCOTCH
415 const std::string version = QUOTE(PETSC_PKG_PTSCOTCH_VERSION_MAJOR)
"." QUOTE(
416 PETSC_PKG_PTSCOTCH_VERSION_MINOR)
"." QUOTE(PETSC_PKG_PTSCOTCH_VERSION_SUBMINOR);
417 add_string(
"ptscotch", version, doc);
419 petsc_missing(
"ptscotch", doc);
424 const auto doc =
"Optimized BLAS library";
425#ifdef PETSC_HAVE_OPENBLAS
426 const std::string version = QUOTE(PETSC_PKG_OPENBLAS_VERSION_MAJOR)
"." QUOTE(
427 PETSC_PKG_OPENBLAS_VERSION_MINOR)
"." QUOTE(PETSC_PKG_OPENBLAS_VERSION_SUBMINOR);
428 add_string(
"openblas", version, doc);
430 petsc_missing(
"openblas", doc);
435 const auto doc =
"Umpire resource management library";
436#ifdef PETSC_HAVE_UMPIRE
439 petsc_missing(
"umpire", doc);
444 const auto doc =
"Scalable Library for Eigenvalue Problem Computations (SLEPc)";
445#ifdef LIBMESH_HAVE_SLEPC
446 const auto version = QUOTE(LIBMESH_DETECTED_SLEPC_VERSION_MAJOR)
"." QUOTE(
447 LIBMESH_DETECTED_SLEPC_VERSION_MINOR)
"." QUOTE(LIBMESH_DETECTED_SLEPC_VERSION_SUBMINOR);
448 have_version(
"slepc", doc, version);
450 petsc_missing(
"slepc", doc);
455 const auto doc =
"Exodus mesh file format library";
456#ifdef LIBMESH_HAVE_EXODUS_API
457 const std::string version = QUOTE(LIBMESH_DETECTED_EXODUS_VERSION_MAJOR)
"." QUOTE(
458 LIBMESH_DETECTED_EXODUS_VERSION_MINOR);
459 have_version(
"exodus", doc, version);
461 libmesh_missing(
"exodus", doc,
"--enable-exodus");
466 const auto doc =
"Netgen meshing library";
467#ifdef LIBMESH_HAVE_NETGEN
468 const std::string version =
469 QUOTE(NETGEN_VERSION_MAJOR)
"." QUOTE(NETGEN_VERSION_MINOR)
"." QUOTE(NETGEN_VERSION_PATCH);
470 add_string(
"netgen", version, doc);
472 libmesh_missing(
"netgen", doc,
"--enable-netgen");
477 const auto doc =
"Visualization Toolkit (VTK)";
478#ifdef LIBMESH_HAVE_VTK
479 const std::string version = QUOTE(LIBMESH_DETECTED_VTK_VERSION_MAJOR)
"." QUOTE(
480 LIBMESH_DETECTED_VTK_VERSION_MINOR)
"." QUOTE(LIBMESH_DETECTED_VTK_VERSION_SUBMINOR);
481 have_version(
"vtk", doc, version);
483 libmesh_missing(
"vtk", doc,
"--disable-vtk and --enable-vtk-required");
488 const auto doc =
"libcurl - the multiprotocol file transfer library";
489#ifdef LIBMESH_HAVE_CURL
492 libmesh_missing(
"curl", doc,
"--enable-curl");
497 const auto doc =
"Tecplot post-processing tools API";
498#ifdef LIBMESH_HAVE_TECPLOT_API
499 have(
"tecplot", doc);
501 libmesh_missing(
"tecplot", doc,
"--enable-tecplot");
506 const auto doc =
"NVIDIA Tools Extension Library API";
507#ifdef LIBMESH_HAVE_NVTX_API
508 have(
"nvtx_api", doc);
510 libmesh_missing(
"nvtx_api", doc,
"--with-nvtx");
515 const auto doc =
"libMesh performance logging";
516#ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING
517 have(
"libmesh_perflog", doc);
519 libmesh_missing(
"libmesh_perflog", doc,
"--enable-perflog");
524 const auto doc =
"Boost C++ library";
525#ifdef LIBMESH_HAVE_EXTERNAL_BOOST
528 libmesh_missing(
"boost", doc,
"--with-boost");
534 const auto doc =
"Adaptive mesh refinement";
535#ifdef LIBMESH_ENABLE_AMR
538 libmesh_missing(
"amr", doc,
"--disable-amr");
543 const auto doc =
"nanoflann library for Nearest Neighbor (NN) search with KD-trees";
544#ifdef LIBMESH_HAVE_NANOFLANN
545 have(
"nanoflann", doc);
547 libmesh_missing(
"nanoflann", doc,
"--disable-nanoflann");
552 const auto doc =
"sfcurves library for space filling curves (required by geometric "
553 "partitioners such as SFCurves, Hilbert and Morton - not LGPL compatible)";
554#ifdef LIBMESH_HAVE_SFCURVES
555 have(
"sfcurves", doc);
557 libmesh_missing(
"sfcurves", doc,
"--disable-sfc");
562#ifdef LIBMESH_HAVE_FPARSER
563#ifdef LIBMESH_HAVE_FPARSER_JIT
564 const auto value =
"jit";
565 const auto doc =
"FParser enabled with just in time compilation support.";
567 const auto value =
"byte_code";
568 const auto doc =
"FParser enabled.";
570 add_string(
"fparser", value, doc);
574 "FParser is disabled, libMesh was likely configured with --disable-fparser.");
578#ifdef LIBMESH_HAVE_DLOPEN
579 add_bool(
"dlopen",
true,
"The dlopen() system call is available to dynamically load libraries.");
583 "The dlopen() system call is not available. Dynamic library loading is "
584 "not supported on this system.");
588 const auto doc =
"LibMesh support for threaded execution";
589#ifdef LIBMESH_USING_THREADS
590 have(
"threads", doc);
592 libmesh_missing(
"threads", doc,
"--with-thread-model=tbb,pthread,openmp,auto,none");
597 const auto doc =
"OpenMP multi-platform shared-memory parallel programming API";
598#ifdef LIBMESH_HAVE_OPENMP
601 libmesh_missing(
"openmp", doc,
"--with-thread-model=tbb,pthread,openmp,auto,none");
605 const auto doc =
"POSIX Threads API";
606#ifdef LIBMESH_HAVE_PTHREAD
607 have(
"pthread", doc);
609 libmesh_missing(
"pthread", doc,
"--with-thread-model=tbb,pthread,openmp,auto,none");
613 const auto doc =
"oneAPI Threading Building Blocks (TBB) API";
614#ifdef LIBMESH_HAVE_TBB_API
617 libmesh_missing(
"tbb", doc,
"--with-thread-model=tbb,pthread,openmp,auto,none");
622 const auto doc =
"libMesh unique ID support";
623#ifdef LIBMESH_ENABLE_UNIQUE_ID
624 have(
"unique_id", doc);
626 libmesh_missing(
"unique_id", doc,
"--enable-unique-id");
631#ifdef LIBMESH_ENABLE_PARMESH
632 const auto value =
"distributed";
634 const auto value =
"replicated";
636 add_string(
"mesh_mode", value,
"libMesh default mesh mode")
638 .setEnumeration({
"distributed",
"replicated"});
641 add_int(
"dof_id_bytes",
642 static_cast<int>(
sizeof(dof_id_type)),
643 "Degree of freedom (DOF) identifiers use " +
Moose::stringify(
sizeof(dof_id_type)) +
644 " bytes for storage. This is controlled by the "
645 "--with-dof-id-bytes=<1|2|4|8> libMesh configure option.")
649#ifdef LIBMESH_HAVE_STATIC_LIBS
650 const auto value =
"static";
652 const auto value =
"dynamic";
654 add_string(
"library_mode",
656 "The libMesh library mode. This is controlled by the --enable-static libMesh "
659 .setEnumeration({
"dynamic",
"static"});
664 const auto doc =
"Compiler used to build the MOOSE framework.";
665#if defined(__INTEL_LLVM_COMPILER)
666 const auto value =
"intel";
667#elif defined(__clang__)
668 const auto value =
"clang";
669#elif defined(__GNUC__) || defined(__GNUG__)
670 const auto value =
"gcc";
671#elif defined(_MSC_VER)
672 const auto value =
"msvc";
674 mooseDoOnce(
mooseWarning(
"Failed to determine compiler; setting capability compiler=unknown"));
675 const auto value =
"unknown";
677 add_string(
"compiler", value, doc)
679 .setEnumeration({
"clang",
"gcc",
"intel",
"msvc",
"unknown"});
685 const auto value =
"darwin";
687 const auto value =
"win32";
689 const auto value =
"linux";
691 const auto value =
"unix";
693 mooseDoOnce(
mooseWarning(
"Failed to determine platform; setting capability platform=unknown"));
694 const auto value =
"unknown";
696 add_string(
"platform", value,
"Operating system this executable is running on.")
698 .setEnumeration({
"darwin",
"linux",
"unix",
"unknown",
"win32"});
704 std::optional<std::string> executable_path;
716 std::string value =
"unknown";
722 const auto resolved_path =
723 std::filesystem::weakly_canonical(std::filesystem::path(*executable_path), ec);
725 mooseDoOnce(
mooseWarning(
"Failed to resolve executable path '",
729 "\n\nSetting capability installation_type=unknown"));
735 value = resolved_path.parent_path().filename() ==
"bin" ?
"relocated" :
"in_tree";
740 "Failed to determine executable path; setting capability installation_type=unknown"));
742 add_string(
"installation_type", value,
"The installation type of the application.")
744 .setEnumeration({
"in_tree",
"relocated",
"unknown"});