From 883495dfffb32224706a6e3ae16bd89a08ea1fe3 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 12:00:28 -0500 Subject: [PATCH 01/45] Kokkos configuration --- include/libmesh_config.h.in | 3 +++ m4/libmesh_optional_packages.m4 | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/libmesh_config.h.in b/include/libmesh_config.h.in index a8318aa5e6..cb279a13bc 100644 --- a/include/libmesh_config.h.in +++ b/include/libmesh_config.h.in @@ -440,6 +440,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define if Kokkos support is enabled in libMesh */ +#undef HAVE_KOKKOS + /* Flag indicating whether the library will be compiled with LASPACK support */ #undef HAVE_LASPACK diff --git a/m4/libmesh_optional_packages.m4 b/m4/libmesh_optional_packages.m4 index 4e4657839f..e99fe1781a 100644 --- a/m4/libmesh_optional_packages.m4 +++ b/m4/libmesh_optional_packages.m4 @@ -863,6 +863,20 @@ AM_CONDITIONAL(LIBMESH_ENABLE_METAPHYSICL, test x$enablemetaphysicl = xyes) +# ------------------------------------------------------------- +# Kokkos -- enables the native Kokkos FE math path +# ------------------------------------------------------------- +ACSM_CONFIGURE_KOKKOS + +AS_IF([test "x$enablekokkos" != "xno"], + [ + libmesh_optional_INCLUDES="$KOKKOS_CPPFLAGS $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$KOKKOS_LDFLAGS $KOKKOS_LIBS $libmesh_optional_LIBS" + ]) +AM_CONDITIONAL(LIBMESH_ENABLE_KOKKOS, test x$enablekokkos = xyes) +# ------------------------------------------------------------- + + AS_IF([test "$enableoptional" != no], [ From d3087bc62fdc6f4b26e7b1241a59f7828ae4d646 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 13:53:23 -0500 Subject: [PATCH 02/45] Report Kokkos info in config summary --- m4/config_summary.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/m4/config_summary.m4 b/m4/config_summary.m4 index f1ae9b86a1..189ecdf7c8 100644 --- a/m4/config_summary.m4 +++ b/m4/config_summary.m4 @@ -126,6 +126,9 @@ AS_IF([test "x$enableoptional" = "xyes"], AS_ECHO([" gmv.............................. : $enablegmv"]) AS_ECHO([" gzstream......................... : $enablegz"]) AS_ECHO([" hdf5............................. : $enablehdf5"]) + AS_ECHO([" kokkos........................... : $enablekokkos"]) + AS_IF([test "x$enablekokkos" = "xyes"], + [AS_ECHO([" kokkos backend................ : $KOKKOS_BACKEND"])]) AS_ECHO([" laspack.......................... : $enablelaspack"]) AS_ECHO([" libhilbert....................... : $enablelibhilbert"]) AS_ECHO([" metaphysicl...................... : $enablemetaphysicl"]) From 9cfc7f0c16331663f4c8bb4bdafecbe3ab24ca0d Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 12:01:15 -0500 Subject: [PATCH 03/45] Kokkos device plumbing This is a fraction of a commit authored by Rochi; I stripped off the m4 bits so we could just use the updated ACSM versions from the start. --- include/base/libmesh_common.h | 45 ++++++++++++++++++++++--------- include/base/libmesh_exceptions.h | 7 +++++ 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/include/base/libmesh_common.h b/include/base/libmesh_common.h index 57c65bb38d..efd5746298 100644 --- a/include/base/libmesh_common.h +++ b/include/base/libmesh_common.h @@ -30,6 +30,10 @@ // The library configuration options #include "libmesh/libmesh_config.h" +// Device compilation support — must be included before assert macros +// so that LIBMESH_DEVICE_ASSERT is available for the Kokkos path. +#include "libmesh/libmesh_device.h" + // Use actual timestamps or constant dummies (to aid ccache) #ifdef LIBMESH_ENABLE_TIMESTAMPS # define LIBMESH_TIME __TIME__ @@ -183,33 +187,33 @@ typedef std::complex COMPLEX; // Helper functions for complex/real numbers // to clean up #ifdef LIBMESH_USE_COMPLEX_NUMBERS elsewhere -template inline T libmesh_real(T a) { return a; } -template inline T libmesh_imag(T /*a*/) { return 0; } -template inline T libmesh_conj(T a) { return a; } +template LIBMESH_DEVICE_INLINE T libmesh_real(T a) { return a; } +template LIBMESH_DEVICE_INLINE T libmesh_imag(T /*a*/) { return 0; } +template LIBMESH_DEVICE_INLINE T libmesh_conj(T a) { return a; } template -inline T libmesh_real(std::complex a) { return std::real(a); } +LIBMESH_DEVICE_INLINE T libmesh_real(std::complex a) { return std::real(a); } template -inline T libmesh_imag(std::complex a) { return std::imag(a); } +LIBMESH_DEVICE_INLINE T libmesh_imag(std::complex a) { return std::imag(a); } template -inline std::complex libmesh_conj(std::complex a) { return std::conj(a); } +LIBMESH_DEVICE_INLINE std::complex libmesh_conj(std::complex a) { return std::conj(a); } // std::isnan() is in as of C++11. template -inline bool libmesh_isnan(T x) { return std::isnan(x); } +LIBMESH_DEVICE_INLINE bool libmesh_isnan(T x) { return std::isnan(x); } template -inline bool libmesh_isnan(std::complex a) +LIBMESH_DEVICE_INLINE bool libmesh_isnan(std::complex a) { return (std::isnan(std::real(a)) || std::isnan(std::imag(a))); } // std::isinf() is in as of C++11. template -inline bool libmesh_isinf(T x) { return std::isinf(x); } +LIBMESH_DEVICE_INLINE bool libmesh_isinf(T x) { return std::isinf(x); } template -inline bool libmesh_isinf(std::complex a) +LIBMESH_DEVICE_INLINE bool libmesh_isinf(std::complex a) { return (std::isinf(std::real(a)) || std::isinf(std::imag(a))); } // Define the value type for unknowns in simulations. @@ -287,7 +291,13 @@ extern bool warned_about_auto_ptr; #endif // The libmesh_assert() macro acts like C's assert(), but throws a -// libmesh_error() (including stack trace, etc) instead of just exiting +// libmesh_error() (including stack trace, etc) instead of just exiting. +// +// In .K translation units (LIBMESH_KOKKOS_COMPILATION defined), +// LIBMESH_DEVICE_ASSERT is provided by libmesh_device.h using +// printf + Kokkos::abort() — device-safe across CUDA/HIP/SYCL. +// The assert macros delegate to it so that both host and device +// code in the same file get assertion checking. #ifdef NDEBUG #define libmesh_assert_msg(asserted, msg) ((void) 0) @@ -299,6 +309,18 @@ extern bool warned_about_auto_ptr; #define libmesh_assert_less_equal_msg(expr1,expr2, msg) ((void) 0) #define libmesh_assert_greater_equal_msg(expr1,expr2, msg) ((void) 0) +#elif defined(LIBMESH_DEVICE_ASSERT) + +// Kokkos compilation: use the device-safe assert from libmesh_device.h. +#define libmesh_assert_msg(asserted, msg) LIBMESH_DEVICE_ASSERT(asserted) +#define libmesh_exceptionless_assert_msg(asserted, msg) LIBMESH_DEVICE_ASSERT(asserted) +#define libmesh_assert_equal_to_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) == (expr2)) +#define libmesh_assert_not_equal_to_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) != (expr2)) +#define libmesh_assert_less_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) < (expr2)) +#define libmesh_assert_greater_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) > (expr2)) +#define libmesh_assert_less_equal_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) <= (expr2)) +#define libmesh_assert_greater_equal_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) >= (expr2)) + #else #define libmesh_assertion_types(expr1,expr2) \ @@ -674,7 +696,6 @@ inline Tnew restrict_int (Told oldvar) return oldvar; } - /** * This is a helper variable template for cases when we want to use a default compile-time * error with constexpr-based if conditions. The templating delays the triggering diff --git a/include/base/libmesh_exceptions.h b/include/base/libmesh_exceptions.h index 610c70c881..c3892f8677 100644 --- a/include/base/libmesh_exceptions.h +++ b/include/base/libmesh_exceptions.h @@ -23,6 +23,7 @@ #include "libmesh/libmesh_config.h" #include "libmesh/libmesh_abort.h" +#include "libmesh/libmesh_device.h" #include #include @@ -217,7 +218,13 @@ class TerminationException #ifdef LIBMESH_ENABLE_EXCEPTIONS #define libmesh_noexcept noexcept +#if LIBMESH_IN_DEVICE_CODE +// Kokkos device code does not support C++ exceptions. +#define LIBMESH_THROW(e) do { LIBMESH_DEVICE_ERROR_MSG((e).what()); } while (0) +#else #define LIBMESH_THROW(e) do { throw e; } while (0) +#endif + #define libmesh_rethrow throw #define libmesh_try try #define libmesh_catch(e) catch(e) From 96b87880cb6c8a5d5e95827d013e59e69974df16 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Fri, 8 May 2026 15:04:41 -0600 Subject: [PATCH 04/45] Make vector and tensor value types device-usable --- include/numerics/tensor_tools.h | 36 +++++------ include/numerics/tensor_value.h | 24 ++++--- include/numerics/type_tensor.h | 110 +++++++++++++++++++------------- include/numerics/type_vector.h | 89 ++++++++++++++++---------- include/numerics/vector_value.h | 16 +++-- 5 files changed, 161 insertions(+), 114 deletions(-) diff --git a/include/numerics/tensor_tools.h b/include/numerics/tensor_tools.h index 7617116f10..f183380a84 100644 --- a/include/numerics/tensor_tools.h +++ b/include/numerics/tensor_tools.h @@ -45,92 +45,92 @@ namespace TensorTools // Vector specializations will follow. template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if::value && ScalarTraits::value, typename CompareTypes::supertype>::type inner_product(const T & a, const T2& b) { return a * b; } template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype inner_product(const TypeVector & a, const TypeVector & b) { return a * b; } template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype inner_product(const TypeTensor & a, const TypeTensor & b) { return a.contract(b); } template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype inner_product(const TypeNTensor & a, const TypeNTensor & b) { return a.contract(b); } template -inline +LIBMESH_DEVICE_INLINE auto norm(const T & a) { using std::abs; return abs(a); } template -inline +LIBMESH_DEVICE_INLINE T norm(std::complex a) { using std::abs; return abs(a); } template -inline +LIBMESH_DEVICE_INLINE auto norm(const TypeVector & a) -> decltype(TensorTools::norm(T())) {using std::sqrt; return sqrt(a.norm_sq());} template -inline +LIBMESH_DEVICE_INLINE auto norm(const VectorValue & a) -> decltype(TensorTools::norm(T())) {using std::sqrt; return sqrt(a.norm_sq());} template -inline +LIBMESH_DEVICE_INLINE auto norm(const TypeTensor & a) -> decltype(TensorTools::norm(T())) {using std::sqrt; return sqrt(a.norm_sq());} template -inline +LIBMESH_DEVICE_INLINE auto norm(const TensorValue & a) -> decltype(TensorTools::norm(T())) {using std::sqrt; return sqrt(a.norm_sq());} template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const T & a) -{ using std::norm; return norm(a); } +{ return a * libmesh_conj(a); } template -inline +LIBMESH_DEVICE_INLINE T norm_sq(std::complex a) { using std::norm; return norm(a); } template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const TypeVector & a) {return a.norm_sq();} template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const VectorValue & a) {return a.norm_sq();} template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const TypeTensor & a) {return a.norm_sq();} template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const TensorValue & a) {return a.norm_sq();} template -inline +LIBMESH_DEVICE_INLINE bool is_zero(const T & a){ return a.is_zero();} // Any tensor-rank-independent code will need to include diff --git a/include/numerics/tensor_value.h b/include/numerics/tensor_value.h index 3a0d680476..c99e0cac00 100644 --- a/include/numerics/tensor_value.h +++ b/include/numerics/tensor_value.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/type_tensor.h" +#include "libmesh/libmesh_device.h" #include "libmesh/libmesh.h" // for pi #ifdef LIBMESH_HAVE_METAPHYSICL @@ -93,12 +94,14 @@ class TensorValue : public TypeTensor * Constructor. Takes 1 row vector for LIBMESH_DIM=1 */ template + LIBMESH_DEVICE_INLINE TensorValue (const TypeVector & vx); /** * Constructor. Takes 2 row vectors for LIBMESH_DIM=2 */ template + LIBMESH_DEVICE_INLINE TensorValue (const TypeVector & vx, const TypeVector & vy); @@ -106,6 +109,7 @@ class TensorValue : public TypeTensor * Constructor. Takes 3 row vectors for LIBMESH_DIM=3 */ template + LIBMESH_DEVICE_INLINE TensorValue (const TypeVector & vx, const TypeVector & vy, const TypeVector & vz); @@ -134,11 +138,11 @@ class TensorValue : public TypeTensor const TypeTensor & p_im); #endif - /** * Assignment-from-scalar operator. Used only to zero out tensors. */ template + LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TensorValue &>::type @@ -211,7 +215,7 @@ typedef NumberTensorValue Tensor; //------------------------------------------------------ // Inline functions template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue () : TypeTensor () { @@ -220,7 +224,7 @@ TensorValue::TensorValue () : template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const T & xx, const T & xy, const T & xz, @@ -237,7 +241,7 @@ TensorValue::TensorValue (const T & xx, template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const Scalar & xx, const Scalar & xy, const Scalar & xz, @@ -257,7 +261,7 @@ TensorValue::TensorValue (const Scalar & xx, template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TensorValue & p) : TypeTensor (p) { @@ -267,7 +271,7 @@ TensorValue::TensorValue (const TensorValue & p) : template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeVector & vx) : TypeTensor (vx) { @@ -277,7 +281,7 @@ TensorValue::TensorValue (const TypeVector & vx) : template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeVector & vx, const TypeVector & vy) : TypeTensor (vx, vy) @@ -288,7 +292,7 @@ TensorValue::TensorValue (const TypeVector & vx, template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeVector & vx, const TypeVector & vy, const TypeVector & vz) : @@ -300,7 +304,7 @@ TensorValue::TensorValue (const TypeVector & vx, template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeTensor & p) : TypeTensor (p) { @@ -309,7 +313,7 @@ TensorValue::TensorValue (const TypeTensor & p) : #ifdef LIBMESH_USE_COMPLEX_NUMBERS template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeTensor & p_re, const TypeTensor & p_im) : TypeTensor (Complex (p_re(0,0), p_im(0,0)), diff --git a/include/numerics/type_tensor.h b/include/numerics/type_tensor.h index 470b745f12..ac6dc14542 100644 --- a/include/numerics/type_tensor.h +++ b/include/numerics/type_tensor.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/libmesh_common.h" +#include "libmesh/libmesh_device.h" #include "libmesh/type_vector.h" // C++ includes @@ -101,13 +102,16 @@ class TypeTensor * many vectors are needed. */ template + LIBMESH_DEVICE_INLINE TypeTensor(const TypeVector & vx); template + LIBMESH_DEVICE_INLINE TypeTensor(const TypeVector & vx, const TypeVector & vy); template + LIBMESH_DEVICE_INLINE TypeTensor(const TypeVector & vx, const TypeVector & vy, const TypeVector & vz); @@ -133,12 +137,14 @@ class TypeTensor /** * Destructor. */ + LIBMESH_DEVICE_INLINE ~TypeTensor(); /** * Assign to this tensor without creating a temporary. */ template + LIBMESH_DEVICE_INLINE void assign (const TypeTensor &); /** @@ -147,6 +153,7 @@ class TypeTensor * \returns A reference to *this. */ template + LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeTensor &>::type @@ -166,11 +173,13 @@ class TypeTensor /** * \returns A proxy for the \f$ i^{th} \f$ column of the tensor. */ + LIBMESH_DEVICE_INLINE ConstTypeTensorColumn slice (const unsigned int i) const; /** * \returns A writable proxy for the \f$ i^{th} \f$ column of the tensor. */ + LIBMESH_DEVICE_INLINE TypeTensorColumn slice (const unsigned int i); /** @@ -181,6 +190,7 @@ class TypeTensor /** * \returns A copy of one column of the tensor as a TypeVector. */ + LIBMESH_DEVICE_INLINE TypeVector column(const unsigned int r) const; /** @@ -210,6 +220,7 @@ class TypeTensor * Add a scaled tensor to this tensor without creating a temporary. */ template + LIBMESH_DEVICE_INLINE void add_scaled (const TypeTensor &, const T &); /** @@ -240,6 +251,7 @@ class TypeTensor * temporary. */ template + LIBMESH_DEVICE_INLINE void subtract_scaled (const TypeTensor &, const T &); /** @@ -265,6 +277,7 @@ class TypeTensor */ template ::value, int>::type = 0> + LIBMESH_DEVICE_INLINE const TypeTensor & operator *= (const Scalar & factor) { for (unsigned int i=0; i + LIBMESH_DEVICE_INLINE typename CompareTypes::supertype contract (const TypeTensor &) const; @@ -339,6 +353,7 @@ class TypeTensor * \returns A copy of the result vector, this tensor is unchanged. */ template + LIBMESH_DEVICE_INLINE TypeVector::supertype> left_multiply (const TypeVector & p) const; @@ -358,6 +373,7 @@ class TypeTensor * * \returns The solution in the \p x vector. */ + LIBMESH_DEVICE_INLINE void solve(const TypeVector & b, TypeVector & x) const; /** @@ -375,6 +391,7 @@ class TypeTensor /** * \returns True if all values in the tensor are zero */ + LIBMESH_DEVICE_INLINE bool is_zero() const; /** @@ -393,11 +410,13 @@ class TypeTensor /** * Set all entries of the tensor to 0. */ + LIBMESH_DEVICE_INLINE void zero(); /** * \returns \p true if two tensors are equal, \p false otherwise. */ + LIBMESH_DEVICE_INLINE bool operator == (const TypeTensor & rhs) const; /** @@ -513,7 +532,7 @@ class ConstTypeTensorColumn //------------------------------------------------------ // Inline functions template -inline +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor () { _coords[0] = {}; @@ -536,7 +555,7 @@ TypeTensor::TypeTensor () template -inline +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor (const T & xx, const T & xy, const T & xz, @@ -582,7 +601,7 @@ TypeTensor::TypeTensor (const T & xx, template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor (const Scalar & xx, const Scalar & xy, const Scalar & xz, @@ -631,7 +650,7 @@ TypeTensor::TypeTensor (const Scalar & xx, template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor (const TypeTensor & p) { // copy the nodes from vector p to me @@ -642,6 +661,7 @@ TypeTensor::TypeTensor (const TypeTensor & p) template template +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor(const TypeVector & vx) { libmesh_assert_equal_to (LIBMESH_DIM, 1); @@ -650,6 +670,7 @@ TypeTensor::TypeTensor(const TypeVector & vx) template template +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor(const TypeVector & vx, const TypeVector & vy) { @@ -666,6 +687,7 @@ TypeTensor::TypeTensor(const TypeVector & vx, template template +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor(const TypeVector & vx, const TypeVector & vy, const TypeVector & vz) @@ -690,7 +712,7 @@ TypeTensor::TypeTensor(const TypeVector & vx, template -inline +LIBMESH_DEVICE_INLINE TypeTensor::~TypeTensor () { } @@ -699,7 +721,7 @@ TypeTensor::~TypeTensor () template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::assign (const TypeTensor & p) { for (unsigned int i=0; i::assign (const TypeTensor & p) template -inline +LIBMESH_DEVICE_INLINE const T & TypeTensor::operator () (const unsigned int i, const unsigned int j) const { @@ -728,14 +750,14 @@ const T & TypeTensor::operator () (const unsigned int i, template -inline +LIBMESH_DEVICE_INLINE T & TypeTensor::operator () (const unsigned int i, const unsigned int j) { #if LIBMESH_DIM < 3 - libmesh_error_msg_if(i >= LIBMESH_DIM || j >= LIBMESH_DIM, - "ERROR: You are assigning to a tensor component that is out of range for the compiled LIBMESH_DIM!"); + LIBMESH_DEVICE_ERROR_MSG_IF(i >= LIBMESH_DIM || j >= LIBMESH_DIM, + "ERROR: You are assigning to a tensor component that is out of range for the compiled LIBMESH_DIM!"); #endif @@ -747,7 +769,7 @@ T & TypeTensor::operator () (const unsigned int i, template -inline +LIBMESH_DEVICE_INLINE ConstTypeTensorColumn TypeTensor::slice (const unsigned int i) const { @@ -757,7 +779,7 @@ TypeTensor::slice (const unsigned int i) const template -inline +LIBMESH_DEVICE_INLINE TypeTensorColumn TypeTensor::slice (const unsigned int i) { @@ -767,7 +789,7 @@ TypeTensor::slice (const unsigned int i) template -inline +LIBMESH_DEVICE_INLINE TypeVector TypeTensor::row(const unsigned int r) const { @@ -781,7 +803,7 @@ TypeTensor::row(const unsigned int r) const template -inline +LIBMESH_DEVICE_INLINE TypeVector TypeTensor::column(const unsigned int r) const { @@ -796,7 +818,7 @@ TypeTensor::column(const unsigned int r) const template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::supertype> TypeTensor::operator + (const TypeTensor & p) const { @@ -831,7 +853,7 @@ TypeTensor::operator + (const TypeTensor & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeTensor & TypeTensor::operator += (const TypeTensor & p) { this->add (p); @@ -843,7 +865,7 @@ const TypeTensor & TypeTensor::operator += (const TypeTensor & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::add (const TypeTensor & p) { for (unsigned int i=0; i::add (const TypeTensor & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::add_scaled (const TypeTensor & p, const T & factor) { for (unsigned int i=0; i::add_scaled (const TypeTensor & p, const T & factor) template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::supertype> TypeTensor::operator - (const TypeTensor & p) const { @@ -901,7 +923,7 @@ TypeTensor::operator - (const TypeTensor & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeTensor & TypeTensor::operator -= (const TypeTensor & p) { this->subtract (p); @@ -913,7 +935,7 @@ const TypeTensor & TypeTensor::operator -= (const TypeTensor & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::subtract (const TypeTensor & p) { for (unsigned int i=0; i::subtract (const TypeTensor & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::subtract_scaled (const TypeTensor & p, const T & factor) { for (unsigned int i=0; i::subtract_scaled (const TypeTensor & p, const T & factor) template -inline +LIBMESH_DEVICE_INLINE TypeTensor TypeTensor::operator - () const { @@ -967,7 +989,7 @@ TypeTensor TypeTensor::operator - () const template template -inline +LIBMESH_DEVICE_INLINE auto TypeTensor::operator * (const Scalar & factor) const -> typename std::enable_if< ScalarTraits::value, @@ -1003,7 +1025,7 @@ TypeTensor::operator * (const Scalar & factor) const -> typename std::enable_ template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeTensor::supertype>>::type @@ -1015,7 +1037,7 @@ operator * (const Scalar & factor, template template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeTensor::supertype>>::type @@ -1053,7 +1075,7 @@ TypeTensor::operator / (const Scalar & factor) const template -inline +LIBMESH_DEVICE_INLINE TypeTensor TypeTensor::transpose() const { #if LIBMESH_DIM == 1 @@ -1083,7 +1105,7 @@ TypeTensor TypeTensor::transpose() const template -inline +LIBMESH_DEVICE_INLINE TypeTensor TypeTensor::inverse() const { #if LIBMESH_DIM == 1 @@ -1132,7 +1154,7 @@ TypeTensor TypeTensor::inverse() const template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::solve(const TypeVector & b, TypeVector & x) const { #if LIBMESH_DIM == 1 @@ -1183,7 +1205,7 @@ void TypeTensor::solve(const TypeVector & b, TypeVector & x) const template -inline +LIBMESH_DEVICE_INLINE const TypeTensor & TypeTensor::operator /= (const T & factor) { libmesh_assert_not_equal_to (factor, static_cast(0.)); @@ -1199,7 +1221,7 @@ const TypeTensor & TypeTensor::operator /= (const T & factor) template template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeTensor::operator * (const TypeVector & p) const { @@ -1213,7 +1235,7 @@ TypeTensor::operator * (const TypeVector & p) const template template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeTensor::left_multiply (const TypeVector & p) const { @@ -1226,7 +1248,7 @@ TypeTensor::left_multiply (const TypeVector & p) const } template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> operator * (const TypeVector & a, const TypeTensor & b) { @@ -1235,7 +1257,7 @@ operator * (const TypeVector & a, const TypeTensor & b) template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::supertype> TypeTensor::operator * (const TypeTensor & p) const { @@ -1250,7 +1272,7 @@ TypeTensor::operator * (const TypeTensor & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeTensor & TypeTensor::operator *= (const TypeTensor & p) { TypeTensor temp; @@ -1270,7 +1292,7 @@ const TypeTensor & TypeTensor::operator *= (const TypeTensor & p) */ template template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype TypeTensor::contract (const TypeTensor & t) const { @@ -1283,7 +1305,7 @@ TypeTensor::contract (const TypeTensor & t) const template -inline +LIBMESH_DEVICE_INLINE auto TypeTensor::norm() const { using std::sqrt; @@ -1292,7 +1314,7 @@ auto TypeTensor::norm() const template -inline +LIBMESH_DEVICE_INLINE bool TypeTensor::is_zero() const { for (const auto & val : _coords) @@ -1302,7 +1324,7 @@ bool TypeTensor::is_zero() const } template -inline +LIBMESH_DEVICE_INLINE T TypeTensor::det() const { #if LIBMESH_DIM == 1 @@ -1325,7 +1347,7 @@ T TypeTensor::det() const } template -inline +LIBMESH_DEVICE_INLINE T TypeTensor::tr() const { #if LIBMESH_DIM == 1 @@ -1342,7 +1364,7 @@ T TypeTensor::tr() const } template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::zero() { for (unsigned int i=0; i::zero() template -inline +LIBMESH_DEVICE_INLINE auto TypeTensor::norm_sq () const { Real sum = 0.; @@ -1364,7 +1386,7 @@ auto TypeTensor::norm_sq () const template -inline +LIBMESH_DEVICE_INLINE bool TypeTensor::operator == (const TypeTensor & rhs) const { #if LIBMESH_DIM == 1 @@ -1436,7 +1458,7 @@ void TypeTensor::print(std::ostream & os) const } template -inline +LIBMESH_DEVICE_INLINE TypeTensor::supertype> outer_product(const TypeVector & a, const TypeVector & b) { diff --git a/include/numerics/type_vector.h b/include/numerics/type_vector.h index 65bf6c3353..029884a42e 100644 --- a/include/numerics/type_vector.h +++ b/include/numerics/type_vector.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/libmesh_common.h" +#include "libmesh/libmesh_device.h" #include "libmesh/compare_types.h" #include "libmesh/tensor_tools.h" #include "libmesh/int_range.h" @@ -141,12 +142,14 @@ class TypeVector * Assign to this vector without creating a temporary. */ template + LIBMESH_DEVICE_INLINE void assign (const TypeVector &); /** * Assignment-from-scalar operator. Used only to zero out vectors. */ template + LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeVector &>::type @@ -157,12 +160,14 @@ class TypeVector * \returns A const reference to the \f$ i^{th} \f$ entry of the vector. */ const T & operator () (const unsigned int i) const; + LIBMESH_DEVICE_INLINE const T & slice (const unsigned int i) const { return (*this)(i); } /** * \returns A writable reference to the \f$ i^{th} \f$ entry of the vector. */ T & operator () (const unsigned int i); + LIBMESH_DEVICE_INLINE T & slice (const unsigned int i) { return (*this)(i); } /** @@ -192,6 +197,7 @@ class TypeVector * Add a scaled value to this vector without creating a temporary. */ template + LIBMESH_DEVICE_INLINE void add_scaled (const TypeVector &, const T &); /** @@ -222,6 +228,7 @@ class TypeVector * temporary. */ template + LIBMESH_DEVICE_INLINE void subtract_scaled (const TypeVector &, const T &); /** @@ -279,6 +286,7 @@ class TypeVector * \returns The result of TypeVector::operator*(). */ template + LIBMESH_DEVICE_INLINE typename CompareTypes::supertype contract (const TypeVector &) const; @@ -292,6 +300,7 @@ class TypeVector /** * \returns A unit vector in the direction of *this. */ + LIBMESH_DEVICE_INLINE TypeVector unit() const; /** @@ -309,16 +318,19 @@ class TypeVector /** * \returns The L1 norm of the vector */ + LIBMESH_DEVICE_INLINE auto l1_norm() const; /** * \returns True if all values in the vector are zero */ + LIBMESH_DEVICE_INLINE bool is_zero() const; /** * Set all entries of the vector to 0. */ + LIBMESH_DEVICE_INLINE void zero(); /** @@ -342,11 +354,13 @@ class TypeVector * \note For floating point types T, the function \p absolute_fuzzy_equals() * may be a more appropriate choice. */ + LIBMESH_DEVICE_INLINE bool operator == (const TypeVector & rhs) const; /** * \returns !(*this == rhs) */ + LIBMESH_DEVICE_INLINE bool operator != (const TypeVector & rhs) const; /** @@ -425,7 +439,7 @@ class TypeVector // Inline functions template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector () { _coords[0] = {}; @@ -442,7 +456,7 @@ TypeVector::TypeVector () template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector (const T & x, const T & y, const T & z) @@ -467,7 +481,7 @@ TypeVector::TypeVector (const T & x, template template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector (typename std::enable_if::value, const Scalar1>::type & x, @@ -497,7 +511,7 @@ TypeVector::TypeVector (typename template template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector (const Scalar & x, typename std::enable_if::value, @@ -518,7 +532,7 @@ TypeVector::TypeVector (const Scalar & x, template template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector (const TypeVector & p) { // copy the nodes from vector p to me @@ -530,7 +544,7 @@ TypeVector::TypeVector (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::assign (const TypeVector & p) { for (unsigned int i=0; i::assign (const TypeVector & p) template -inline +LIBMESH_DEVICE_INLINE const T & TypeVector::operator () (const unsigned int i) const { libmesh_assert_less (i, LIBMESH_DIM); @@ -551,7 +565,7 @@ const T & TypeVector::operator () (const unsigned int i) const template -inline +LIBMESH_DEVICE_INLINE T & TypeVector::operator () (const unsigned int i) { libmesh_assert_less (i, LIBMESH_DIM); @@ -563,7 +577,7 @@ T & TypeVector::operator () (const unsigned int i) template template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeVector::operator + (const TypeVector & p) const { @@ -589,7 +603,7 @@ TypeVector::operator + (const TypeVector & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeVector & TypeVector::operator += (const TypeVector & p) { this->add (p); @@ -601,7 +615,7 @@ const TypeVector & TypeVector::operator += (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::add (const TypeVector & p) { #if LIBMESH_DIM == 1 @@ -625,7 +639,7 @@ void TypeVector::add (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::add_scaled (const TypeVector & p, const T & factor) { #if LIBMESH_DIM == 1 @@ -649,7 +663,7 @@ void TypeVector::add_scaled (const TypeVector & p, const T & factor) template template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeVector::operator - (const TypeVector & p) const { @@ -676,7 +690,7 @@ TypeVector::operator - (const TypeVector & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeVector & TypeVector::operator -= (const TypeVector & p) { this->subtract (p); @@ -688,7 +702,7 @@ const TypeVector & TypeVector::operator -= (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::subtract (const TypeVector & p) { for (unsigned int i=0; i::subtract (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::subtract_scaled (const TypeVector & p, const T & factor) { for (unsigned int i=0; i::subtract_scaled (const TypeVector & p, const T & factor) template -inline +LIBMESH_DEVICE_INLINE TypeVector TypeVector::operator - () const { @@ -734,7 +748,7 @@ TypeVector TypeVector::operator - () const template template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeVector::supertype>>::type @@ -761,7 +775,7 @@ TypeVector::operator * (const Scalar & factor) const template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeVector::supertype>>::type @@ -774,7 +788,7 @@ operator * (const Scalar & factor, template -inline +LIBMESH_DEVICE_INLINE const TypeVector & TypeVector::operator *= (const T & factor) { #if LIBMESH_DIM == 1 @@ -799,7 +813,7 @@ const TypeVector & TypeVector::operator *= (const T & factor) template template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeVector::supertype>>::type @@ -831,7 +845,7 @@ TypeVector::operator / (const Scalar & factor) const template -inline +LIBMESH_DEVICE_INLINE const TypeVector & TypeVector::operator /= (const T & factor) { @@ -848,7 +862,7 @@ TypeVector::operator /= (const T & factor) template template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype TypeVector::operator * (const TypeVector & p) const { @@ -870,7 +884,7 @@ TypeVector::operator * (const TypeVector & p) const template template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype TypeVector::contract(const TypeVector & p) const { @@ -881,6 +895,7 @@ TypeVector::contract(const TypeVector & p) const template template +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeVector::cross(const TypeVector & p) const { @@ -904,7 +919,7 @@ TypeVector::cross(const TypeVector & p) const template -inline +LIBMESH_DEVICE_INLINE auto TypeVector::norm() const { using std::sqrt; @@ -914,7 +929,7 @@ auto TypeVector::norm() const template -inline +LIBMESH_DEVICE_INLINE void TypeVector::zero() { for (unsigned int i=0; i::zero() template -inline +LIBMESH_DEVICE_INLINE auto TypeVector::norm_sq() const { #if LIBMESH_DIM == 1 @@ -945,7 +960,7 @@ auto TypeVector::norm_sq() const template -inline +LIBMESH_DEVICE_INLINE bool TypeVector::is_zero() const { for (const auto & val : _coords) @@ -959,6 +974,7 @@ auto TypeVector::l1_norm() const; template +LIBMESH_DEVICE_INLINE auto TypeVector::l1_norm() const { @@ -989,7 +1005,7 @@ bool TypeVector::relative_fuzzy_equals(const TypeVector & rhs, Real tol) c template -inline +LIBMESH_DEVICE_INLINE bool TypeVector::operator == (const TypeVector & rhs) const { #if LIBMESH_DIM == 1 @@ -1011,7 +1027,7 @@ bool TypeVector::operator == (const TypeVector & rhs) const template -inline +LIBMESH_DEVICE_INLINE bool TypeVector::operator != (const TypeVector & rhs) const { return (!(*this == rhs)); @@ -1028,7 +1044,7 @@ bool TypeVector::operator != (const TypeVector & rhs) const // [b0, b1, b2] // [c0, c1, c2] template -inline +LIBMESH_DEVICE_INLINE T triple_product(const TypeVector & a, const TypeVector & b, const TypeVector & c) @@ -1050,7 +1066,7 @@ T triple_product(const TypeVector & a, // to be positive if the vectors are obey the right-hand rule, or // negative for a left-hand orientation. template -inline +LIBMESH_DEVICE_INLINE T solid_angle(const TypeVector & v01, const TypeVector & v02, const TypeVector & v03) @@ -1107,7 +1123,7 @@ TypeVector circumcenter(const TypeVector & p0, * calling b.cross(c).norm_sq(). */ template -inline +LIBMESH_DEVICE_INLINE T cross_norm_sq(const TypeVector & b, const TypeVector & c) { @@ -1128,7 +1144,7 @@ T cross_norm_sq(const TypeVector & b, * Calls cross_norm_sq() and takes the square root of the result. */ template -inline +LIBMESH_DEVICE_INLINE T cross_norm(const TypeVector & b, const TypeVector & c) { @@ -1137,7 +1153,7 @@ T cross_norm(const TypeVector & b, } template -inline +LIBMESH_DEVICE_INLINE TypeVector TypeVector::unit() const { @@ -1199,6 +1215,7 @@ struct CompareTypes, TypeVector> }; template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE TypeVector::supertype> outer_product(const T & a, const TypeVector & b) { @@ -1210,6 +1227,7 @@ outer_product(const T & a, const TypeVector & b) } template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE TypeVector::supertype> outer_product(const TypeVector & a, const T2 & b) { @@ -1240,6 +1258,7 @@ l1_norm_diff(const TypeVector & vec1, const TypeVector & vec2) namespace std { template +LIBMESH_DEVICE_INLINE auto norm(const libMesh::TypeVector & vector) -> decltype(std::norm(T())) { // Yea I agree it's dumb that the standard returns the square of the Euclidean norm diff --git a/include/numerics/vector_value.h b/include/numerics/vector_value.h index c93f17313d..45116e1a73 100644 --- a/include/numerics/vector_value.h +++ b/include/numerics/vector_value.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/type_vector.h" +#include "libmesh/libmesh_device.h" #include "libmesh/compare_types.h" #ifdef LIBMESH_HAVE_METAPHYSICL @@ -124,6 +125,7 @@ class VectorValue : public TypeVector * Assignment-from-scalar operator. Used only to zero out vectors. */ template + LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, VectorValue &>::type @@ -146,7 +148,7 @@ typedef NumberVectorValue Gradient; // Inline functions template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue () : TypeVector () { @@ -154,7 +156,7 @@ VectorValue::VectorValue () : template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const T & x, const T & y, const T & z) : @@ -166,7 +168,7 @@ VectorValue::VectorValue (const T & x, template template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (typename std::enable_if::value, const Scalar1>::type & x, @@ -183,7 +185,7 @@ VectorValue::VectorValue (typename template template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const Scalar & x, typename std::enable_if::value, @@ -194,7 +196,7 @@ VectorValue::VectorValue (const Scalar & x, template template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const VectorValue & p) : TypeVector (p) { @@ -204,7 +206,7 @@ VectorValue::VectorValue (const VectorValue & p) : template template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const TypeVector & p) : TypeVector (p) { @@ -212,7 +214,7 @@ VectorValue::VectorValue (const TypeVector & p) : #ifdef LIBMESH_USE_COMPLEX_NUMBERS template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const TypeVector & p_re, const TypeVector & p_im) : TypeVector (Complex (p_re(0), p_im(0)), From 8e164fb3866fd65783c8bd78e1463b7c195da199 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Fri, 8 May 2026 15:04:46 -0600 Subject: [PATCH 05/45] Add Kokkos numerics storage and operator headers --- include/gpu/kokkos_linalg_base.h | 472 ++++++++++++ include/gpu/kokkos_storage.h | 53 ++ include/gpu/kokkos_storage_policy.h | 124 ++++ include/gpu/kokkos_tensor_ops.h | 1033 +++++++++++++++++++++++++++ include/gpu/kokkos_vector_ops.h | 746 +++++++++++++++++++ include/include_HEADERS | 6 + include/libmesh/Makefile.am | 25 +- 7 files changed, 2458 insertions(+), 1 deletion(-) create mode 100644 include/gpu/kokkos_linalg_base.h create mode 100644 include/gpu/kokkos_storage.h create mode 100644 include/gpu/kokkos_storage_policy.h create mode 100644 include/gpu/kokkos_tensor_ops.h create mode 100644 include/gpu/kokkos_vector_ops.h diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h new file mode 100644 index 0000000000..70a634f1f1 --- /dev/null +++ b/include/gpu/kokkos_linalg_base.h @@ -0,0 +1,472 @@ +// libMesh Kokkos compile-time linalg foundation. +// +// This header defines the small access/materialization layer that sits +// underneath richer vector/tensor algebra. It is intentionally limited to +// component access, storage-backed references, and conversion between +// vector-like/tensor-like objects and libMesh semantic types. + +#ifndef LIBMESH_KOKKOS_LINALG_BASE_H +#define LIBMESH_KOKKOS_LINALG_BASE_H + +#include "libmesh/libmesh_common.h" +#include "libmesh/libmesh_device.h" +#include "libmesh/point.h" +#include "libmesh/tensor_value.h" +#include "libmesh/type_tensor.h" +#include "libmesh/type_vector.h" +#include "libmesh/vector_value.h" + +#include +#include + +namespace libMesh::Kokkos +{ + +namespace detail +{ + +template +using remove_cvref_t = + typename std::remove_cv::type>::type; + +template +using remove_ref_t = typename std::remove_reference::type; + +template +using vector_view_value_t = + remove_cvref_t()(0, 0))>; + +template +using tensor_view_value_t = + remove_cvref_t()(0, 0, 0))>; + +} // namespace detail + +template +struct vector_traits; + +template +struct tensor_traits; + +template +struct is_vector_like : std::false_type +{ +}; + +template +struct is_tensor_like : std::false_type +{ +}; + +template +struct is_vector_ref : std::false_type +{ +}; + +template +struct is_tensor_ref : std::false_type +{ +}; + +template +inline constexpr bool is_vector_like_v = is_vector_like>::value; + +template +inline constexpr bool is_tensor_like_v = is_tensor_like>::value; + +template +inline constexpr bool is_vector_ref_v = is_vector_ref>::value; + +template +inline constexpr bool is_tensor_ref_v = is_tensor_ref>::value; + +template +class vector_ref +{ +public: + using view_type = ViewType; + using value_type = detail::vector_view_value_t; + + LIBMESH_DEVICE_INLINE + vector_ref(ViewType view, const unsigned int index) : _view(view), _index(index) {} + + LIBMESH_DEVICE_INLINE + decltype(auto) operator()(const unsigned int component) const + { + return _view(_index, component); + } + + template + LIBMESH_DEVICE_INLINE + void set(const unsigned int component, const Scalar & value) + { + static_assert(std::is_assignable::value, + "Cannot write through a vector_ref built from a read-only view"); + _view(_index, component) = value; + } + + template + LIBMESH_DEVICE_INLINE + void assign(const RightVector & right); + + template + LIBMESH_DEVICE_INLINE + void add(const RightVector & right); + + template + LIBMESH_DEVICE_INLINE + void add_scaled(const RightVector & right, const value_type & factor); + + template + LIBMESH_DEVICE_INLINE + void subtract(const RightVector & right); + + template + LIBMESH_DEVICE_INLINE + void subtract_scaled(const RightVector & right, const value_type & factor); + + LIBMESH_DEVICE_INLINE + void zero(); + + template + LIBMESH_DEVICE_INLINE + auto contract(const RightVector & right) const; + + LIBMESH_DEVICE_INLINE + auto norm() const; + + LIBMESH_DEVICE_INLINE + auto norm_sq() const; + + LIBMESH_DEVICE_INLINE + auto l1_norm() const; + + LIBMESH_DEVICE_INLINE + bool is_zero() const; + + LIBMESH_DEVICE_INLINE + auto unit() const; + + template + LIBMESH_DEVICE_INLINE + auto cross(const RightVector & right) const; + + LIBMESH_DEVICE_INLINE + unsigned int index() const + { + return _index; + } + +private: + ViewType _view; + unsigned int _index; +}; + +template +class tensor_ref +{ +public: + using view_type = ViewType; + using value_type = detail::tensor_view_value_t; + + LIBMESH_DEVICE_INLINE + tensor_ref(ViewType view, const unsigned int index) : _view(view), _index(index) {} + + LIBMESH_DEVICE_INLINE + decltype(auto) operator()(const unsigned int row, const unsigned int col) const + { + return _view(_index, row, col); + } + + template + LIBMESH_DEVICE_INLINE + void set(const unsigned int row, const unsigned int col, const Scalar & value) + { + static_assert(std::is_assignable::value, + "Cannot write through a tensor_ref built from a read-only view"); + _view(_index, row, col) = value; + } + + template + LIBMESH_DEVICE_INLINE + void assign(const RightTensor & right); + + template + LIBMESH_DEVICE_INLINE + void add(const RightTensor & right); + + template + LIBMESH_DEVICE_INLINE + void add_scaled(const RightTensor & right, const value_type & factor); + + template + LIBMESH_DEVICE_INLINE + void subtract(const RightTensor & right); + + template + LIBMESH_DEVICE_INLINE + void subtract_scaled(const RightTensor & right, const value_type & factor); + + LIBMESH_DEVICE_INLINE + void zero(); + + template + LIBMESH_DEVICE_INLINE + auto contract(const RightTensor & right) const; + + LIBMESH_DEVICE_INLINE + auto norm() const; + + LIBMESH_DEVICE_INLINE + auto norm_sq() const; + + LIBMESH_DEVICE_INLINE + bool is_zero() const; + + LIBMESH_DEVICE_INLINE + auto transpose() const; + + LIBMESH_DEVICE_INLINE + auto det(const unsigned int dim = LIBMESH_DIM) const; + + LIBMESH_DEVICE_INLINE + auto tr() const; + + LIBMESH_DEVICE_INLINE + auto inverse(const unsigned int dim = LIBMESH_DIM) const; + + template + LIBMESH_DEVICE_INLINE + void solve(const VectorLike & b, ResultVector & x) const; + + LIBMESH_DEVICE_INLINE + auto row(const unsigned int i) const; + + LIBMESH_DEVICE_INLINE + auto column(const unsigned int i) const; + + template + LIBMESH_DEVICE_INLINE + auto left_multiply(const VectorLike & v) const; + + LIBMESH_DEVICE_INLINE + unsigned int index() const + { + return _index; + } + +private: + ViewType _view; + unsigned int _index; +}; + +template +struct vector_traits> +{ + using value_type = T; + using semantic_type = libMesh::TypeVector; +}; + +template +struct vector_traits> +{ + using value_type = T; + using semantic_type = libMesh::VectorValue; +}; + +template <> +struct vector_traits +{ + using value_type = libMesh::Real; + using semantic_type = libMesh::Point; +}; + +template +struct vector_traits> +{ + using value_type = typename vector_ref::value_type; + using semantic_type = libMesh::TypeVector; +}; + +template +struct is_vector_like> : std::true_type +{ +}; + +template +struct is_vector_like> : std::true_type +{ +}; + +template <> +struct is_vector_like : std::true_type +{ +}; + +template +struct is_vector_like> : std::true_type +{ +}; + +template +struct is_vector_ref> : std::true_type +{ +}; + +template +struct tensor_traits> +{ + using value_type = T; + using semantic_type = libMesh::TypeTensor; +}; + +template +struct tensor_traits> +{ + using value_type = T; + using semantic_type = libMesh::TensorValue; +}; + +template +struct tensor_traits> +{ + using value_type = typename tensor_ref::value_type; + using semantic_type = libMesh::TypeTensor; +}; + +template +struct is_tensor_like> : std::true_type +{ +}; + +template +struct is_tensor_like> : std::true_type +{ +}; + +template +struct is_tensor_like> : std::true_type +{ +}; + +template +struct is_tensor_ref> : std::true_type +{ +}; + +template +using vector_value_type_t = typename vector_traits>::value_type; + +template +using tensor_value_type_t = typename tensor_traits>::value_type; + +template +using vector_semantic_type_t = typename vector_traits>::semantic_type; + +template +using tensor_semantic_type_t = typename tensor_traits>::semantic_type; + +template +LIBMESH_DEVICE_INLINE +decltype(auto) +vector_get_component(const T & v, const unsigned int component) +{ + return v(component); +} + +template +LIBMESH_DEVICE_INLINE +void vector_set_component(T & v, const unsigned int component, const Scalar & value) +{ + v(component) = value; +} + +template +LIBMESH_DEVICE_INLINE +void vector_set_component(vector_ref v, + const unsigned int component, + const Scalar & value) +{ + v.set(component, value); +} + +template +LIBMESH_DEVICE_INLINE +decltype(auto) +tensor_get_component(const T & T_in, const unsigned int row, const unsigned int col) +{ + return T_in(row, col); +} + +template +LIBMESH_DEVICE_INLINE +void tensor_set_component(T & T_out, + const unsigned int row, + const unsigned int col, + const Scalar & value) +{ + T_out(row, col) = value; +} + +template +LIBMESH_DEVICE_INLINE +void tensor_set_component(tensor_ref T_out, + const unsigned int row, + const unsigned int col, + const Scalar & value) +{ + T_out.set(row, col, value); +} + +template +LIBMESH_DEVICE_INLINE +vector_ref> +make_vector_ref(ViewType && view, const unsigned int index) +{ + return vector_ref>(std::forward(view), index); +} + +template +LIBMESH_DEVICE_INLINE +tensor_ref> +make_tensor_ref(ViewType && view, const unsigned int index) +{ + return tensor_ref>(std::forward(view), index); +} + +template +LIBMESH_DEVICE_INLINE +OutputVector materialize_vector(const VectorLike & v) +{ + static_assert(is_vector_like>::value, + "materialize_vector() requires a vector-like input type"); + + OutputVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, component, vector_get_component(v, component)); + + return out; +} + +template +LIBMESH_DEVICE_INLINE +OutputTensor materialize_tensor(const TensorLike & T_in) +{ + static_assert(is_tensor_like>::value, + "materialize_tensor() requires a tensor-like input type"); + + OutputTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T_in, row, col)); + + return out; +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_LINALG_BASE_H diff --git a/include/gpu/kokkos_storage.h b/include/gpu/kokkos_storage.h new file mode 100644 index 0000000000..23e59aabf8 --- /dev/null +++ b/include/gpu/kokkos_storage.h @@ -0,0 +1,53 @@ +// libMesh Kokkos storage helpers for dimension-aware vector/tensor views. + +#ifndef LIBMESH_KOKKOS_STORAGE_H +#define LIBMESH_KOKKOS_STORAGE_H + +#include "libmesh/kokkos_linalg_base.h" + +#include "libmesh/libmesh_common.h" +#include "libmesh/libmesh_device.h" +#include "libmesh/type_tensor.h" +#include "libmesh/type_vector.h" + +namespace libMesh::Kokkos +{ + +template +LIBMESH_DEVICE_INLINE +VectorType load_vector(const ViewType & view, const unsigned int i) +{ + return materialize_vector(make_vector_ref(view, i)); +} + +template +LIBMESH_DEVICE_INLINE +void store_vector(const ViewType & view, const unsigned int i, const VectorType & v) +{ + auto out = make_vector_ref(view, i); + + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + vector_set_component(out, d, vector_get_component(v, d)); +} + +template +LIBMESH_DEVICE_INLINE +TensorType load_tensor(const ViewType & view, const unsigned int i) +{ + return materialize_tensor(make_tensor_ref(view, i)); +} + +template +LIBMESH_DEVICE_INLINE +void store_tensor(const ViewType & view, const unsigned int i, const TensorType & T) +{ + auto out = make_tensor_ref(view, i); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T, row, col)); +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_STORAGE_H diff --git a/include/gpu/kokkos_storage_policy.h b/include/gpu/kokkos_storage_policy.h new file mode 100644 index 0000000000..6bfec5a6df --- /dev/null +++ b/include/gpu/kokkos_storage_policy.h @@ -0,0 +1,124 @@ +// libMesh Kokkos compile-time storage policies for fixed-dimension linalg data. +// +// These policies keep storage selection separate from the linalg algorithms: +// kernels operate on refs/materialized values, while the backend policy chooses +// the underlying Kokkos view layout. + +#ifndef LIBMESH_KOKKOS_STORAGE_POLICY_H +#define LIBMESH_KOKKOS_STORAGE_POLICY_H + +#include "libmesh/libmesh_common.h" + +#define PETSC_SKIP_CXX_COMPLEX_FIX 1 +#include +#undef __CUDACC_VER__ + +#include +#include +#include + +namespace libMesh::Kokkos +{ + +template +struct static_dim_storage_policy +{ + using scalar_type = Scalar; + using layout_type = Layout; + using vector_view = ::Kokkos::View; + using tensor_view = ::Kokkos::View; + + static constexpr const char * + name() + { + return std::is_same::value ? "layoutleft" : + std::is_same::value ? "layoutright" : + "layoutcustom"; + } +}; + +using layout_left_storage_policy = static_dim_storage_policy; +using layout_right_storage_policy = static_dim_storage_policy; +using default_storage_policy = layout_right_storage_policy; + +template +constexpr const char * +storage_policy_name() +{ + return StoragePolicy::name(); +} + +template +inline typename StoragePolicy::vector_view +make_vector_storage(const char * label, const std::size_t n) +{ + return typename StoragePolicy::vector_view(std::string(label), n); +} + +inline default_storage_policy::vector_view +make_vector_storage(const char * label, const std::size_t n) +{ + return make_vector_storage(label, n); +} + +template +inline typename StoragePolicy::tensor_view +make_tensor_storage(const char * label, const std::size_t n) +{ + return typename StoragePolicy::tensor_view(std::string(label), n); +} + +inline default_storage_policy::tensor_view +make_tensor_storage(const char * label, const std::size_t n) +{ + return make_tensor_storage(label, n); +} + +template +inline typename StoragePolicy::vector_view +upload_vector_storage(const std::vector & values, const char * label) +{ + auto d = make_vector_storage(label, values.size()); + auto h = ::Kokkos::create_mirror_view(d); + + for (std::size_t i = 0; i < values.size(); ++i) + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + h(i, component) = values[i](component); + + ::Kokkos::deep_copy(d, h); + return d; +} + +template +inline default_storage_policy::vector_view +upload_vector_storage(const std::vector & values, const char * label) +{ + return upload_vector_storage(values, label); +} + +template +inline typename StoragePolicy::tensor_view +upload_tensor_storage(const std::vector & values, const char * label) +{ + auto d = make_tensor_storage(label, values.size()); + auto h = ::Kokkos::create_mirror_view(d); + + for (std::size_t i = 0; i < values.size(); ++i) + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + h(i, row, col) = values[i](row, col); + + ::Kokkos::deep_copy(d, h); + return d; +} + +template +inline default_storage_policy::tensor_view +upload_tensor_storage(const std::vector & values, const char * label) +{ + return upload_tensor_storage(values, label); +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_STORAGE_POLICY_H diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h new file mode 100644 index 0000000000..a08080405d --- /dev/null +++ b/include/gpu/kokkos_tensor_ops.h @@ -0,0 +1,1033 @@ +// libMesh Kokkos generic tensor operations. +// +// These free functions build tensor algebra on top of the primitive +// access/materialization layer in kokkos_linalg_base.h. They are written +// against tensor-like and vector-like inputs so both libMesh owning types and +// storage-backed refs can participate in the same math. + +#ifndef LIBMESH_KOKKOS_TENSOR_OPS_H +#define LIBMESH_KOKKOS_TENSOR_OPS_H + +#include "libmesh/kokkos_linalg_base.h" +#include "libmesh/kokkos_vector_ops.h" + +#include "libmesh/tensor_tools.h" + +#include + +namespace libMesh::Kokkos +{ + +// Construction and materialization + +template +LIBMESH_DEVICE_INLINE +ResultTensor zero_tensor_value() +{ + ResultTensor out; + out.zero(); + return out; +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) +{ + ResultTensor out; + out.zero(); + + for (unsigned int i = 0; i < dim; ++i) + tensor_set_component(out, i, i, tensor_value_type_t(1)); + + return out; +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor copy_tensor(const TensorLike & T_in) +{ + return materialize_tensor(T_in); +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t copy_tensor(const TensorLike & T_in) +{ + return copy_tensor>(T_in); +} + +// Tensor reductions and predicates + +template +LIBMESH_DEVICE_INLINE +auto tensor_contract(const LeftTensor & left, const RightTensor & right) +{ + static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like left input"); + static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like right input"); + + using sum_type = + detail::remove_cvref_t; + + sum_type sum = sum_type(0); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + sum += tensor_get_component(left, row, col) * tensor_get_component(right, row, col); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_norm_sq(const TensorLike & T_in) +{ + static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); + + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + sum += libMesh::TensorTools::norm_sq(tensor_get_component(T_in, row, col)); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_norm(const TensorLike & T_in) +{ + using std::sqrt; + return sqrt(tensor_norm_sq(T_in)); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_trace(const TensorLike & T_in) +{ + static_assert(is_tensor_like_v, "tensor_trace() requires a tensor-like input"); + + using trace_type = detail::remove_cvref_t; + trace_type sum = trace_type(0); + for (unsigned int i = 0; i < LIBMESH_DIM; ++i) + sum += tensor_get_component(T_in, i, i); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_is_zero(const TensorLike & T_in) +{ + static_assert(is_tensor_like_v, "tensor_is_zero() requires a tensor-like input"); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(T_in, row, col) != tensor_value_type_t(0)) + return false; + + return true; +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_equal(const LeftTensor & left, const RightTensor & right) +{ + static_assert(is_tensor_like_v, "tensor_equal() requires a tensor-like left input"); + static_assert(is_tensor_like_v, "tensor_equal() requires a tensor-like right input"); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) + return false; + + return true; +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_not_equal(const LeftTensor & left, const RightTensor & right) +{ + return !tensor_equal(left, right); +} + +// Tensor arithmetic + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_outer_product(const LeftVector & left, const RightVector & right) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + vector_get_component(left, row) * libmesh_conj(vector_get_component(right, col))); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +libMesh::TypeTensor> +tensor_outer_product(const LeftVector & left, const RightVector & right) +{ + return tensor_outer_product>>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_add(const LeftTensor & left, const RightTensor & right) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_add(const LeftTensor & left, const RightTensor & right) +{ + return tensor_add>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_subtract(const LeftTensor & left, const RightTensor & right) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_subtract(const LeftTensor & left, const RightTensor & right) +{ + return tensor_subtract>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_scale(const Scalar & alpha, const TensorLike & T_in) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_scale(const Scalar & alpha, const TensorLike & T_in) +{ + return tensor_scale>(alpha, T_in); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_divide(const TensorLike & T_in, const Scalar & alpha) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const Scalar & alpha) +{ + return tensor_divide>(T_in, alpha); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +{ + static_assert(is_tensor_like_v, "tensor_determinant() requires a tensor-like input"); + + if (dim == 0) + return tensor_value_type_t(1); + + if (dim == 1) + return tensor_get_component(T_in, 0, 0); + + if (dim == 2) + return tensor_get_component(T_in, 0, 0) * tensor_get_component(T_in, 1, 1) - + tensor_get_component(T_in, 0, 1) * tensor_get_component(T_in, 1, 0); + +#if LIBMESH_DIM > 2 + const auto a00 = tensor_get_component(T_in, 0, 0); + const auto a01 = tensor_get_component(T_in, 0, 1); + const auto a02 = tensor_get_component(T_in, 0, 2); + const auto a10 = tensor_get_component(T_in, 1, 0); + const auto a11 = tensor_get_component(T_in, 1, 1); + const auto a12 = tensor_get_component(T_in, 1, 2); + const auto a20 = tensor_get_component(T_in, 2, 0); + const auto a21 = tensor_get_component(T_in, 2, 1); + const auto a22 = tensor_get_component(T_in, 2, 2); + + return a00 * (a11 * a22 - a12 * a21) - + a01 * (a10 * a22 - a12 * a20) + + a02 * (a10 * a21 - a11 * a20); +#else + libmesh_ignore(T_in); + return tensor_value_type_t(0); +#endif +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +{ + static_assert(is_tensor_like_v, "tensor_inverse() requires a tensor-like input"); + + ResultTensor out; + out.zero(); + + if (dim == 0) + return out; + + if (dim == 1) + { + tensor_set_component(out, 0, 0, tensor_value_type_t(1) / tensor_get_component(T_in, 0, 0)); + return out; + } + + const auto det = tensor_determinant(T_in, dim); + + if (dim == 2) + { + tensor_set_component(out, 0, 0, tensor_get_component(T_in, 1, 1) / det); + tensor_set_component(out, 0, 1, -tensor_get_component(T_in, 0, 1) / det); + tensor_set_component(out, 1, 0, -tensor_get_component(T_in, 1, 0) / det); + tensor_set_component(out, 1, 1, tensor_get_component(T_in, 0, 0) / det); + return out; + } + +#if LIBMESH_DIM > 2 + const auto a00 = tensor_get_component(T_in, 0, 0); + const auto a01 = tensor_get_component(T_in, 0, 1); + const auto a02 = tensor_get_component(T_in, 0, 2); + const auto a10 = tensor_get_component(T_in, 1, 0); + const auto a11 = tensor_get_component(T_in, 1, 1); + const auto a12 = tensor_get_component(T_in, 1, 2); + const auto a20 = tensor_get_component(T_in, 2, 0); + const auto a21 = tensor_get_component(T_in, 2, 1); + const auto a22 = tensor_get_component(T_in, 2, 2); + + tensor_set_component(out, 0, 0, (a11 * a22 - a12 * a21) / det); + tensor_set_component(out, 0, 1, (a02 * a21 - a01 * a22) / det); + tensor_set_component(out, 0, 2, (a01 * a12 - a02 * a11) / det); + tensor_set_component(out, 1, 0, (a12 * a20 - a10 * a22) / det); + tensor_set_component(out, 1, 1, (a00 * a22 - a02 * a20) / det); + tensor_set_component(out, 1, 2, (a02 * a10 - a00 * a12) / det); + tensor_set_component(out, 2, 0, (a10 * a21 - a11 * a20) / det); + tensor_set_component(out, 2, 1, (a01 * a20 - a00 * a21) / det); + tensor_set_component(out, 2, 2, (a00 * a11 - a01 * a10) / det); +#else + libmesh_ignore(T_in); +#endif + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +{ + return tensor_inverse>(T_in, dim); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_transpose(const TensorLike & T_in) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T_in, col, row)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_transpose(const TensorLike & T_in) +{ + return tensor_transpose>(T_in); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + alpha * tensor_get_component(A, row, col) + + beta * tensor_get_component(B, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) +{ + return tensor_linear_combination>(alpha, A, beta, B); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_multiply(const LeftTensor & left, const RightTensor & right) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + auto value = tensor_get_component(left, row, 0) * tensor_get_component(right, 0, col); + for (unsigned int k = 1; k < LIBMESH_DIM; ++k) + value += tensor_get_component(left, row, k) * tensor_get_component(right, k, col); + tensor_set_component(out, row, col, value); + } + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_multiply(const LeftTensor & left, const RightTensor & right) +{ + return tensor_multiply>(left, right); +} + +// Tensor/vector conversions + +template +LIBMESH_DEVICE_INLINE +ResultVector tensor_row(const TensorLike & T_in, const unsigned int row) +{ + ResultVector out; + out.zero(); + + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + vector_set_component(out, col, tensor_get_component(T_in, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +libMesh::TypeVector> +tensor_row(const TensorLike & T_in, const unsigned int row) +{ + return tensor_row>>(T_in, row); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector tensor_column(const TensorLike & T_in, const unsigned int col) +{ + ResultVector out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + vector_set_component(out, row, tensor_get_component(T_in, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +libMesh::TypeVector> +tensor_column(const TensorLike & T_in, const unsigned int col) +{ + return tensor_column>>(T_in, col); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector tensor_vector_multiply(const TensorLike & T_in, const VectorLike & v) +{ + ResultVector out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + { + auto value = tensor_get_component(T_in, row, 0) * vector_get_component(v, 0); + for (unsigned int col = 1; col < LIBMESH_DIM; ++col) + value += tensor_get_component(T_in, row, col) * vector_get_component(v, col); + vector_set_component(out, row, value); + } + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t tensor_vector_multiply(const TensorLike & T_in, const VectorLike & v) +{ + return tensor_vector_multiply>(T_in, v); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_tensor_multiply(const VectorLike & v, const TensorLike & T_in) +{ + ResultVector out; + out.zero(); + + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + auto value = vector_get_component(v, 0) * tensor_get_component(T_in, 0, col); + for (unsigned int row = 1; row < LIBMESH_DIM; ++row) + value += vector_get_component(v, row) * tensor_get_component(T_in, row, col); + vector_set_component(out, col, value); + } + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_tensor_multiply(const VectorLike & v, const TensorLike & T_in) +{ + return vector_tensor_multiply>(v, T_in); +} + +// libMesh-like convenience wrappers + +template +LIBMESH_DEVICE_INLINE +auto contract(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v, + decltype(tensor_contract(left, right))> +{ + return tensor_contract(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto norm_sq(const TensorLike & T_in) + -> std::enable_if_t, decltype(tensor_norm_sq(T_in))> +{ + return tensor_norm_sq(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto norm(const TensorLike & T_in) + -> std::enable_if_t, decltype(tensor_norm(T_in))> +{ + return tensor_norm(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto is_zero(const TensorLike & T_in) + -> std::enable_if_t, bool> +{ + return tensor_is_zero(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto outer_product(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v, + libMesh::TypeTensor>> +{ + return tensor_outer_product(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto transpose(const TensorLike & T_in) + -> std::enable_if_t, tensor_semantic_type_t> +{ + return tensor_transpose(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto det(const TensorLike & T_in) + -> std::enable_if_t, decltype(tensor_determinant(T_in))> +{ + return tensor_determinant(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) + -> std::enable_if_t, tensor_semantic_type_t> +{ + return tensor_inverse(T_in, dim); +} + +template +LIBMESH_DEVICE_INLINE +auto row(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, libMesh::TypeVector>> +{ + return tensor_row(T_in, i); +} + +template +LIBMESH_DEVICE_INLINE +auto column(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, libMesh::TypeVector>> +{ + return tensor_column(T_in, i); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v, + tensor_semantic_type_t> +{ + return tensor_multiply(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const TensorLike & T_in, const VectorLike & v) + -> std::enable_if_t && is_vector_like_v, + vector_semantic_type_t> +{ + return tensor_vector_multiply(T_in, v); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const VectorLike & v, const TensorLike & T_in) + -> std::enable_if_t && is_tensor_like_v, + vector_semantic_type_t> +{ + return vector_tensor_multiply(v, T_in); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::assign(const RightTensor & right) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, row, col, tensor_get_component(right, row, col)); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::add(const RightTensor & right) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, + row, + col, + tensor_get_component(*this, row, col) + tensor_get_component(right, row, col)); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::add_scaled(const RightTensor & right, const value_type & factor) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, + row, + col, + tensor_get_component(*this, row, col) + + factor * tensor_get_component(right, row, col)); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::subtract(const RightTensor & right) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, + row, + col, + tensor_get_component(*this, row, col) - tensor_get_component(right, row, col)); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::subtract_scaled(const RightTensor & right, const value_type & factor) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, + row, + col, + tensor_get_component(*this, row, col) - + factor * tensor_get_component(right, row, col)); +} + +template +LIBMESH_DEVICE_INLINE +void tensor_ref::zero() +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, row, col, value_type(0)); +} + +template +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::contract(const RightTensor & right) const +{ + return tensor_contract(*this, right); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::norm() const +{ + return tensor_norm(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::norm_sq() const +{ + return tensor_norm_sq(*this); +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_ref::is_zero() const +{ + return tensor_is_zero(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::transpose() const +{ + return tensor_transpose(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::det(const unsigned int dim) const +{ + return tensor_determinant(*this, dim); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::tr() const +{ + return tensor_trace(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::inverse(const unsigned int dim) const +{ + return tensor_inverse(*this, dim); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::solve(const VectorLike & b, ResultVector & x) const +{ + const auto solution = tensor_vector_multiply>(this->inverse(), b); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(x, component, vector_get_component(solution, component)); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::row(const unsigned int i) const +{ + return tensor_row(*this, i); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::column(const unsigned int i) const +{ + return tensor_column(*this, i); +} + +template +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::left_multiply(const VectorLike & v) const +{ + return vector_tensor_multiply(v, *this); +} + +// Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. + +template +LIBMESH_DEVICE_INLINE +auto operator-(const TensorLike & T_in) + -> std::enable_if_t && is_tensor_ref_v, + tensor_semantic_type_t> +{ + return tensor_scale(tensor_value_type_t(-1), T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto operator+(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + tensor_semantic_type_t> +{ + return tensor_add(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator-(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + tensor_semantic_type_t> +{ + return tensor_subtract(left, right); +} + +template && !is_tensor_like_v && + is_tensor_like_v && is_tensor_ref_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const Scalar & alpha, const TensorLike & T_in) +{ + return tensor_scale(alpha, T_in); +} + +template && is_tensor_ref_v && + !is_vector_like_v && !is_tensor_like_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const TensorLike & T_in, const Scalar & alpha) +{ + return tensor_scale(alpha, T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto operator/(const TensorLike & T_in, const Scalar & alpha) + -> std::enable_if_t && is_tensor_ref_v && + !is_vector_like_v && !is_tensor_like_v, + tensor_semantic_type_t> +{ + return tensor_divide(T_in, alpha); +} + +template && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const LeftTensor & left, const RightTensor & right) +{ + return tensor_multiply(left, right); +} + +template && is_vector_like_v && + (is_tensor_ref_v || is_vector_ref_v), + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const TensorLike & T_in, const VectorLike & v) +{ + return tensor_vector_multiply(T_in, v); +} + +template && is_tensor_like_v && + (is_vector_ref_v || is_tensor_ref_v), + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const VectorLike & v, const TensorLike & T_in) +{ + return vector_tensor_multiply(v, T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto operator==(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + bool> +{ + return tensor_equal(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator!=(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + bool> +{ + return tensor_not_equal(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator+=(LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + LeftTensor &> +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator-=(LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + LeftTensor &> +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator*=(LeftTensor & left, const Scalar & alpha) + -> std::enable_if_t && is_tensor_ref_v && + !is_vector_like_v && !is_tensor_like_v, + LeftTensor &> +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, row, col, tensor_get_component(left, row, col) * alpha); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator/=(LeftTensor & left, const Scalar & alpha) + -> std::enable_if_t && is_tensor_ref_v && + !is_vector_like_v && !is_tensor_like_v, + LeftTensor &> +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, row, col, tensor_get_component(left, row, col) / alpha); + + return left; +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_TENSOR_OPS_H diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h new file mode 100644 index 0000000000..3fb1406866 --- /dev/null +++ b/include/gpu/kokkos_vector_ops.h @@ -0,0 +1,746 @@ +// libMesh Kokkos generic vector operations. +// +// These free functions build vector algebra on top of the primitive +// access/materialization layer in kokkos_linalg_base.h. They are written +// against vector-like inputs so both libMesh owning types and storage-backed +// refs can participate in the same math. + +#ifndef LIBMESH_KOKKOS_VECTOR_OPS_H +#define LIBMESH_KOKKOS_VECTOR_OPS_H + +#include "libmesh/kokkos_linalg_base.h" + +#include "libmesh/tensor_tools.h" + +#include + +namespace libMesh::Kokkos +{ + +// Construction and materialization + +template +LIBMESH_DEVICE_INLINE +ResultVector zero_vector_value() +{ + ResultVector out; + out.zero(); + return out; +} + +template +LIBMESH_DEVICE_INLINE +ResultVector copy_vector(const VectorLike & v) +{ + return materialize_vector(v); +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t copy_vector(const VectorLike & v) +{ + return copy_vector>(v); +} + +// Reductions and predicates + +template +LIBMESH_DEVICE_INLINE +auto vector_dot(const LeftVector & left, const RightVector & right) +{ + static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); + static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); + + using sum_type = + detail::remove_cvref_t; + + sum_type sum = sum_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += vector_get_component(left, component) * vector_get_component(right, component); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto vector_contract(const LeftVector & left, const RightVector & right) +{ + return vector_dot(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_norm_sq(const VectorLike & v) +{ + static_assert(is_vector_like_v, "vector_norm_sq() requires a vector-like input"); + + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += libMesh::TensorTools::norm_sq(vector_get_component(v, component)); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto vector_norm(const VectorLike & v) +{ + using std::sqrt; + return sqrt(vector_norm_sq(v)); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_l1_norm(const VectorLike & v) +{ + static_assert(is_vector_like_v, "vector_l1_norm() requires a vector-like input"); + + using std::abs; + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += abs(vector_get_component(v, component)); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +bool vector_is_zero(const VectorLike & v) +{ + static_assert(is_vector_like_v, "vector_is_zero() requires a vector-like input"); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if (vector_get_component(v, component) != vector_value_type_t(0)) + return false; + + return true; +} + +template +LIBMESH_DEVICE_INLINE +bool vector_equal(const LeftVector & left, const RightVector & right) +{ + static_assert(is_vector_like_v, "vector_equal() requires a vector-like left input"); + static_assert(is_vector_like_v, "vector_equal() requires a vector-like right input"); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if (vector_get_component(left, component) != vector_get_component(right, component)) + return false; + + return true; +} + +template +LIBMESH_DEVICE_INLINE +bool vector_not_equal(const LeftVector & left, const RightVector & right) +{ + return !vector_equal(left, right); +} + +// Arithmetic + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_add(const LeftVector & left, const RightVector & right) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, + component, + vector_get_component(left, component) + vector_get_component(right, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_add(const LeftVector & left, const RightVector & right) +{ + return vector_add>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_subtract(const LeftVector & left, const RightVector & right) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, + component, + vector_get_component(left, component) - vector_get_component(right, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_subtract(const LeftVector & left, const RightVector & right) +{ + return vector_subtract>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_scale(const Scalar & alpha, const VectorLike & v) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, component, alpha * vector_get_component(v, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_scale(const Scalar & alpha, const VectorLike & v) +{ + return vector_scale>(alpha, v); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_divide(const VectorLike & v, const Scalar & alpha) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, component, vector_get_component(v, component) / alpha); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_divide(const VectorLike & v, const Scalar & alpha) +{ + return vector_divide>(v, alpha); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, + component, + alpha * vector_get_component(a, component) + + beta * vector_get_component(b, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b) +{ + return vector_linear_combination>(alpha, a, beta, b); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b, + const ScalarC & gamma, + const VectorC & c) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, + component, + alpha * vector_get_component(a, component) + + beta * vector_get_component(b, component) + + gamma * vector_get_component(c, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b, + const ScalarC & gamma, + const VectorC & c) +{ + return vector_linear_combination>(alpha, a, beta, b, gamma, c); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_unit(const VectorLike & v) +{ + const auto length = vector_norm(v); + libmesh_assert_not_equal_to(length, static_cast(0.)); + return vector_divide(v, length); +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_unit(const VectorLike & v) +{ + return vector_unit>(v); +} + +// Geometry + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_cross(const LeftVector & left, const RightVector & right) +{ + ResultVector out; + out.zero(); + +#if LIBMESH_DIM == 3 + vector_set_component(out, + 0, + vector_get_component(left, 1) * vector_get_component(right, 2) - + vector_get_component(left, 2) * vector_get_component(right, 1)); + vector_set_component(out, + 1, + -vector_get_component(left, 0) * vector_get_component(right, 2) + + vector_get_component(left, 2) * vector_get_component(right, 0)); + vector_set_component(out, + 2, + vector_get_component(left, 0) * vector_get_component(right, 1) - + vector_get_component(left, 1) * vector_get_component(right, 0)); +#else + libmesh_ignore(left); + libmesh_ignore(right); +#endif + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_cross(const LeftVector & left, const RightVector & right) +{ + return vector_cross>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_triple_product(const LeftVector & left, + const MiddleVector & middle, + const RightVector & right) +{ +#if LIBMESH_DIM == 3 + return vector_get_component(left, 0) * + (vector_get_component(middle, 1) * vector_get_component(right, 2) - + vector_get_component(middle, 2) * vector_get_component(right, 1)) - + vector_get_component(left, 1) * + (vector_get_component(middle, 0) * vector_get_component(right, 2) - + vector_get_component(middle, 2) * vector_get_component(right, 0)) + + vector_get_component(left, 2) * + (vector_get_component(middle, 0) * vector_get_component(right, 1) - + vector_get_component(middle, 1) * vector_get_component(right, 0)); +#else + libmesh_ignore(left, middle, right); + using value_type = + detail::remove_cvref_t; + return value_type(0); +#endif +} + +template +LIBMESH_DEVICE_INLINE +auto vector_cross_norm_sq(const LeftVector & left, const RightVector & right) +{ + const auto z = vector_get_component(left, 0) * vector_get_component(right, 1) - + vector_get_component(left, 1) * vector_get_component(right, 0); + +#if LIBMESH_DIM == 3 + const auto x = vector_get_component(left, 1) * vector_get_component(right, 2) - + vector_get_component(left, 2) * vector_get_component(right, 1); + const auto y = vector_get_component(left, 0) * vector_get_component(right, 2) - + vector_get_component(left, 2) * vector_get_component(right, 0); + return x * x + y * y + z * z; +#else + return z * z; +#endif +} + +template +LIBMESH_DEVICE_INLINE +auto vector_solid_angle(const VectorA & v01, const VectorB & v02, const VectorC & v03) +{ + using std::atan; + + const auto norm01 = vector_norm(v01); + const auto norm02 = vector_norm(v02); + const auto norm03 = vector_norm(v03); + const auto tan_half_angle = + vector_triple_product(v01, v02, v03) / + (vector_dot(v01, v02) * norm03 + + vector_dot(v01, v03) * norm02 + + vector_dot(v02, v03) * norm01 + + norm01 * norm02 * norm03); + + return Real(2) * atan(tan_half_angle); +} + +// libMesh-like convenience wrappers + +template +LIBMESH_DEVICE_INLINE +auto contract(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v, + decltype(vector_contract(left, right))> +{ + return vector_contract(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto norm_sq(const VectorLike & v) + -> std::enable_if_t, decltype(vector_norm_sq(v))> +{ + return vector_norm_sq(v); +} + +template +LIBMESH_DEVICE_INLINE +auto norm(const VectorLike & v) + -> std::enable_if_t, decltype(vector_norm(v))> +{ + return vector_norm(v); +} + +template +LIBMESH_DEVICE_INLINE +auto is_zero(const VectorLike & v) + -> std::enable_if_t, bool> +{ + return vector_is_zero(v); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::assign(const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, component, vector_get_component(right, component)); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::add(const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, + component, + vector_get_component(*this, component) + vector_get_component(right, component)); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::add_scaled(const RightVector & right, const value_type & factor) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, + component, + vector_get_component(*this, component) + + factor * vector_get_component(right, component)); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::subtract(const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, + component, + vector_get_component(*this, component) - vector_get_component(right, component)); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::subtract_scaled(const RightVector & right, const value_type & factor) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, + component, + vector_get_component(*this, component) - + factor * vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void vector_ref::zero() +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, component, value_type(0)); +} + +template +template +LIBMESH_DEVICE_INLINE +auto vector_ref::contract(const RightVector & right) const +{ + return vector_contract(*this, right); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_ref::norm() const +{ + return vector_norm(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_ref::norm_sq() const +{ + return vector_norm_sq(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_ref::l1_norm() const +{ + return vector_l1_norm(*this); +} + +template +LIBMESH_DEVICE_INLINE +bool vector_ref::is_zero() const +{ + return vector_is_zero(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_ref::unit() const +{ + return vector_unit(*this); +} + +template +template +LIBMESH_DEVICE_INLINE +auto vector_ref::cross(const RightVector & right) const +{ + return vector_cross(*this, right); +} + +// Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. + +template +LIBMESH_DEVICE_INLINE +auto operator-(const VectorLike & v) + -> std::enable_if_t && is_vector_ref_v, + vector_semantic_type_t> +{ + return vector_scale(vector_value_type_t(-1), v); +} + +template +LIBMESH_DEVICE_INLINE +auto operator+(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + vector_semantic_type_t> +{ + return vector_add(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator-(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + vector_semantic_type_t> +{ + return vector_subtract(left, right); +} + +template && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const LeftVector & left, const RightVector & right) +{ + return vector_dot(left, right); +} + +template && !is_tensor_like_v && + is_vector_like_v && is_vector_ref_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const Scalar & alpha, const VectorLike & v) +{ + return vector_scale(alpha, v); +} + +template && is_vector_ref_v && + !is_vector_like_v && !is_tensor_like_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const VectorLike & v, const Scalar & alpha) +{ + return vector_scale(alpha, v); +} + +template && is_vector_ref_v && + !is_vector_like_v && !is_tensor_like_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator/(const VectorLike & v, const Scalar & alpha) +{ + return vector_divide(v, alpha); +} + +template +LIBMESH_DEVICE_INLINE +auto operator==(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + bool> +{ + return vector_equal(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator!=(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + bool> +{ + return vector_not_equal(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator+=(LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + LeftVector &> +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) + vector_get_component(right, component)); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator-=(LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + LeftVector &> +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) - vector_get_component(right, component)); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator*=(LeftVector & left, const Scalar & alpha) + -> std::enable_if_t && is_vector_ref_v && + !is_vector_like_v && !is_tensor_like_v, + LeftVector &> +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, component, vector_get_component(left, component) * alpha); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator/=(LeftVector & left, const Scalar & alpha) + -> std::enable_if_t && is_vector_ref_v && + !is_vector_like_v && !is_tensor_like_v, + LeftVector &> +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, component, vector_get_component(left, component) / alpha); + + return left; +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_VECTOR_OPS_H diff --git a/include/include_HEADERS b/include/include_HEADERS index 05232af00c..ba755fe0e5 100644 --- a/include/include_HEADERS +++ b/include/include_HEADERS @@ -28,6 +28,7 @@ include_HEADERS = \ base/libmesh_abort.h \ base/libmesh_base.h \ base/libmesh_common.h \ + base/libmesh_device.h \ base/libmesh_documentation.h \ base/libmesh_exceptions.h \ base/libmesh_logging.h \ @@ -174,6 +175,11 @@ include_HEADERS = \ geom/sphere.h \ geom/stored_range.h \ geom/surface.h \ + gpu/kokkos_linalg_base.h \ + gpu/kokkos_storage.h \ + gpu/kokkos_storage_policy.h \ + gpu/kokkos_tensor_ops.h \ + gpu/kokkos_vector_ops.h \ ghosting/default_coupling.h \ ghosting/ghost_point_neighbors.h \ ghosting/ghosting_functor.h \ diff --git a/include/libmesh/Makefile.am b/include/libmesh/Makefile.am index 03d58b3881..1769dce142 100644 --- a/include/libmesh/Makefile.am +++ b/include/libmesh/Makefile.am @@ -19,6 +19,7 @@ BUILT_SOURCES = \ libmesh_augment_std_namespace.h \ libmesh_base.h \ libmesh_common.h \ + libmesh_device.h \ libmesh_documentation.h \ libmesh_exceptions.h \ libmesh_logging.h \ @@ -172,6 +173,11 @@ BUILT_SOURCES = \ overlap_coupling.h \ point_neighbor_coupling.h \ sibling_coupling.h \ + kokkos_linalg_base.h \ + kokkos_storage.h \ + kokkos_storage_policy.h \ + kokkos_tensor_ops.h \ + kokkos_vector_ops.h \ abaqus_io.h \ boundary_info.h \ boundary_mesh.h \ @@ -659,6 +665,9 @@ libmesh_base.h: $(top_srcdir)/include/base/libmesh_base.h libmesh_common.h: $(top_srcdir)/include/base/libmesh_common.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +libmesh_device.h: $(top_srcdir)/include/base/libmesh_device.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + libmesh_documentation.h: $(top_srcdir)/include/base/libmesh_documentation.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ @@ -1118,6 +1127,21 @@ point_neighbor_coupling.h: $(top_srcdir)/include/ghosting/point_neighbor_couplin sibling_coupling.h: $(top_srcdir)/include/ghosting/sibling_coupling.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +kokkos_linalg_base.h: $(top_srcdir)/include/gpu/kokkos_linalg_base.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_storage.h: $(top_srcdir)/include/gpu/kokkos_storage.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_storage_policy.h: $(top_srcdir)/include/gpu/kokkos_storage_policy.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_tensor_ops.h: $(top_srcdir)/include/gpu/kokkos_tensor_ops.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_vector_ops.h: $(top_srcdir)/include/gpu/kokkos_vector_ops.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + abaqus_io.h: $(top_srcdir)/include/mesh/abaqus_io.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ @@ -2146,4 +2170,3 @@ xdr_cxx.h: $(top_srcdir)/include/utils/xdr_cxx.h parallel_communicator_specializations: $(top_srcdir)/include/timpi_shims/parallel_communicator_specializations $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ - From 5d4ad42fd0802a23f14e02e658601f4a93bd1add Mon Sep 17 00:00:00 2001 From: rochi00 Date: Fri, 8 May 2026 15:04:52 -0600 Subject: [PATCH 06/45] Add Kokkos numerics oracle test infrastructure --- tests/Makefile.am | 42 +- .../kokkos_numerics_oracle_test_utils.h | 90 ++++ .../kokkos_tensor_ops_oracle_fixtures.h | 161 ++++++ .../kokkos_tensor_ops_oracle_runners.h | 482 ++++++++++++++++++ .../kokkos_vector_ops_oracle_fixtures.h | 223 ++++++++ .../kokkos_vector_ops_oracle_runners.h | 327 ++++++++++++ 6 files changed, 1324 insertions(+), 1 deletion(-) create mode 100644 tests/numerics/kokkos_numerics_oracle_test_utils.h create mode 100644 tests/numerics/kokkos_tensor_ops_oracle_fixtures.h create mode 100644 tests/numerics/kokkos_tensor_ops_oracle_runners.h create mode 100644 tests/numerics/kokkos_vector_ops_oracle_fixtures.h create mode 100644 tests/numerics/kokkos_vector_ops_oracle_runners.h diff --git a/tests/Makefile.am b/tests/Makefile.am index 6427362120..266c260650 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,6 +7,7 @@ AM_CPPFLAGS = $(libmesh_optional_INCLUDES) -I$(top_builddir)/include \ -DLIBMESH_IS_UNIT_TESTING AM_LDFLAGS = $(libmesh_LDFLAGS) $(libmesh_contrib_LDFLAGS) LIBS = $(libmesh_optional_LIBS) $(CPPUNIT_LIBS) +KOKKOS_TEST_CPPFLAGS = # We might have turned on -Werror and/or paranoid warnings CXXFLAGS_DBG += $(ACSM_ANY_WERROR_FLAG) $(ACSM_ANY_PARANOID_FLAGS) @@ -249,6 +250,26 @@ if LIBMESH_ENABLE_FPARSER endif check_PROGRAMS = # empty, append below +TESTS = + +if LIBMESH_ENABLE_KOKKOS + KOKKOS_TEST_CPPFLAGS += -I$(top_srcdir)/include $(KOKKOS_CPPFLAGS) + + check_PROGRAMS += kokkos_vector_ops_oracle_unit kokkos_tensor_ops_oracle_unit + TESTS += kokkos_vector_ops_oracle_unit kokkos_tensor_ops_oracle_unit + + kokkos_vector_ops_oracle_unit_SOURCES = numerics/kokkos_vector_ops_oracle_test.K + kokkos_vector_ops_oracle_unit_CPPFLAGS = $(AM_CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) + kokkos_vector_ops_oracle_unit_CXXFLAGS = $(AM_CXXFLAGS) $(KOKKOS_CXXFLAGS) + kokkos_vector_ops_oracle_unit_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) + kokkos_vector_ops_oracle_unit_LDADD = $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) + + kokkos_tensor_ops_oracle_unit_SOURCES = numerics/kokkos_tensor_ops_oracle_test.K + kokkos_tensor_ops_oracle_unit_CPPFLAGS = $(AM_CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) + kokkos_tensor_ops_oracle_unit_CXXFLAGS = $(AM_CXXFLAGS) $(KOKKOS_CXXFLAGS) + kokkos_tensor_ops_oracle_unit_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) + kokkos_tensor_ops_oracle_unit_LDADD = $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) +endif # our GLIBC debugging preprocessor flags seem to potentially conflict # with libcppunit binaries. Some cppunit versions work fine for us, @@ -359,9 +380,28 @@ $(top_builddir)/libmesh_oprof.la: FORCE if LIBMESH_ENABLE_CPPUNIT -TESTS = run_unit_tests.sh +TESTS += run_unit_tests.sh endif +# Compile .K translation units with the Kokkos device compiler. +# If KOKKOS_CXX is not the MPI wrapper, configure populates +# $(KOKKOS_MPI_CPPFLAGS) from the wrapper's compile flags so mpi.h and +# any wrapper-provided defines remain visible. +.K.o: + $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(KOKKOS_MPI_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ + -c $< -o $@ + +# Custom link rules so the Kokkos compiler drives the final link step. +kokkos_vector_ops_oracle_unit_LINK = \ + $(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ + $(LDFLAGS) $(kokkos_vector_ops_oracle_unit_LDFLAGS) -o $@ + +kokkos_tensor_ops_oracle_unit_LINK = \ + $(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ + $(LDFLAGS) $(kokkos_tensor_ops_oracle_unit_LDFLAGS) -o $@ + CLEANFILES = cube_mesh.xda \ slit_mesh.xda \ slit_solution.xda \ diff --git a/tests/numerics/kokkos_numerics_oracle_test_utils.h b/tests/numerics/kokkos_numerics_oracle_test_utils.h new file mode 100644 index 0000000000..c25ce2a056 --- /dev/null +++ b/tests/numerics/kokkos_numerics_oracle_test_utils.h @@ -0,0 +1,90 @@ +#ifndef KOKKOS_NUMERICS_ORACLE_TEST_UTILS_H +#define KOKKOS_NUMERICS_ORACLE_TEST_UTILS_H + +#include "libmesh/libmesh.h" + +// Avoid conflicting complex operators between CUDA and PETSc +#define PETSC_SKIP_CXX_COMPLEX_FIX 1 +#include +#undef __CUDACC_VER__ + +#include +#include +#include + +namespace libMeshTest +{ +namespace KokkosOracle +{ + +using libMesh::Real; + +template +inline ::Kokkos::View +upload_objects(const std::vector & values, const char * label) +{ + ::Kokkos::View d(std::string(label), values.size()); + auto h = ::Kokkos::create_mirror_view(d); + for (std::size_t i = 0; i < values.size(); ++i) + h(i) = values[i]; + ::Kokkos::deep_copy(d, h); + return d; +} + +inline int +compare_device_scalars(const ::Kokkos::View & d_values, + const std::vector & ref_values, + const double tol) +{ + auto h_values = ::Kokkos::create_mirror_view(d_values); + ::Kokkos::deep_copy(h_values, d_values); + + int fail = 0; + for (std::size_t i = 0; i < ref_values.size(); ++i) + if (std::fabs(h_values(i) - ref_values[i]) > tol) + ++fail; + + return fail; +} + +template +inline int +compare_device_vectors(const ViewType & d_values, + const std::vector & ref_values, + const double tol) +{ + auto h_values = ::Kokkos::create_mirror_view(d_values); + ::Kokkos::deep_copy(h_values, d_values); + + int fail = 0; + for (std::size_t i = 0; i < ref_values.size(); ++i) + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + if (std::fabs(h_values(i, d) - ref_values[i](d)) > tol) + ++fail; + + return fail; +} + +template +inline int +compare_device_tensors(const ViewType & d_values, + const std::vector & ref_values, + const double tol) +{ + auto h_values = ::Kokkos::create_mirror_view(d_values); + ::Kokkos::deep_copy(h_values, d_values); + + int fail = 0; + for (std::size_t i = 0; i < ref_values.size(); ++i) + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (std::fabs(h_values(i, row, col) - ref_values[i](row, col)) > tol) + ++fail; + + return fail; +} + +} // namespace KokkosOracle +} // namespace libMeshTest + +#endif diff --git a/tests/numerics/kokkos_tensor_ops_oracle_fixtures.h b/tests/numerics/kokkos_tensor_ops_oracle_fixtures.h new file mode 100644 index 0000000000..8a53f37bd8 --- /dev/null +++ b/tests/numerics/kokkos_tensor_ops_oracle_fixtures.h @@ -0,0 +1,161 @@ +#ifndef KOKKOS_TENSOR_OPS_ORACLE_FIXTURES_H +#define KOKKOS_TENSOR_OPS_ORACLE_FIXTURES_H + +#include "libmesh/libmesh.h" +#include "libmesh/point.h" +#include "libmesh/tensor_value.h" +#include "libmesh/type_n_tensor.h" +#include "libmesh/vector_value.h" +#include "gpu/kokkos_tensor_ops.h" +#include "gpu/kokkos_storage.h" +#include "gpu/kokkos_storage_policy.h" + +#include "kokkos_numerics_oracle_test_utils.h" + +#include +#include + +namespace libMeshTest +{ +namespace KokkosTensorOracle +{ + +using libMesh::Real; + +static constexpr double tol = 2.0e-13; + +using oracle_vector = libMesh::TypeVector; +using oracle_tensor = libMesh::TypeTensor; + +inline oracle_vector +make_host_vector(const Real x, const Real y = 0, const Real z = 0) +{ + oracle_vector v; + v.zero(); + v(0) = x; +#if LIBMESH_DIM > 1 + v(1) = y; +#endif +#if LIBMESH_DIM > 2 + v(2) = z; +#endif + return v; +} + +inline oracle_tensor +make_host_tensor(const Real xx, + const Real xy = 0, + const Real xz = 0, + const Real yx = 0, + const Real yy = 0, + const Real yz = 0, + const Real zx = 0, + const Real zy = 0, + const Real zz = 0) +{ + oracle_tensor T; + T.zero(); + T(0, 0) = xx; +#if LIBMESH_DIM > 1 + T(0, 1) = xy; + T(1, 0) = yx; + T(1, 1) = yy; +#endif +#if LIBMESH_DIM > 2 + T(0, 2) = xz; + T(1, 2) = yz; + T(2, 0) = zx; + T(2, 1) = zy; + T(2, 2) = zz; +#endif + return T; +} + +struct tensor_dim_case +{ + oracle_tensor J; + unsigned int dim; + const char * name; +}; + +static const tensor_dim_case dim_cases[] = { + { make_host_tensor(1.7, -0.2, 0.5, + 0.3, 1.1, -0.4, + -0.6, 0.8, 0.9), + 1, + "leading_1d" }, +#if LIBMESH_DIM > 1 + { make_host_tensor(2.5, -0.75, 0.4, + 1.2, 1.8, -0.6, + -0.3, 0.9, 1.4), + 2, + "leading_2d" }, +#endif +#if LIBMESH_DIM > 2 + { make_host_tensor(9.08973348886179e-01, 3.36455579239923e-01, 5.16389236893863e-01, + 9.44156071777472e-01, 1.35610910092516e-01, 1.49881119060538e-02, + 1.15988384086146e-01, 6.79845197685518e-03, 3.77028969454745e-01), + 3, + "leading_3d" } +#endif +}; + +inline oracle_tensor +build_identity_tensor(const unsigned int dim) +{ + oracle_tensor I; + I.zero(); + for (unsigned int i = 0; i < dim; ++i) + I(i, i) = Real(1); + return I; +} + +inline Real +host_leading_determinant(const oracle_tensor & J, const unsigned int dim) +{ + if (dim == 0) + return Real(1); + if (dim == 1) + return J(0, 0); + if (dim == 2) + return J(0, 0) * J(1, 1) - J(0, 1) * J(1, 0); +#if LIBMESH_DIM > 2 + return J.det(); +#else + return Real(0); +#endif +} + +inline oracle_tensor +host_leading_inverse(const oracle_tensor & J, const unsigned int dim) +{ + oracle_tensor inv; + inv.zero(); + + if (dim == 1) + { + inv(0, 0) = Real(1) / J(0, 0); + return inv; + } + + if (dim == 2) + { + const Real det = host_leading_determinant(J, dim); + inv(0, 0) = J(1, 1) / det; + inv(0, 1) = -J(0, 1) / det; + inv(1, 0) = -J(1, 0) / det; + inv(1, 1) = J(0, 0) / det; + return inv; + } + +#if LIBMESH_DIM > 2 + return oracle_tensor(J.inverse()); +#else + return inv; +#endif +} + +} // namespace KokkosTensorOracle +} // namespace libMeshTest + +#endif diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h new file mode 100644 index 0000000000..cad772919a --- /dev/null +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -0,0 +1,482 @@ +#ifndef KOKKOS_TENSOR_OPS_ORACLE_RUNNERS_H +#define KOKKOS_TENSOR_OPS_ORACLE_RUNNERS_H + +#include "kokkos_tensor_ops_oracle_fixtures.h" + +#include +#include + +namespace libMeshTest +{ +namespace KokkosTensorOracle +{ + +template +static int +test_dim_ops() +{ + const unsigned int ncases = sizeof(dim_cases) / sizeof(dim_cases[0]); + + std::vector J_values(ncases); + std::vector dims(ncases); + std::vector ref_det(ncases); + std::vector ref_inv(ncases); + std::vector ref_I(ncases); + std::vector ref_prod_left(ncases); + std::vector ref_prod_right(ncases); + + for (unsigned int c = 0; c < ncases; ++c) + { + const auto & info = dim_cases[c]; + J_values[c] = info.J; + dims[c] = info.dim; + + ref_det[c] = host_leading_determinant(info.J, info.dim); + ref_inv[c] = host_leading_inverse(info.J, info.dim); + ref_I[c] = build_identity_tensor(info.dim); + ref_prod_left[c] = info.J * ref_inv[c]; + ref_prod_right[c] = ref_inv[c] * info.J; + } + + auto d_J = libMesh::Kokkos::upload_tensor_storage(J_values, "tensor_dim_ops_J"); + auto d_dims = libMeshTest::KokkosOracle::upload_objects(dims, "tensor_dim_ops_dim"); + ::Kokkos::View d_det("tensor_dim_ops_det", ncases); + auto d_inv = libMesh::Kokkos::make_tensor_storage("tensor_dim_ops_inv", ncases); + auto d_I = libMesh::Kokkos::make_tensor_storage("tensor_dim_ops_I", ncases); + auto d_prod_left = libMesh::Kokkos::make_tensor_storage("tensor_dim_ops_prod_left", ncases); + auto d_prod_right = libMesh::Kokkos::make_tensor_storage("tensor_dim_ops_prod_right", ncases); + + ::Kokkos::parallel_for( + static_cast(ncases), + KOKKOS_LAMBDA(int c) { + const auto J_ref = libMesh::Kokkos::make_tensor_ref(d_J, c); + const unsigned int dim = d_dims(c); + const Real det = libMesh::Kokkos::tensor_determinant(J_ref, dim); + const auto inv = J_ref.inverse(dim); + const auto I = libMesh::Kokkos::tensor_identity(dim); + const auto prod_left = J_ref * inv; + const auto prod_right = inv * J_ref; + + d_det(c) = det; + libMesh::Kokkos::store_tensor(d_inv, c, inv); + libMesh::Kokkos::store_tensor(d_I, c, I); + libMesh::Kokkos::store_tensor(d_prod_left, c, prod_left); + libMesh::Kokkos::store_tensor(d_prod_right, c, prod_right); + }); + ::Kokkos::fence(); + + return libMeshTest::KokkosOracle::compare_device_scalars(d_det, ref_det, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_inv, ref_inv, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_I, ref_I, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_prod_left, ref_prod_left, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_prod_right, ref_prod_right, tol); +} + +template +static int +test_tensor_ops() +{ + const auto A = make_host_tensor(1.1, -0.4, 0.7, + 0.3, 1.9, -1.2, + -0.8, 0.5, 2.2); + const auto a = make_host_vector(2.0, 3.0, 4.0); + const auto b = make_host_vector(5.0, -6.0, 7.0); + const auto c = make_host_vector(1.25, -0.5, 2.0); + + const auto outer = libMesh::outer_product(a, b); + const auto transpose = A.transpose(); + const auto mix = 1.5 * A - 0.25 * outer; + const auto right = A * c; + const auto left = c * A; + const Real contract = A.contract(outer); + const Real norm = A.norm(); + const auto zero = libMesh::Kokkos::zero_tensor_value(); + + std::vector ref_outer(1, outer); + std::vector ref_transpose(1, transpose); + std::vector ref_mix(1, mix); + std::vector ref_rows(LIBMESH_DIM); + std::vector ref_columns(LIBMESH_DIM); + for (unsigned int i = 0; i < LIBMESH_DIM; ++i) + { + ref_rows[i] = A.row(i); + ref_columns[i] = A.column(i); + } + std::vector ref_right(1, right); + std::vector ref_left(1, left); + std::vector ref_scalars = {contract, norm, zero.is_zero() ? 1.0 : 0.0, A.is_zero() ? 1.0 : 0.0}; + + auto d_A = libMesh::Kokkos::upload_tensor_storage(std::vector{A}, "tensor_ops_A"); + auto d_a = libMesh::Kokkos::upload_vector_storage(std::vector{a}, "tensor_ops_a"); + auto d_b = libMesh::Kokkos::upload_vector_storage(std::vector{b}, "tensor_ops_b"); + auto d_c = libMesh::Kokkos::upload_vector_storage(std::vector{c}, "tensor_ops_c"); + auto d_outer = libMesh::Kokkos::make_tensor_storage("tensor_ops_outer", 1); + auto d_transpose = libMesh::Kokkos::make_tensor_storage("tensor_ops_transpose", 1); + auto d_mix = libMesh::Kokkos::make_tensor_storage("tensor_ops_mix", 1); + auto d_rows = libMesh::Kokkos::make_vector_storage("tensor_ops_rows", LIBMESH_DIM); + auto d_columns = libMesh::Kokkos::make_vector_storage("tensor_ops_columns", LIBMESH_DIM); + auto d_right = libMesh::Kokkos::make_vector_storage("tensor_ops_right", 1); + auto d_left = libMesh::Kokkos::make_vector_storage("tensor_ops_left", 1); + ::Kokkos::View d_scalars("tensor_ops_scalars", 4); + + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + const auto A_ref = libMesh::Kokkos::make_tensor_ref(d_A, 0); + const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); + const auto b_ref = libMesh::Kokkos::make_vector_ref(d_b, 0); + const auto c_ref = libMesh::Kokkos::make_vector_ref(d_c, 0); + const auto outer_d = libMesh::Kokkos::tensor_outer_product(a_ref, b_ref); + const auto transpose_d = A_ref.transpose(); + const auto mix_d = Real(1.5) * A_ref - Real(0.25) * outer_d; + const auto right_d = A_ref * c_ref; + const auto left_d = c_ref * A_ref; + const Real contract_d = A_ref.contract(outer_d); + const Real norm_d = A_ref.norm(); + const bool zero_is_zero_d = libMesh::Kokkos::zero_tensor_value().is_zero(); + const bool A_is_zero_d = A_ref.is_zero(); + + for (unsigned int i = 0; i < LIBMESH_DIM; ++i) + { + libMesh::Kokkos::store_vector(d_rows, i, A_ref.row(i)); + libMesh::Kokkos::store_vector(d_columns, i, A_ref.column(i)); + } + + libMesh::Kokkos::store_tensor(d_outer, 0, outer_d); + libMesh::Kokkos::store_tensor(d_transpose, 0, transpose_d); + libMesh::Kokkos::store_tensor(d_mix, 0, mix_d); + libMesh::Kokkos::store_vector(d_right, 0, right_d); + libMesh::Kokkos::store_vector(d_left, 0, left_d); + d_scalars(0) = contract_d; + d_scalars(1) = norm_d; + d_scalars(2) = zero_is_zero_d ? 1.0 : 0.0; + d_scalars(3) = A_is_zero_d ? 1.0 : 0.0; + }); + ::Kokkos::fence(); + + return libMeshTest::KokkosOracle::compare_device_tensors(d_outer, ref_outer, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_transpose, ref_transpose, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_mix, ref_mix, tol) + + libMeshTest::KokkosOracle::compare_device_vectors(d_rows, ref_rows, tol) + + libMeshTest::KokkosOracle::compare_device_vectors(d_columns, ref_columns, tol) + + libMeshTest::KokkosOracle::compare_device_vectors(d_right, ref_right, tol) + + libMeshTest::KokkosOracle::compare_device_vectors(d_left, ref_left, tol) + + libMeshTest::KokkosOracle::compare_device_scalars(d_scalars, ref_scalars, tol); +} + +inline int +test_tensor_host_only_ops() +{ + int fail = 0; + +#if LIBMESH_DIM > 2 + { + libMesh::TensorValue tensor(2., 1., 0., + 1., 2., 1., + 0., 1., 2.); + fail += tensor.is_hpd(/*rel_tol=*/0.) ? 0 : 1; + } + + { + libMesh::TensorValue tensor(1., 0., 0., + 0., 0., 1., + 0., 1., 0.); + fail += tensor.is_hpd() ? 1 : 0; + } + + { + const libMesh::Point x(1., 0., 0.); + const auto R = libMesh::RealTensorValue::extrinsic_rotation_matrix(90., 0., 0.); + const auto rotated = R * x; + fail += (std::fabs(rotated(0)) <= tol) ? 0 : 1; + fail += (std::fabs(rotated(1) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(rotated(2)) <= tol) ? 0 : 1; + + const auto invR = libMesh::RealTensorValue::inverse_extrinsic_rotation_matrix(90., 0., 0.); + const auto unrotated = invR * rotated; + fail += (std::fabs(unrotated(0) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(unrotated(1)) <= tol) ? 0 : 1; + fail += (std::fabs(unrotated(2)) <= tol) ? 0 : 1; + } + + { + const libMesh::Point x(1., 1., 1.); + const auto R = libMesh::RealTensorValue::extrinsic_rotation_matrix(90., 90., 90.); + const auto rotated = R * x; + fail += (std::fabs(rotated(0) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(rotated(1) + 1.) <= tol) ? 0 : 1; + fail += (std::fabs(rotated(2) - 1.) <= tol) ? 0 : 1; + + const auto invR = libMesh::RealTensorValue::inverse_extrinsic_rotation_matrix(90., 90., 90.); + const auto unrotated = invR * rotated; + fail += (std::fabs(unrotated(0) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(unrotated(1) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(unrotated(2) - 1.) <= tol) ? 0 : 1; + } +#endif + +#ifdef LIBMESH_HAVE_METAPHYSICL + typedef typename MetaPhysicL::ReplaceAlgebraicType< + std::vector>, + typename libMesh::TensorTools::IncrementRank< + typename MetaPhysicL::ValueType>>::type>::type>::type + ReplacedType; + constexpr bool assertion = + std::is_same>>::value; + fail += assertion ? 0 : 1; +#endif + + return fail; +} + +template +static int +test_linalg_foundation_storage_roundtrip() +{ + int fail = 0; + + auto d_vector = libMesh::Kokkos::make_vector_storage("foundation_vector", 1); + auto d_tensor = libMesh::Kokkos::make_tensor_storage("foundation_tensor", 1); + + { + auto h_vector = ::Kokkos::create_mirror_view(d_vector); + auto h_tensor = ::Kokkos::create_mirror_view(d_tensor); + + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + h_vector(0, d) = Real(d + 1) * Real(0.5); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + h_tensor(0, row, col) = Real(10 * row + col + 1) * Real(0.25); + + ::Kokkos::deep_copy(d_vector, h_vector); + ::Kokkos::deep_copy(d_tensor, h_tensor); + } + + const auto vector_in = libMesh::Kokkos::make_vector_ref(d_vector, 0); + const auto tensor_in = libMesh::Kokkos::make_tensor_ref(d_tensor, 0); + + const auto as_point = libMesh::Kokkos::materialize_vector(vector_in); + const auto as_vector_value = + libMesh::Kokkos::materialize_vector>(vector_in); + const auto as_type_vector = + libMesh::Kokkos::materialize_vector>(vector_in); + + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + { + const Real expected = Real(d + 1) * Real(0.5); + fail += (std::fabs(as_point(d) - expected) <= tol) ? 0 : 1; + fail += (std::fabs(as_vector_value(d) - expected) <= tol) ? 0 : 1; + fail += (std::fabs(as_type_vector(d) - expected) <= tol) ? 0 : 1; + } + + const auto as_tensor_value = + libMesh::Kokkos::materialize_tensor>(tensor_in); + const auto as_type_tensor = + libMesh::Kokkos::materialize_tensor>(tensor_in); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + const Real expected = Real(10 * row + col + 1) * Real(0.25); + fail += (std::fabs(as_tensor_value(row, col) - expected) <= tol) ? 0 : 1; + fail += (std::fabs(as_type_tensor(row, col) - expected) <= tol) ? 0 : 1; + } + + auto d_vector_out = libMesh::Kokkos::make_vector_storage("foundation_vector_out", 1); + auto d_tensor_out = libMesh::Kokkos::make_tensor_storage("foundation_tensor_out", 1); + + auto vector_out = libMesh::Kokkos::make_vector_ref(d_vector_out, 0); + auto tensor_out = libMesh::Kokkos::make_tensor_ref(d_tensor_out, 0); + + vector_out.zero(); + vector_out.assign(as_vector_value); + vector_out.add_scaled(as_type_vector, Real(0)); + vector_out.subtract_scaled(as_type_vector, Real(0)); + + tensor_out.zero(); + tensor_out.assign(as_tensor_value); + tensor_out.add_scaled(as_type_tensor, Real(0)); + tensor_out.subtract_scaled(as_type_tensor, Real(0)); + + { + auto h_vector_out = ::Kokkos::create_mirror_view(d_vector_out); + auto h_tensor_out = ::Kokkos::create_mirror_view(d_tensor_out); + ::Kokkos::deep_copy(h_vector_out, d_vector_out); + ::Kokkos::deep_copy(h_tensor_out, d_tensor_out); + + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + fail += (std::fabs(h_vector_out(0, d) - as_vector_value(d)) <= tol) ? 0 : 1; + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + fail += (std::fabs(h_tensor_out(0, row, col) - as_tensor_value(row, col)) <= tol) ? 0 : 1; + } + + return fail; +} + +template +static int +test_mixed_representation_ops() +{ + int fail = 0; + + const auto a = make_host_vector(2.0, 3.0, 4.0); + const auto b = make_host_vector(5.0, -6.0, 7.0); + const auto c = make_host_vector(1.25, -0.5, 2.0); + const auto A = make_host_tensor(1.1, -0.4, 0.7, + 0.3, 1.9, -1.2, + -0.8, 0.5, 2.2); + + auto d_a = libMesh::Kokkos::upload_vector_storage(std::vector{a}, "mixed_ops_a"); + auto d_A = libMesh::Kokkos::upload_tensor_storage(std::vector{A}, "mixed_ops_A"); + + ::Kokkos::View d_scalars("mixed_ops_scalars", 8); + auto d_vectors = libMesh::Kokkos::make_vector_storage("mixed_ops_vectors", 5); + auto d_tensors = libMesh::Kokkos::make_tensor_storage("mixed_ops_tensors", 4); + + const auto ref_dot = a * b; + const auto ref_contract = A.contract(libMesh::outer_product(a, b)); + const auto ref_det = host_leading_determinant(A, LIBMESH_DIM); + const auto ref_right = A * c; + const auto ref_left = A.left_multiply(c); + const auto ref_mix = a + b; + const auto ref_row0 = A.row(0); + const auto ref_col0 = A.column(0); + const auto ref_transpose = A.transpose(); + const auto ref_inverse = host_leading_inverse(A, LIBMESH_DIM); + const auto ref_add = A + ref_transpose; + const auto ref_scaled = 0.5 * A; + const auto ref_trace = A.tr(); + + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); + const auto A_ref = libMesh::Kokkos::make_tensor_ref(d_A, 0); + + const auto mix = a_ref + b; + const auto right = A_ref * c; + const auto left = A_ref.left_multiply(c); + const auto row0 = A_ref.row(0); + const auto col0 = A_ref.column(0); + const auto transpose = A_ref.transpose(); + const auto inverse = A_ref.inverse(); + const auto add = A_ref + ref_transpose; + const auto scaled = Real(0.5) * A_ref; + const auto outer = libMesh::Kokkos::tensor_outer_product(a_ref, b); + + d_scalars(0) = a_ref * b; + d_scalars(1) = A_ref.contract(outer); + d_scalars(2) = A_ref.det(); + d_scalars(3) = (A_ref == A) ? 1.0 : 0.0; + d_scalars(4) = (A_ref != inverse) ? 1.0 : 0.0; + d_scalars(5) = libMesh::Kokkos::vector_equal(row0, ref_row0) ? 1.0 : 0.0; + d_scalars(6) = libMesh::Kokkos::vector_equal(col0, ref_col0) ? 1.0 : 0.0; + d_scalars(7) = A_ref.tr(); + + libMesh::Kokkos::store_vector(d_vectors, 0, right); + libMesh::Kokkos::store_vector(d_vectors, 1, left); + libMesh::Kokkos::store_vector(d_vectors, 2, mix); + libMesh::Kokkos::store_vector(d_vectors, 3, row0); + libMesh::Kokkos::store_vector(d_vectors, 4, col0); + libMesh::Kokkos::store_tensor(d_tensors, 0, transpose); + libMesh::Kokkos::store_tensor(d_tensors, 1, inverse); + libMesh::Kokkos::store_tensor(d_tensors, 2, add); + libMesh::Kokkos::store_tensor(d_tensors, 3, scaled); + }); + ::Kokkos::fence(); + + fail += libMeshTest::KokkosOracle::compare_device_scalars( + d_scalars, + std::vector{ref_dot, ref_contract, ref_det, 1.0, 1.0, 1.0, 1.0, ref_trace}, + tol); + fail += libMeshTest::KokkosOracle::compare_device_vectors( + d_vectors, + std::vector{ref_right, ref_left, ref_mix, ref_row0, ref_col0}, + tol); + fail += libMeshTest::KokkosOracle::compare_device_tensors( + d_tensors, + std::vector{ref_transpose, ref_inverse, ref_add, ref_scaled}, + tol); + + return fail; +} + +inline int +run_all_oracles() +{ + int total_fail = 0; + + const int dim_fail_left = test_dim_ops(); + std::printf("[tensor_dim_kernel_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + dim_fail_left ? "FAIL" : "PASS", + dim_fail_left); + total_fail += dim_fail_left; + + const int dim_fail_right = test_dim_ops(); + std::printf("[tensor_dim_kernel_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + dim_fail_right ? "FAIL" : "PASS", + dim_fail_right); + total_fail += dim_fail_right; + + const int tensor_fail_left = test_tensor_ops(); + std::printf("[tensor_ops_kernel_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + tensor_fail_left ? "FAIL" : "PASS", + tensor_fail_left); + total_fail += tensor_fail_left; + + const int tensor_fail_right = test_tensor_ops(); + std::printf("[tensor_ops_kernel_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + tensor_fail_right ? "FAIL" : "PASS", + tensor_fail_right); + total_fail += tensor_fail_right; + + const int host_fail = test_tensor_host_only_ops(); + std::printf("[tensor_host_ops_oracle] %s (%d failures)\n", + host_fail ? "FAIL" : "PASS", + host_fail); + total_fail += host_fail; + + const int foundation_fail_left = + test_linalg_foundation_storage_roundtrip(); + std::printf("[kokkos_linalg_foundation_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + foundation_fail_left ? "FAIL" : "PASS", + foundation_fail_left); + total_fail += foundation_fail_left; + + const int foundation_fail_right = + test_linalg_foundation_storage_roundtrip(); + std::printf("[kokkos_linalg_foundation_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + foundation_fail_right ? "FAIL" : "PASS", + foundation_fail_right); + total_fail += foundation_fail_right; + + const int mixed_fail_left = test_mixed_representation_ops(); + std::printf("[kokkos_linalg_mixed_representation_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_fail_left ? "FAIL" : "PASS", + mixed_fail_left); + total_fail += mixed_fail_left; + + const int mixed_fail_right = test_mixed_representation_ops(); + std::printf("[kokkos_linalg_mixed_representation_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_fail_right ? "FAIL" : "PASS", + mixed_fail_right); + total_fail += mixed_fail_right; + + return total_fail; +} + +} // namespace KokkosTensorOracle +} // namespace libMeshTest + +#endif diff --git a/tests/numerics/kokkos_vector_ops_oracle_fixtures.h b/tests/numerics/kokkos_vector_ops_oracle_fixtures.h new file mode 100644 index 0000000000..5bce52de34 --- /dev/null +++ b/tests/numerics/kokkos_vector_ops_oracle_fixtures.h @@ -0,0 +1,223 @@ +#ifndef KOKKOS_VECTOR_OPS_ORACLE_FIXTURES_H +#define KOKKOS_VECTOR_OPS_ORACLE_FIXTURES_H + +#include "libmesh/libmesh.h" +#include "libmesh/tensor_value.h" +#include "libmesh/type_vector.h" +#include "libmesh/vector_value.h" +#include "gpu/kokkos_vector_ops.h" +#include "gpu/kokkos_storage.h" +#include "gpu/kokkos_storage_policy.h" + +#include "kokkos_numerics_oracle_test_utils.h" + +#include +#include + +namespace libMeshTest +{ +namespace KokkosVectorOracle +{ + +using libMesh::Real; + +static constexpr double tol = 2.0e-13; +static constexpr double unit_tol = 1.0e-14; +static constexpr Real golden_ratio = 1.6180339887498948482; +static constexpr unsigned int solid_angle_results = + 1 + ((LIBMESH_DIM > 1) ? 2u : 0u) + ((LIBMESH_DIM > 2) ? 4u : 0u); +static constexpr unsigned int vector_results = + 11 + ((LIBMESH_DIM > 2) ? 2u : 0u); +static constexpr unsigned int scalar_results = 11 + solid_angle_results; + +template +LIBMESH_DEVICE_INLINE +Vec +make_vector(const Real x, const Real y = 0, const Real z = 0) +{ + Vec v; + v.zero(); + v(0) = x; +#if LIBMESH_DIM > 1 + v(1) = y; +#endif +#if LIBMESH_DIM > 2 + v(2) = z; +#endif + return v; +} + +inline libMesh::TypeVector +as_type_vector(const libMesh::TypeVector & v) +{ + return v; +} + +inline libMesh::TypeVector +as_type_vector(const libMesh::VectorValue & v) +{ + return make_vector>(v(0) +#if LIBMESH_DIM > 1 + , + v(1) +#endif +#if LIBMESH_DIM > 2 + , + v(2) +#endif + ); +} + +template +struct host_oracle +{ + std::vector vectors; + std::vector scalars; +}; + +struct vector_case +{ + const char * name; + Real ax, ay, az; + Real bx, by, bz; + Real cx, cy, cz; +}; + +static const vector_case cases[] = { +#if LIBMESH_DIM >= 1 + { "line_case_a", 2.0, 0.0, 0.0, -3.0, 0.0, 0.0, 0.5, 0.0, 0.0 }, + { "line_case_b", -1.25, 0.0, 0.0, 4.5, 0.0, 0.0, -2.0, 0.0, 0.0 }, +#endif +#if LIBMESH_DIM >= 2 + { "plane_case_a", 2.0, 3.0, 0.0, 5.0, -6.0, 0.0, 1.25, -0.5, 0.0 }, + { "plane_case_b", -1.0, 4.0, 0.0, 0.5, 2.5, 0.0, -3.0, 1.5, 0.0 }, +#endif +#if LIBMESH_DIM >= 3 + { "space_case_a", 2.0, 3.0, 4.0, 5.0, -6.0, 7.0, 1.25, -0.5, 2.0 }, + { "space_case_b", -1.0, 4.0, 0.75, 0.5, 2.5, -3.5, -3.0, 1.5, 2.25 }, +#endif +}; + +template +inline host_oracle +build_host_oracle(const Vec & a, const Vec & b, const Vec & c) +{ + host_oracle result; + result.vectors.reserve(vector_results); + result.scalars.reserve(scalar_results); + + const auto copied = a; + + Vec mix = a + b; + mix -= c; + + Vec scaled = 1.25 * a; + scaled += (-0.5) * b; + scaled += (0.25) * c; + + Vec plus_assign = a; + plus_assign += b; + + Vec minus_assign = a; + minus_assign -= b; + + Vec accum; + accum.zero(); + accum.add_scaled(a, 1.25); + accum.add_scaled(b, -0.5); + accum.subtract_scaled(c, -0.25); + + const auto divided = a / 5.0; + const auto outer_right = libMesh::outer_product(a, 5.0); + const auto outer_left = libMesh::outer_product(5.0, a); + + Vec mult_assign = a; + mult_assign *= 5.0; + + Vec div_assign = a; + div_assign /= 5.0; + + Vec assign_zero = a; + assign_zero = 0.0; + + result.vectors.push_back(copied); + result.vectors.push_back(mix); + result.vectors.push_back(scaled); + result.vectors.push_back(accum); + result.vectors.push_back(plus_assign); + result.vectors.push_back(minus_assign); + result.vectors.push_back(divided); + result.vectors.push_back(outer_right); + result.vectors.push_back(outer_left); + result.vectors.push_back(mult_assign); + result.vectors.push_back(div_assign); + + result.scalars.push_back(a * b); + result.scalars.push_back(a.contract(b)); + result.scalars.push_back(mix.norm()); + result.scalars.push_back(mix.norm_sq()); + result.scalars.push_back(make_vector(0.0, 0.0, 0.0).is_zero() ? 1.0 : 0.0); + result.scalars.push_back(mix.is_zero() ? 1.0 : 0.0); + result.scalars.push_back((a == a) ? 1.0 : 0.0); + result.scalars.push_back((a == b) ? 1.0 : 0.0); + result.scalars.push_back((a != a) ? 1.0 : 0.0); + result.scalars.push_back((a != b) ? 1.0 : 0.0); + result.scalars.push_back(assign_zero.is_zero() ? 1.0 : 0.0); + + const auto xvec = make_vector(1.3); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xvec), + as_type_vector(xvec), + as_type_vector(xvec))); + +#if LIBMESH_DIM > 1 + const auto yvec = make_vector(0.0, 2.7); + const auto xydiag = make_vector(3.1, 3.1); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xvec), + as_type_vector(xvec), + as_type_vector(yvec))); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xvec), + as_type_vector(yvec), + as_type_vector(xydiag))); +#endif + +#if LIBMESH_DIM > 2 + const auto xypdiag = make_vector(0.8, -0.8); + const auto zvec = make_vector(0.0, 0.0, 1.1); + const auto xzdiag = make_vector(0.0, 0.7, 0.7); + const auto icosa1 = make_vector(1.0, golden_ratio, 0.0); + const auto icosa2 = make_vector(-1.0, golden_ratio, 0.0); + const auto icosa3 = make_vector(0.0, 1.0, golden_ratio); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xydiag), + as_type_vector(yvec), + as_type_vector(zvec))); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xvec), + as_type_vector(yvec), + as_type_vector(xzdiag))); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xypdiag), + as_type_vector(xydiag), + as_type_vector(zvec))); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(icosa1), + as_type_vector(icosa2), + as_type_vector(icosa3))); +#endif + +#if LIBMESH_DIM > 2 + const auto cross = a.cross(b); + auto unit_cross = cross; + if (cross.norm() > unit_tol) + unit_cross = cross.unit(); + + result.vectors.push_back(cross); + result.vectors.push_back(unit_cross); +#endif + + libmesh_assert_equal_to(result.vectors.size(), vector_results); + libmesh_assert_equal_to(result.scalars.size(), scalar_results); + + return result; +} + +} // namespace KokkosVectorOracle +} // namespace libMeshTest + +#endif diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h new file mode 100644 index 0000000000..73fbbe7834 --- /dev/null +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -0,0 +1,327 @@ +#ifndef KOKKOS_VECTOR_OPS_ORACLE_RUNNERS_H +#define KOKKOS_VECTOR_OPS_ORACLE_RUNNERS_H + +#include "kokkos_vector_ops_oracle_fixtures.h" + +#include + +namespace libMeshTest +{ +namespace KokkosVectorOracle +{ + +template +static int +test_vector_ops_case(const vector_case & info) +{ + const auto a = make_vector(info.ax, info.ay, info.az); + const auto b = make_vector(info.bx, info.by, info.bz); + const auto c = make_vector(info.cx, info.cy, info.cz); + + const auto expected = build_host_oracle(a, b, c); + + auto d_a = libMesh::Kokkos::upload_vector_storage(std::vector{a}, "vector_ops_a"); + auto d_b = libMesh::Kokkos::upload_vector_storage(std::vector{b}, "vector_ops_b"); + auto d_c = libMesh::Kokkos::upload_vector_storage(std::vector{c}, "vector_ops_c"); + auto d_vectors = libMesh::Kokkos::make_vector_storage("vector_ops_vectors", vector_results); + ::Kokkos::View d_scalars("vector_ops_scalars", scalar_results); + + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); + const auto b_ref = libMesh::Kokkos::make_vector_ref(d_b, 0); + const auto c_ref = libMesh::Kokkos::make_vector_ref(d_c, 0); + + const Vec copied = libMesh::Kokkos::copy_vector(a_ref); + const Vec mix = libMesh::Kokkos::vector_linear_combination( + Real(1), a_ref, Real(1), b_ref, Real(-1), c_ref); + const Vec scaled = libMesh::Kokkos::vector_linear_combination( + Real(1.25), a_ref, Real(-0.5), b_ref, Real(0.25), c_ref); + const Vec plus_assign = a_ref + b_ref; + const Vec minus_assign = a_ref - b_ref; + const Vec accum = libMesh::Kokkos::vector_linear_combination( + Real(1.25), a_ref, Real(-0.5), b_ref, Real(0.25), c_ref); + const Vec divided = a_ref / Real(5.0); + const Vec outer_right = Real(5.0) * a_ref; + const Vec outer_left = a_ref * Real(5.0); + const Vec mult_assign = a_ref * Real(5.0); + const Vec div_assign = a_ref / Real(5.0); + const Vec assign_zero = libMesh::Kokkos::zero_vector_value(); + + const Real dot = libMesh::Kokkos::vector_dot(a_ref, b_ref); + const Real contract = a_ref.contract(b_ref); + const Real norm = mix.norm(); + const Real norm_sq = mix.norm_sq(); + const Vec zero = libMesh::Kokkos::zero_vector_value(); + + unsigned int vector_offset = 0; + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, copied); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, mix); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, scaled); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, accum); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, plus_assign); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, minus_assign); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, divided); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, outer_right); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, outer_left); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, mult_assign); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, div_assign); + + unsigned int scalar_offset = 0; + d_scalars(scalar_offset++) = a_ref * b_ref; + d_scalars(scalar_offset++) = contract; + d_scalars(scalar_offset++) = norm; + d_scalars(scalar_offset++) = norm_sq; + d_scalars(scalar_offset++) = zero.is_zero() ? 1.0 : 0.0; + d_scalars(scalar_offset++) = mix.is_zero() ? 1.0 : 0.0; + d_scalars(scalar_offset++) = (a_ref == a_ref) ? 1.0 : 0.0; + d_scalars(scalar_offset++) = (a_ref == b_ref) ? 1.0 : 0.0; + d_scalars(scalar_offset++) = (a_ref != a_ref) ? 1.0 : 0.0; + d_scalars(scalar_offset++) = (a_ref != b_ref) ? 1.0 : 0.0; + d_scalars(scalar_offset++) = assign_zero.is_zero() ? 1.0 : 0.0; + + const Vec xvec = make_vector(1.3); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xvec, xvec, xvec); + +#if LIBMESH_DIM > 1 + const Vec yvec = make_vector(0.0, 2.7); + const Vec xydiag = make_vector(3.1, 3.1); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xvec, xvec, yvec); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xvec, yvec, xydiag); +#endif + +#if LIBMESH_DIM > 2 + const Vec xypdiag = make_vector(0.8, -0.8); + const Vec zvec = make_vector(0.0, 0.0, 1.1); + const Vec xzdiag = make_vector(0.0, 0.7, 0.7); + const Vec icosa1 = make_vector(1.0, golden_ratio, 0.0); + const Vec icosa2 = make_vector(-1.0, golden_ratio, 0.0); + const Vec icosa3 = make_vector(0.0, 1.0, golden_ratio); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xydiag, yvec, zvec); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xvec, yvec, xzdiag); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xypdiag, xydiag, zvec); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(icosa1, icosa2, icosa3); +#endif + +#if LIBMESH_DIM > 2 + const Vec cross = a_ref.cross(b_ref); + Vec unit_cross = cross; + if (libMesh::Kokkos::vector_norm(cross) > unit_tol) + unit_cross = libMesh::Kokkos::vector_unit(cross); + + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, cross); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, unit_cross); +#endif + + libmesh_assert_equal_to(vector_offset, vector_results); + libmesh_assert_equal_to(scalar_offset, scalar_results); + }); + ::Kokkos::fence(); + + return libMeshTest::KokkosOracle::compare_device_vectors(d_vectors, expected.vectors, tol) + + libMeshTest::KokkosOracle::compare_device_scalars(d_scalars, expected.scalars, tol); +} + +template +int +run_vector_cases(const char * suite_name) +{ + int fail = 0; + + for (const auto & info : cases) + { + const int f = test_vector_ops_case(info); + std::printf("[%s] [%s] [%s] %s (%d failures)\n", + suite_name, + libMesh::Kokkos::storage_policy_name(), + info.name, + f ? "FAIL" : "PASS", + f); + fail += f; + } + + return fail; +} + +inline int +test_vector_host_only_traits() +{ + int fail = 0; + +#ifdef LIBMESH_HAVE_METAPHYSICL + typedef typename MetaPhysicL::ReplaceAlgebraicType< + std::vector>, + typename libMesh::TensorTools::IncrementRank< + typename MetaPhysicL::ValueType>>::type>::type>::type + ReplacedType; + constexpr bool typevector_assertion = + std::is_same>>::value; + fail += typevector_assertion ? 0 : 1; + + typedef typename MetaPhysicL::ReplaceAlgebraicType< + std::vector>, + typename libMesh::TensorTools::IncrementRank< + typename MetaPhysicL::ValueType>>::type>::type>::type + ReplacedValueType; + constexpr bool vectorvalue_assertion = + std::is_same>>::value; + fail += vectorvalue_assertion ? 0 : 1; +#endif + + return fail; +} + +template +static int +test_mixed_representation_ops() +{ + int fail = 0; + + const auto a = make_vector(2.0, 3.0, 4.0); + const auto b = make_vector(5.0, -6.0, 7.0); + const auto c = make_vector(1.25, -0.5, 2.0); + + auto d_a = libMesh::Kokkos::upload_vector_storage(std::vector{a}, "mixed_vector_a"); + auto d_b = libMesh::Kokkos::upload_vector_storage(std::vector{b}, "mixed_vector_b"); + + auto d_vectors = + libMesh::Kokkos::make_vector_storage("mixed_vector_vectors", (LIBMESH_DIM > 2) ? 5 : 3); + ::Kokkos::View d_scalars("mixed_vector_scalars", (LIBMESH_DIM > 2) ? 7 : 5); + + const auto ref_sum = a + b; + const auto ref_diff = a - b; + const auto ref_scaled = 1.5 * a; + const auto ref_dot = a * b; + const auto ref_contract = a.contract(b); + const auto ref_solid_angle = + libMesh::solid_angle(as_type_vector(a), as_type_vector(b), as_type_vector(c)); + const auto ref_cross_norm_sq = libMesh::cross_norm_sq(as_type_vector(a), as_type_vector(b)); + +#if LIBMESH_DIM > 2 + const auto ref_cross = a.cross(b); + auto ref_unit_cross = ref_cross; + if (ref_cross.norm() > unit_tol) + ref_unit_cross = ref_cross.unit(); +#endif + + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); + const auto b_ref = libMesh::Kokkos::make_vector_ref(d_b, 0); + + const auto sum = a_ref + b; + const auto diff = a - b_ref; + const auto scaled = Real(1.5) * a_ref; + + libMesh::Kokkos::store_vector(d_vectors, 0, sum); + libMesh::Kokkos::store_vector(d_vectors, 1, diff); + libMesh::Kokkos::store_vector(d_vectors, 2, scaled); + + d_scalars(0) = a_ref * b; + d_scalars(1) = b_ref.contract(a); + d_scalars(2) = (a_ref == a) ? 1.0 : 0.0; + d_scalars(3) = (a_ref != b) ? 1.0 : 0.0; + d_scalars(4) = libMesh::Kokkos::vector_solid_angle(a_ref, b, c); + +#if LIBMESH_DIM > 2 + const auto cross = a_ref.cross(b); + Vec unit_cross = cross; + if (libMesh::Kokkos::vector_norm(cross) > unit_tol) + unit_cross = libMesh::Kokkos::vector_unit(cross); + + libMesh::Kokkos::store_vector(d_vectors, 3, cross); + libMesh::Kokkos::store_vector(d_vectors, 4, unit_cross); + d_scalars(5) = libMesh::Kokkos::vector_cross_norm_sq(a_ref, b); + d_scalars(6) = (cross == libMesh::Kokkos::vector_cross(a, b_ref)) ? 1.0 : 0.0; +#endif + }); + ::Kokkos::fence(); + + fail += libMeshTest::KokkosOracle::compare_device_vectors( + d_vectors, + [&]() { + std::vector ref = {ref_sum, ref_diff, ref_scaled}; +#if LIBMESH_DIM > 2 + ref.push_back(ref_cross); + ref.push_back(ref_unit_cross); +#endif + return ref; + }(), + tol); + + fail += libMeshTest::KokkosOracle::compare_device_scalars( + d_scalars, + [&]() { + std::vector ref = {ref_dot, ref_contract, 1.0, 1.0, ref_solid_angle}; +#if LIBMESH_DIM > 2 + ref.push_back(ref_cross_norm_sq); + ref.push_back(1.0); +#endif + return ref; + }(), + tol); + + return fail; +} + +inline int +run_all_oracles() +{ + int total_fail = 0; + + total_fail += run_vector_cases>( + "typevector_kernel_oracle"); + total_fail += run_vector_cases>( + "typevector_kernel_oracle"); + total_fail += run_vector_cases>( + "vectorvalue_kernel_oracle"); + total_fail += run_vector_cases>( + "vectorvalue_kernel_oracle"); + + const int mixed_typevector_left = + test_mixed_representation_ops>(); + std::printf("[vector_mixed_representation_oracle] [%s] [typevector] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_typevector_left ? "FAIL" : "PASS", + mixed_typevector_left); + total_fail += mixed_typevector_left; + + const int mixed_typevector_right = + test_mixed_representation_ops>(); + std::printf("[vector_mixed_representation_oracle] [%s] [typevector] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_typevector_right ? "FAIL" : "PASS", + mixed_typevector_right); + total_fail += mixed_typevector_right; + + const int mixed_vectorvalue_left = + test_mixed_representation_ops>(); + std::printf("[vector_mixed_representation_oracle] [%s] [vectorvalue] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_vectorvalue_left ? "FAIL" : "PASS", + mixed_vectorvalue_left); + total_fail += mixed_vectorvalue_left; + + const int mixed_vectorvalue_right = + test_mixed_representation_ops>(); + std::printf("[vector_mixed_representation_oracle] [%s] [vectorvalue] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_vectorvalue_right ? "FAIL" : "PASS", + mixed_vectorvalue_right); + total_fail += mixed_vectorvalue_right; + + const int host_fail = test_vector_host_only_traits(); + std::printf("[vector_host_traits_oracle] %s (%d failures)\n", + host_fail ? "FAIL" : "PASS", + host_fail); + total_fail += host_fail; + + return total_fail; +} + +} // namespace KokkosVectorOracle +} // namespace libMeshTest + +#endif From 4c38f2c56c2fc9e7ce653f821186d97c058e003a Mon Sep 17 00:00:00 2001 From: rochi00 Date: Fri, 8 May 2026 15:04:55 -0600 Subject: [PATCH 07/45] Add Kokkos vector and tensor oracle tests --- .../numerics/kokkos_tensor_ops_oracle_test.K | 20 +++++++++++++++++++ .../numerics/kokkos_vector_ops_oracle_test.K | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/numerics/kokkos_tensor_ops_oracle_test.K create mode 100644 tests/numerics/kokkos_vector_ops_oracle_test.K diff --git a/tests/numerics/kokkos_tensor_ops_oracle_test.K b/tests/numerics/kokkos_tensor_ops_oracle_test.K new file mode 100644 index 0000000000..858d477369 --- /dev/null +++ b/tests/numerics/kokkos_tensor_ops_oracle_test.K @@ -0,0 +1,20 @@ +#include "libmesh/libmesh_config.h" +#include "kokkos_tensor_ops_oracle_runners.h" + +int +main(int argc, char ** argv) +{ + Kokkos::initialize(argc, argv); + libMesh::LibMeshInit init(argc, argv); + + const int total_fail = libMeshTest::KokkosTensorOracle::run_all_oracles(); + + Kokkos::finalize(); + + if (total_fail == 0) + std::printf("ALL TESTS PASSED\n"); + else + std::printf("%d TEST(S) FAILED\n", total_fail); + + return total_fail ? 1 : 0; +} diff --git a/tests/numerics/kokkos_vector_ops_oracle_test.K b/tests/numerics/kokkos_vector_ops_oracle_test.K new file mode 100644 index 0000000000..fedc7651ff --- /dev/null +++ b/tests/numerics/kokkos_vector_ops_oracle_test.K @@ -0,0 +1,20 @@ +#include "libmesh/libmesh_config.h" +#include "kokkos_vector_ops_oracle_runners.h" + +int +main(int argc, char ** argv) +{ + Kokkos::initialize(argc, argv); + libMesh::LibMeshInit init(argc, argv); + + const int total_fail = libMeshTest::KokkosVectorOracle::run_all_oracles(); + + Kokkos::finalize(); + + if (total_fail == 0) + std::printf("ALL TESTS PASSED\n"); + else + std::printf("%d TEST(S) FAILED\n", total_fail); + + return total_fail ? 1 : 0; +} From 11809617a267ae575aa929290533a91cced18ad0 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Mon, 11 May 2026 15:44:23 -0600 Subject: [PATCH 08/45] Run tensor foundation oracle on device --- .../kokkos_tensor_ops_oracle_runners.h | 103 ++++++++++-------- 1 file changed, 60 insertions(+), 43 deletions(-) diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index cad772919a..07670821ba 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -233,8 +233,6 @@ template static int test_linalg_foundation_storage_roundtrip() { - int fail = 0; - auto d_vector = libMesh::Kokkos::make_vector_storage("foundation_vector", 1); auto d_tensor = libMesh::Kokkos::make_tensor_storage("foundation_tensor", 1); @@ -253,51 +251,64 @@ test_linalg_foundation_storage_roundtrip() ::Kokkos::deep_copy(d_tensor, h_tensor); } - const auto vector_in = libMesh::Kokkos::make_vector_ref(d_vector, 0); - const auto tensor_in = libMesh::Kokkos::make_tensor_ref(d_tensor, 0); - - const auto as_point = libMesh::Kokkos::materialize_vector(vector_in); - const auto as_vector_value = - libMesh::Kokkos::materialize_vector>(vector_in); - const auto as_type_vector = - libMesh::Kokkos::materialize_vector>(vector_in); - - for (unsigned int d = 0; d < LIBMESH_DIM; ++d) - { - const Real expected = Real(d + 1) * Real(0.5); - fail += (std::fabs(as_point(d) - expected) <= tol) ? 0 : 1; - fail += (std::fabs(as_vector_value(d) - expected) <= tol) ? 0 : 1; - fail += (std::fabs(as_type_vector(d) - expected) <= tol) ? 0 : 1; - } + auto d_vector_out = libMesh::Kokkos::make_vector_storage("foundation_vector_out", 1); + auto d_tensor_out = libMesh::Kokkos::make_tensor_storage("foundation_tensor_out", 1); + ::Kokkos::View d_fail("foundation_fail"); - const auto as_tensor_value = - libMesh::Kokkos::materialize_tensor>(tensor_in); - const auto as_type_tensor = - libMesh::Kokkos::materialize_tensor>(tensor_in); + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + int local_fail = 0; - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - { - const Real expected = Real(10 * row + col + 1) * Real(0.25); - fail += (std::fabs(as_tensor_value(row, col) - expected) <= tol) ? 0 : 1; - fail += (std::fabs(as_type_tensor(row, col) - expected) <= tol) ? 0 : 1; - } + const auto vector_in = libMesh::Kokkos::make_vector_ref(d_vector, 0); + const auto tensor_in = libMesh::Kokkos::make_tensor_ref(d_tensor, 0); - auto d_vector_out = libMesh::Kokkos::make_vector_storage("foundation_vector_out", 1); - auto d_tensor_out = libMesh::Kokkos::make_tensor_storage("foundation_tensor_out", 1); + const auto as_point = libMesh::Kokkos::materialize_vector(vector_in); + const auto as_vector_value = + libMesh::Kokkos::materialize_vector>(vector_in); + const auto as_type_vector = + libMesh::Kokkos::materialize_vector>(vector_in); - auto vector_out = libMesh::Kokkos::make_vector_ref(d_vector_out, 0); - auto tensor_out = libMesh::Kokkos::make_tensor_ref(d_tensor_out, 0); + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + { + const Real expected = Real(d + 1) * Real(0.5); + local_fail += (std::fabs(as_point(d) - expected) <= tol) ? 0 : 1; + local_fail += (std::fabs(as_vector_value(d) - expected) <= tol) ? 0 : 1; + local_fail += (std::fabs(as_type_vector(d) - expected) <= tol) ? 0 : 1; + } - vector_out.zero(); - vector_out.assign(as_vector_value); - vector_out.add_scaled(as_type_vector, Real(0)); - vector_out.subtract_scaled(as_type_vector, Real(0)); + const auto as_tensor_value = + libMesh::Kokkos::materialize_tensor>(tensor_in); + const auto as_type_tensor = + libMesh::Kokkos::materialize_tensor>(tensor_in); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + const Real expected = Real(10 * row + col + 1) * Real(0.25); + local_fail += (std::fabs(as_tensor_value(row, col) - expected) <= tol) ? 0 : 1; + local_fail += (std::fabs(as_type_tensor(row, col) - expected) <= tol) ? 0 : 1; + } + + auto vector_out = libMesh::Kokkos::make_vector_ref(d_vector_out, 0); + auto tensor_out = libMesh::Kokkos::make_tensor_ref(d_tensor_out, 0); + + vector_out.zero(); + vector_out.assign(as_vector_value); + vector_out.add_scaled(as_type_vector, Real(0)); + vector_out.subtract_scaled(as_type_vector, Real(0)); + + tensor_out.zero(); + tensor_out.assign(as_tensor_value); + tensor_out.add_scaled(as_type_tensor, Real(0)); + tensor_out.subtract_scaled(as_type_tensor, Real(0)); + + d_fail() = local_fail; + }); + ::Kokkos::fence(); - tensor_out.zero(); - tensor_out.assign(as_tensor_value); - tensor_out.add_scaled(as_type_tensor, Real(0)); - tensor_out.subtract_scaled(as_type_tensor, Real(0)); + int fail = 0; + ::Kokkos::deep_copy(fail, d_fail); { auto h_vector_out = ::Kokkos::create_mirror_view(d_vector_out); @@ -306,11 +317,17 @@ test_linalg_foundation_storage_roundtrip() ::Kokkos::deep_copy(h_tensor_out, d_tensor_out); for (unsigned int d = 0; d < LIBMESH_DIM; ++d) - fail += (std::fabs(h_vector_out(0, d) - as_vector_value(d)) <= tol) ? 0 : 1; + { + const Real expected = Real(d + 1) * Real(0.5); + fail += (std::fabs(h_vector_out(0, d) - expected) <= tol) ? 0 : 1; + } for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - fail += (std::fabs(h_tensor_out(0, row, col) - as_tensor_value(row, col)) <= tol) ? 0 : 1; + { + const Real expected = Real(10 * row + col + 1) * Real(0.25); + fail += (std::fabs(h_tensor_out(0, row, col) - expected) <= tol) ? 0 : 1; + } } return fail; From daf500d27189534374dc9c2cbec7dbbfa7b3a80d Mon Sep 17 00:00:00 2001 From: rochi00 Date: Mon, 11 May 2026 16:01:50 -0600 Subject: [PATCH 09/45] Make Point constructors device-callable --- include/geom/point.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/geom/point.h b/include/geom/point.h index a305deea3a..5779675786 100644 --- a/include/geom/point.h +++ b/include/geom/point.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/hashing.h" +#include "libmesh/libmesh_device.h" #include "libmesh/type_vector.h" namespace libMesh @@ -44,6 +45,7 @@ class Point : public TypeVector * Constructor. By default sets all entries to 0. Gives the point * 0 in \p LIBMESH_DIM dimensions. */ + LIBMESH_DEVICE_INLINE Point (const Real x=0., const Real y=0., const Real z=0.) : @@ -53,11 +55,13 @@ class Point : public TypeVector /** * Trivial copy-constructor. */ + LIBMESH_DEVICE_INLINE Point (const Point & p) = default; /** * Copy-constructor from non-point Typevector. */ + LIBMESH_DEVICE_INLINE Point (const TypeVector & p) : TypeVector (p) {} @@ -65,6 +69,7 @@ class Point : public TypeVector /** * Copy-assignment operator. */ + LIBMESH_DEVICE_INLINE Point& operator=(const Point & p) = default; /** @@ -73,6 +78,7 @@ class Point : public TypeVector template ::value,void>::type> + LIBMESH_DEVICE_INLINE Point (const T x) : TypeVector (x,0,0) {} From 01296eb1646c487e0d0fe7926711d174a59d2bb0 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 07:50:39 -0600 Subject: [PATCH 10/45] Inline tensor equality into constrained operators --- include/gpu/kokkos_tensor_ops.h | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index a08080405d..f251b6d9e4 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -130,28 +130,6 @@ bool tensor_is_zero(const TensorLike & T_in) return true; } -template -LIBMESH_DEVICE_INLINE -bool tensor_equal(const LeftTensor & left, const RightTensor & right) -{ - static_assert(is_tensor_like_v, "tensor_equal() requires a tensor-like left input"); - static_assert(is_tensor_like_v, "tensor_equal() requires a tensor-like right input"); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) - return false; - - return true; -} - -template -LIBMESH_DEVICE_INLINE -bool tensor_not_equal(const LeftTensor & left, const RightTensor & right) -{ - return !tensor_equal(left, right); -} - // Tensor arithmetic template @@ -953,7 +931,12 @@ auto operator==(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), bool> { - return tensor_equal(left, right); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) + return false; + + return true; } template @@ -963,7 +946,7 @@ auto operator!=(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), bool> { - return tensor_not_equal(left, right); + return !(left == right); } template From e8bff0ae8d03682ba7984c400f5893c5a62b8eaf Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 07:52:10 -0600 Subject: [PATCH 11/45] Differentiate leading tensor determinant helper --- include/gpu/kokkos_tensor_ops.h | 13 +++++++------ tests/numerics/kokkos_tensor_ops_oracle_runners.h | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index f251b6d9e4..b124fd212d 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -264,9 +264,10 @@ tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const template LIBMESH_DEVICE_INLINE -auto tensor_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +auto tensor_leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) { - static_assert(is_tensor_like_v, "tensor_determinant() requires a tensor-like input"); + static_assert(is_tensor_like_v, + "tensor_leading_determinant() requires a tensor-like input"); if (dim == 0) return tensor_value_type_t(1); @@ -316,7 +317,7 @@ ResultTensor tensor_inverse(const TensorLike & T_in, const unsigned int dim = LI return out; } - const auto det = tensor_determinant(T_in, dim); + const auto det = tensor_leading_determinant(T_in, dim); if (dim == 2) { @@ -610,9 +611,9 @@ auto transpose(const TensorLike & T_in) template LIBMESH_DEVICE_INLINE auto det(const TensorLike & T_in) - -> std::enable_if_t, decltype(tensor_determinant(T_in))> + -> std::enable_if_t, decltype(T_in.det())> { - return tensor_determinant(T_in); + return T_in.det(); } template @@ -779,7 +780,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::det(const unsigned int dim) const { - return tensor_determinant(*this, dim); + return tensor_leading_determinant(*this, dim); } template diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index 07670821ba..a12cec13ab 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -51,7 +51,7 @@ test_dim_ops() KOKKOS_LAMBDA(int c) { const auto J_ref = libMesh::Kokkos::make_tensor_ref(d_J, c); const unsigned int dim = d_dims(c); - const Real det = libMesh::Kokkos::tensor_determinant(J_ref, dim); + const Real det = J_ref.det(dim); const auto inv = J_ref.inverse(dim); const auto I = libMesh::Kokkos::tensor_identity(dim); const auto prod_left = J_ref * inv; From b5adc72ebbc625d62775c1cf46aa0eb7813490b0 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 08:08:04 -0600 Subject: [PATCH 12/45] Inline vector equality and remove contract shim --- include/gpu/kokkos_vector_ops.h | 42 ++++--------------- .../kokkos_tensor_ops_oracle_runners.h | 4 +- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 3fb1406866..fffbf789da 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -63,13 +63,6 @@ auto vector_dot(const LeftVector & left, const RightVector & right) return sum; } -template -LIBMESH_DEVICE_INLINE -auto vector_contract(const LeftVector & left, const RightVector & right) -{ - return vector_dot(left, right); -} - template LIBMESH_DEVICE_INLINE auto vector_norm_sq(const VectorLike & v) @@ -122,27 +115,6 @@ bool vector_is_zero(const VectorLike & v) return true; } -template -LIBMESH_DEVICE_INLINE -bool vector_equal(const LeftVector & left, const RightVector & right) -{ - static_assert(is_vector_like_v, "vector_equal() requires a vector-like left input"); - static_assert(is_vector_like_v, "vector_equal() requires a vector-like right input"); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (vector_get_component(left, component) != vector_get_component(right, component)) - return false; - - return true; -} - -template -LIBMESH_DEVICE_INLINE -bool vector_not_equal(const LeftVector & left, const RightVector & right) -{ - return !vector_equal(left, right); -} - // Arithmetic template @@ -447,9 +419,9 @@ template LIBMESH_DEVICE_INLINE auto contract(const LeftVector & left, const RightVector & right) -> std::enable_if_t && is_vector_like_v, - decltype(vector_contract(left, right))> + decltype(vector_dot(left, right))> { - return vector_contract(left, right); + return vector_dot(left, right); } template @@ -544,7 +516,7 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::contract(const RightVector & right) const { - return vector_contract(*this, right); + return vector_dot(*this, right); } template @@ -672,7 +644,11 @@ auto operator==(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), bool> { - return vector_equal(left, right); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if (vector_get_component(left, component) != vector_get_component(right, component)) + return false; + + return true; } template @@ -682,7 +658,7 @@ auto operator!=(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), bool> { - return vector_not_equal(left, right); + return !(left == right); } template diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index a12cec13ab..59aadda6a4 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -389,8 +389,8 @@ test_mixed_representation_ops() d_scalars(2) = A_ref.det(); d_scalars(3) = (A_ref == A) ? 1.0 : 0.0; d_scalars(4) = (A_ref != inverse) ? 1.0 : 0.0; - d_scalars(5) = libMesh::Kokkos::vector_equal(row0, ref_row0) ? 1.0 : 0.0; - d_scalars(6) = libMesh::Kokkos::vector_equal(col0, ref_col0) ? 1.0 : 0.0; + d_scalars(5) = (row0 == ref_row0) ? 1.0 : 0.0; + d_scalars(6) = (col0 == ref_col0) ? 1.0 : 0.0; d_scalars(7) = A_ref.tr(); libMesh::Kokkos::store_vector(d_vectors, 0, right); From 7d0dff0e6339c7dcdf5328ed86a8fcc25fd46e61 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 08:19:45 -0600 Subject: [PATCH 13/45] Hide tensor helper API and share in-place Kokkos ops --- include/gpu/kokkos_tensor_ops.h | 756 +++++++++--------- include/gpu/kokkos_vector_ops.h | 127 ++- .../kokkos_tensor_ops_oracle_runners.h | 4 +- 3 files changed, 485 insertions(+), 402 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index b124fd212d..c20ade2661 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -58,386 +58,389 @@ tensor_semantic_type_t copy_tensor(const TensorLike & T_in) return copy_tensor>(T_in); } -// Tensor reductions and predicates +namespace detail +{ -template +template LIBMESH_DEVICE_INLINE -auto tensor_contract(const LeftTensor & left, const RightTensor & right) +auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) { - static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like left input"); - static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like right input"); + static_assert(is_tensor_like_v, + "detail::leading_determinant() requires a tensor-like input"); - using sum_type = - detail::remove_cvref_t; + if (dim == 0) + return tensor_value_type_t(1); - sum_type sum = sum_type(0); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += tensor_get_component(left, row, col) * tensor_get_component(right, row, col); + if (dim == 1) + return tensor_get_component(T_in, 0, 0); - return sum; + if (dim == 2) + return tensor_get_component(T_in, 0, 0) * tensor_get_component(T_in, 1, 1) - + tensor_get_component(T_in, 0, 1) * tensor_get_component(T_in, 1, 0); + +#if LIBMESH_DIM > 2 + const auto a00 = tensor_get_component(T_in, 0, 0); + const auto a01 = tensor_get_component(T_in, 0, 1); + const auto a02 = tensor_get_component(T_in, 0, 2); + const auto a10 = tensor_get_component(T_in, 1, 0); + const auto a11 = tensor_get_component(T_in, 1, 1); + const auto a12 = tensor_get_component(T_in, 1, 2); + const auto a20 = tensor_get_component(T_in, 2, 0); + const auto a21 = tensor_get_component(T_in, 2, 1); + const auto a22 = tensor_get_component(T_in, 2, 2); + + return a00 * (a11 * a22 - a12 * a21) - + a01 * (a10 * a22 - a12 * a20) + + a02 * (a10 * a21 - a11 * a20); +#else + libmesh_ignore(T_in); + return tensor_value_type_t(0); +#endif } -template +template LIBMESH_DEVICE_INLINE -auto tensor_norm_sq(const TensorLike & T_in) +ResultTensor outer_product(const LeftVector & left, const RightVector & right) { - static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); - - using norm_type = detail::remove_cvref_t; + ResultTensor out; + out.zero(); - norm_type sum = norm_type(0); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += libMesh::TensorTools::norm_sq(tensor_get_component(T_in, row, col)); + tensor_set_component(out, + row, + col, + vector_get_component(left, row) * libmesh_conj(vector_get_component(right, col))); - return sum; + return out; } -template +template LIBMESH_DEVICE_INLINE -auto tensor_norm(const TensorLike & T_in) +ResultTensor inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) { - using std::sqrt; - return sqrt(tensor_norm_sq(T_in)); -} + static_assert(is_tensor_like_v, "detail::inverse() requires a tensor-like input"); -template -LIBMESH_DEVICE_INLINE -auto tensor_trace(const TensorLike & T_in) -{ - static_assert(is_tensor_like_v, "tensor_trace() requires a tensor-like input"); + ResultTensor out; + out.zero(); - using trace_type = detail::remove_cvref_t; - trace_type sum = trace_type(0); - for (unsigned int i = 0; i < LIBMESH_DIM; ++i) - sum += tensor_get_component(T_in, i, i); + if (dim == 0) + return out; - return sum; + if (dim == 1) + { + tensor_set_component(out, 0, 0, tensor_value_type_t(1) / tensor_get_component(T_in, 0, 0)); + return out; + } + + const auto det = leading_determinant(T_in, dim); + + if (dim == 2) + { + tensor_set_component(out, 0, 0, tensor_get_component(T_in, 1, 1) / det); + tensor_set_component(out, 0, 1, -tensor_get_component(T_in, 0, 1) / det); + tensor_set_component(out, 1, 0, -tensor_get_component(T_in, 1, 0) / det); + tensor_set_component(out, 1, 1, tensor_get_component(T_in, 0, 0) / det); + return out; + } + +#if LIBMESH_DIM > 2 + const auto a00 = tensor_get_component(T_in, 0, 0); + const auto a01 = tensor_get_component(T_in, 0, 1); + const auto a02 = tensor_get_component(T_in, 0, 2); + const auto a10 = tensor_get_component(T_in, 1, 0); + const auto a11 = tensor_get_component(T_in, 1, 1); + const auto a12 = tensor_get_component(T_in, 1, 2); + const auto a20 = tensor_get_component(T_in, 2, 0); + const auto a21 = tensor_get_component(T_in, 2, 1); + const auto a22 = tensor_get_component(T_in, 2, 2); + + tensor_set_component(out, 0, 0, (a11 * a22 - a12 * a21) / det); + tensor_set_component(out, 0, 1, (a02 * a21 - a01 * a22) / det); + tensor_set_component(out, 0, 2, (a01 * a12 - a02 * a11) / det); + tensor_set_component(out, 1, 0, (a12 * a20 - a10 * a22) / det); + tensor_set_component(out, 1, 1, (a00 * a22 - a02 * a20) / det); + tensor_set_component(out, 1, 2, (a02 * a10 - a00 * a12) / det); + tensor_set_component(out, 2, 0, (a10 * a21 - a11 * a20) / det); + tensor_set_component(out, 2, 1, (a01 * a20 - a00 * a21) / det); + tensor_set_component(out, 2, 2, (a00 * a11 - a01 * a10) / det); +#else + libmesh_ignore(T_in); +#endif + + return out; } -template +template LIBMESH_DEVICE_INLINE -bool tensor_is_zero(const TensorLike & T_in) +ResultTensor transpose(const TensorLike & T_in) { - static_assert(is_tensor_like_v, "tensor_is_zero() requires a tensor-like input"); + ResultTensor out; + out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(T_in, row, col) != tensor_value_type_t(0)) - return false; + tensor_set_component(out, row, col, tensor_get_component(T_in, col, row)); - return true; + return out; } -// Tensor arithmetic - -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_outer_product(const LeftVector & left, const RightVector & right) +ResultTensor multiply(const LeftTensor & left, const RightTensor & right) { ResultTensor out; out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - vector_get_component(left, row) * libmesh_conj(vector_get_component(right, col))); + { + auto value = tensor_get_component(left, row, 0) * tensor_get_component(right, 0, col); + for (unsigned int k = 1; k < LIBMESH_DIM; ++k) + value += tensor_get_component(left, row, k) * tensor_get_component(right, k, col); + tensor_set_component(out, row, col, value); + } return out; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -libMesh::TypeTensor> -tensor_outer_product(const LeftVector & left, const RightVector & right) +ResultVector row(const TensorLike & T_in, const unsigned int row_index) { - return tensor_outer_product>>(left, right); + ResultVector out; + out.zero(); + + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + vector_set_component(out, col, tensor_get_component(T_in, row_index, col)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_add(const LeftTensor & left, const RightTensor & right) +ResultVector column(const TensorLike & T_in, const unsigned int col_index) { - ResultTensor out; + ResultVector out; out.zero(); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); + for (unsigned int row_index = 0; row_index < LIBMESH_DIM; ++row_index) + vector_set_component(out, row_index, tensor_get_component(T_in, row_index, col_index)); return out; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_add(const LeftTensor & left, const RightTensor & right) +ResultVector multiply(const TensorLike & T_in, const VectorLike & v) { - return tensor_add>(left, right); + ResultVector out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + { + auto value = tensor_get_component(T_in, row, 0) * vector_get_component(v, 0); + for (unsigned int col = 1; col < LIBMESH_DIM; ++col) + value += tensor_get_component(T_in, row, col) * vector_get_component(v, col); + vector_set_component(out, row, value); + } + + return out; } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_subtract(const LeftTensor & left, const RightTensor & right) +ResultVector multiply(const VectorLike & v, const TensorLike & T_in) { - ResultTensor out; + ResultVector out; out.zero(); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + auto value = vector_get_component(v, 0) * tensor_get_component(T_in, 0, col); + for (unsigned int row = 1; row < LIBMESH_DIM; ++row) + value += vector_get_component(v, row) * tensor_get_component(T_in, row, col); + vector_set_component(out, col, value); + } return out; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_subtract(const LeftTensor & left, const RightTensor & right) +void assign_tensor_components(LeftTensor & left, const RightTensor & right) { - return tensor_subtract>(left, right); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, row, col, tensor_get_component(right, row, col)); } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_scale(const Scalar & alpha, const TensorLike & T_in) +void add_tensor_components(LeftTensor & left, const RightTensor & right) { - ResultTensor out; - out.zero(); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); - - return out; + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_scale(const Scalar & alpha, const TensorLike & T_in) +void add_scaled_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) { - return tensor_scale>(alpha, T_in); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) + + factor * tensor_get_component(right, row, col)); } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_divide(const TensorLike & T_in, const Scalar & alpha) +void subtract_tensor_components(LeftTensor & left, const RightTensor & right) { - ResultTensor out; - out.zero(); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); - - return out; + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const Scalar & alpha) +void subtract_scaled_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) { - return tensor_divide>(T_in, alpha); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) - + factor * tensor_get_component(right, row, col)); } template LIBMESH_DEVICE_INLINE -auto tensor_leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +void zero_tensor_components(TensorLike & T_in) { - static_assert(is_tensor_like_v, - "tensor_leading_determinant() requires a tensor-like input"); - - if (dim == 0) - return tensor_value_type_t(1); - - if (dim == 1) - return tensor_get_component(T_in, 0, 0); - - if (dim == 2) - return tensor_get_component(T_in, 0, 0) * tensor_get_component(T_in, 1, 1) - - tensor_get_component(T_in, 0, 1) * tensor_get_component(T_in, 1, 0); - -#if LIBMESH_DIM > 2 - const auto a00 = tensor_get_component(T_in, 0, 0); - const auto a01 = tensor_get_component(T_in, 0, 1); - const auto a02 = tensor_get_component(T_in, 0, 2); - const auto a10 = tensor_get_component(T_in, 1, 0); - const auto a11 = tensor_get_component(T_in, 1, 1); - const auto a12 = tensor_get_component(T_in, 1, 2); - const auto a20 = tensor_get_component(T_in, 2, 0); - const auto a21 = tensor_get_component(T_in, 2, 1); - const auto a22 = tensor_get_component(T_in, 2, 2); - - return a00 * (a11 * a22 - a12 * a21) - - a01 * (a10 * a22 - a12 * a20) + - a02 * (a10 * a21 - a11 * a20); -#else - libmesh_ignore(T_in); - return tensor_value_type_t(0); -#endif + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(T_in, row, col, tensor_value_type_t(0)); } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +void scale_tensor_components(TensorLike & T_in, const Scalar & alpha) { - static_assert(is_tensor_like_v, "tensor_inverse() requires a tensor-like input"); - - ResultTensor out; - out.zero(); - - if (dim == 0) - return out; + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) * alpha); +} - if (dim == 1) - { - tensor_set_component(out, 0, 0, tensor_value_type_t(1) / tensor_get_component(T_in, 0, 0)); - return out; - } +template +LIBMESH_DEVICE_INLINE +void divide_tensor_components(TensorLike & T_in, const Scalar & alpha) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) / alpha); +} - const auto det = tensor_leading_determinant(T_in, dim); +} // namespace detail - if (dim == 2) - { - tensor_set_component(out, 0, 0, tensor_get_component(T_in, 1, 1) / det); - tensor_set_component(out, 0, 1, -tensor_get_component(T_in, 0, 1) / det); - tensor_set_component(out, 1, 0, -tensor_get_component(T_in, 1, 0) / det); - tensor_set_component(out, 1, 1, tensor_get_component(T_in, 0, 0) / det); - return out; - } +// Tensor reductions and predicates -#if LIBMESH_DIM > 2 - const auto a00 = tensor_get_component(T_in, 0, 0); - const auto a01 = tensor_get_component(T_in, 0, 1); - const auto a02 = tensor_get_component(T_in, 0, 2); - const auto a10 = tensor_get_component(T_in, 1, 0); - const auto a11 = tensor_get_component(T_in, 1, 1); - const auto a12 = tensor_get_component(T_in, 1, 2); - const auto a20 = tensor_get_component(T_in, 2, 0); - const auto a21 = tensor_get_component(T_in, 2, 1); - const auto a22 = tensor_get_component(T_in, 2, 2); +template +LIBMESH_DEVICE_INLINE +auto tensor_contract(const LeftTensor & left, const RightTensor & right) +{ + static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like left input"); + static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like right input"); - tensor_set_component(out, 0, 0, (a11 * a22 - a12 * a21) / det); - tensor_set_component(out, 0, 1, (a02 * a21 - a01 * a22) / det); - tensor_set_component(out, 0, 2, (a01 * a12 - a02 * a11) / det); - tensor_set_component(out, 1, 0, (a12 * a20 - a10 * a22) / det); - tensor_set_component(out, 1, 1, (a00 * a22 - a02 * a20) / det); - tensor_set_component(out, 1, 2, (a02 * a10 - a00 * a12) / det); - tensor_set_component(out, 2, 0, (a10 * a21 - a11 * a20) / det); - tensor_set_component(out, 2, 1, (a01 * a20 - a00 * a21) / det); - tensor_set_component(out, 2, 2, (a00 * a11 - a01 * a10) / det); -#else - libmesh_ignore(T_in); -#endif + using sum_type = + detail::remove_cvref_t; - return out; -} + sum_type sum = sum_type(0); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + sum += tensor_get_component(left, row, col) * tensor_get_component(right, row, col); -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) -{ - return tensor_inverse>(T_in, dim); + return sum; } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_transpose(const TensorLike & T_in) +auto tensor_norm_sq(const TensorLike & T_in) { - ResultTensor out; - out.zero(); + static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, col, row)); + sum += libMesh::TensorTools::norm_sq(tensor_get_component(T_in, row, col)); - return out; + return sum; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_transpose(const TensorLike & T_in) +auto tensor_norm(const TensorLike & T_in) { - return tensor_transpose>(T_in); + using std::sqrt; + return sqrt(tensor_norm_sq(T_in)); } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) +auto tensor_trace(const TensorLike & T_in) { - ResultTensor out; - out.zero(); + static_assert(is_tensor_like_v, "tensor_trace() requires a tensor-like input"); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - alpha * tensor_get_component(A, row, col) + - beta * tensor_get_component(B, row, col)); + using trace_type = detail::remove_cvref_t; + trace_type sum = trace_type(0); + for (unsigned int i = 0; i < LIBMESH_DIM; ++i) + sum += tensor_get_component(T_in, i, i); - return out; + return sum; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) +bool tensor_is_zero(const TensorLike & T_in) { - return tensor_linear_combination>(alpha, A, beta, B); + static_assert(is_tensor_like_v, "tensor_is_zero() requires a tensor-like input"); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(T_in, row, col) != tensor_value_type_t(0)) + return false; + + return true; } +// Tensor arithmetic + template LIBMESH_DEVICE_INLINE -ResultTensor tensor_multiply(const LeftTensor & left, const RightTensor & right) +ResultTensor tensor_add(const LeftTensor & left, const RightTensor & right) { ResultTensor out; out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - { - auto value = tensor_get_component(left, row, 0) * tensor_get_component(right, 0, col); - for (unsigned int k = 1; k < LIBMESH_DIM; ++k) - value += tensor_get_component(left, row, k) * tensor_get_component(right, k, col); - tensor_set_component(out, row, col, value); - } + tensor_set_component(out, + row, + col, + tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); return out; } @@ -447,115 +450,124 @@ template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_multiply(const LeftTensor & left, const RightTensor & right) +tensor_semantic_type_t tensor_add(const LeftTensor & left, const RightTensor & right) { - return tensor_multiply>(left, right); + return tensor_add>(left, right); } -// Tensor/vector conversions - -template +template LIBMESH_DEVICE_INLINE -ResultVector tensor_row(const TensorLike & T_in, const unsigned int row) +ResultTensor tensor_subtract(const LeftTensor & left, const RightTensor & right) { - ResultVector out; + ResultTensor out; out.zero(); - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - vector_set_component(out, col, tensor_get_component(T_in, row, col)); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); return out; } template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -libMesh::TypeVector> -tensor_row(const TensorLike & T_in, const unsigned int row) +tensor_semantic_type_t tensor_subtract(const LeftTensor & left, const RightTensor & right) { - return tensor_row>>(T_in, row); + return tensor_subtract>(left, right); } -template +template LIBMESH_DEVICE_INLINE -ResultVector tensor_column(const TensorLike & T_in, const unsigned int col) +ResultTensor tensor_scale(const Scalar & alpha, const TensorLike & T_in) { - ResultVector out; + ResultTensor out; out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - vector_set_component(out, row, tensor_get_component(T_in, row, col)); + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); return out; } template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -libMesh::TypeVector> -tensor_column(const TensorLike & T_in, const unsigned int col) +tensor_semantic_type_t tensor_scale(const Scalar & alpha, const TensorLike & T_in) { - return tensor_column>>(T_in, col); + return tensor_scale>(alpha, T_in); } -template +template LIBMESH_DEVICE_INLINE -ResultVector tensor_vector_multiply(const TensorLike & T_in, const VectorLike & v) +ResultTensor tensor_divide(const TensorLike & T_in, const Scalar & alpha) { - ResultVector out; + ResultTensor out; out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - { - auto value = tensor_get_component(T_in, row, 0) * vector_get_component(v, 0); - for (unsigned int col = 1; col < LIBMESH_DIM; ++col) - value += tensor_get_component(T_in, row, col) * vector_get_component(v, col); - vector_set_component(out, row, value); - } + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); return out; } template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -vector_semantic_type_t tensor_vector_multiply(const TensorLike & T_in, const VectorLike & v) +tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const Scalar & alpha) { - return tensor_vector_multiply>(T_in, v); + return tensor_divide>(T_in, alpha); } -template +template LIBMESH_DEVICE_INLINE -ResultVector vector_tensor_multiply(const VectorLike & v, const TensorLike & T_in) +ResultTensor tensor_linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) { - ResultVector out; + ResultTensor out; out.zero(); - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - { - auto value = vector_get_component(v, 0) * tensor_get_component(T_in, 0, col); - for (unsigned int row = 1; row < LIBMESH_DIM; ++row) - value += vector_get_component(v, row) * tensor_get_component(T_in, row, col); - vector_set_component(out, col, value); - } + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + alpha * tensor_get_component(A, row, col) + + beta * tensor_get_component(B, row, col)); return out; } template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_tensor_multiply(const VectorLike & v, const TensorLike & T_in) +tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) { - return vector_tensor_multiply>(v, T_in); + return tensor_linear_combination>(alpha, A, beta, B); } +// Tensor/vector conversions + // libMesh-like convenience wrappers template @@ -591,13 +603,29 @@ auto is_zero(const TensorLike & T_in) return tensor_is_zero(T_in); } +template +LIBMESH_DEVICE_INLINE +auto outer_product(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v, ResultTensor> +{ + return detail::outer_product(left, right); +} + template LIBMESH_DEVICE_INLINE auto outer_product(const LeftVector & left, const RightVector & right) -> std::enable_if_t && is_vector_like_v, libMesh::TypeTensor>> { - return tensor_outer_product(left, right); + return outer_product>>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto transpose(const TensorLike & T_in) + -> std::enable_if_t, ResultTensor> +{ + return detail::transpose(T_in); } template @@ -605,7 +633,7 @@ LIBMESH_DEVICE_INLINE auto transpose(const TensorLike & T_in) -> std::enable_if_t, tensor_semantic_type_t> { - return tensor_transpose(T_in); + return transpose>(T_in); } template @@ -616,12 +644,28 @@ auto det(const TensorLike & T_in) return T_in.det(); } +template +LIBMESH_DEVICE_INLINE +auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) + -> std::enable_if_t, ResultTensor> +{ + return detail::inverse(T_in, dim); +} + template LIBMESH_DEVICE_INLINE auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) -> std::enable_if_t, tensor_semantic_type_t> { - return tensor_inverse(T_in, dim); + return inverse>(T_in, dim); +} + +template +LIBMESH_DEVICE_INLINE +auto row(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, ResultVector> +{ + return detail::row(T_in, i); } template @@ -629,7 +673,15 @@ LIBMESH_DEVICE_INLINE auto row(const TensorLike & T_in, const unsigned int i) -> std::enable_if_t, libMesh::TypeVector>> { - return tensor_row(T_in, i); + return row>>(T_in, i); +} + +template +LIBMESH_DEVICE_INLINE +auto column(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, ResultVector> +{ + return detail::column(T_in, i); } template @@ -637,7 +689,15 @@ LIBMESH_DEVICE_INLINE auto column(const TensorLike & T_in, const unsigned int i) -> std::enable_if_t, libMesh::TypeVector>> { - return tensor_column(T_in, i); + return column>>(T_in, i); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v, ResultTensor> +{ + return detail::multiply(left, right); } template @@ -646,7 +706,15 @@ auto multiply(const LeftTensor & left, const RightTensor & right) -> std::enable_if_t && is_tensor_like_v, tensor_semantic_type_t> { - return tensor_multiply(left, right); + return multiply>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const TensorLike & T_in, const VectorLike & v) + -> std::enable_if_t && is_vector_like_v, ResultVector> +{ + return detail::multiply(T_in, v); } template @@ -655,7 +723,15 @@ auto multiply(const TensorLike & T_in, const VectorLike & v) -> std::enable_if_t && is_vector_like_v, vector_semantic_type_t> { - return tensor_vector_multiply(T_in, v); + return multiply>(T_in, v); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const VectorLike & v, const TensorLike & T_in) + -> std::enable_if_t && is_tensor_like_v, ResultVector> +{ + return detail::multiply(v, T_in); } template @@ -664,7 +740,7 @@ auto multiply(const VectorLike & v, const TensorLike & T_in) -> std::enable_if_t && is_tensor_like_v, vector_semantic_type_t> { - return vector_tensor_multiply(v, T_in); + return multiply>(v, T_in); } template @@ -672,9 +748,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::assign(const RightTensor & right) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, row, col, tensor_get_component(right, row, col)); + detail::assign_tensor_components(*this, right); } template @@ -682,12 +756,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add(const RightTensor & right) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, - row, - col, - tensor_get_component(*this, row, col) + tensor_get_component(right, row, col)); + detail::add_tensor_components(*this, right); } template @@ -695,13 +764,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add_scaled(const RightTensor & right, const value_type & factor) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, - row, - col, - tensor_get_component(*this, row, col) + - factor * tensor_get_component(right, row, col)); + detail::add_scaled_tensor_components(*this, right, factor); } template @@ -709,12 +772,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract(const RightTensor & right) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, - row, - col, - tensor_get_component(*this, row, col) - tensor_get_component(right, row, col)); + detail::subtract_tensor_components(*this, right); } template @@ -722,22 +780,14 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract_scaled(const RightTensor & right, const value_type & factor) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, - row, - col, - tensor_get_component(*this, row, col) - - factor * tensor_get_component(right, row, col)); + detail::subtract_scaled_tensor_components(*this, right, factor); } template LIBMESH_DEVICE_INLINE void tensor_ref::zero() { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, row, col, value_type(0)); + detail::zero_tensor_components(*this); } template @@ -773,14 +823,14 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::transpose() const { - return tensor_transpose(*this); + return libMesh::Kokkos::transpose(*this); } template LIBMESH_DEVICE_INLINE auto tensor_ref::det(const unsigned int dim) const { - return tensor_leading_determinant(*this, dim); + return detail::leading_determinant(*this, dim); } template @@ -794,7 +844,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::inverse(const unsigned int dim) const { - return tensor_inverse(*this, dim); + return libMesh::Kokkos::inverse(*this, dim); } template @@ -802,7 +852,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::solve(const VectorLike & b, ResultVector & x) const { - const auto solution = tensor_vector_multiply>(this->inverse(), b); + const auto solution = libMesh::Kokkos::multiply>(this->inverse(), b); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) vector_set_component(x, component, vector_get_component(solution, component)); } @@ -811,14 +861,14 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::row(const unsigned int i) const { - return tensor_row(*this, i); + return libMesh::Kokkos::row(*this, i); } template LIBMESH_DEVICE_INLINE auto tensor_ref::column(const unsigned int i) const { - return tensor_column(*this, i); + return libMesh::Kokkos::column(*this, i); } template @@ -826,7 +876,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::left_multiply(const VectorLike & v) const { - return vector_tensor_multiply(v, *this); + return libMesh::Kokkos::multiply(v, *this); } // Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. @@ -900,7 +950,7 @@ template @@ -957,13 +1007,7 @@ auto operator+=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); - + detail::add_tensor_components(left, right); return left; } @@ -974,13 +1018,7 @@ auto operator-=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); - + detail::subtract_tensor_components(left, right); return left; } @@ -991,10 +1029,7 @@ auto operator*=(LeftTensor & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftTensor &> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, row, col, tensor_get_component(left, row, col) * alpha); - + detail::scale_tensor_components(left, alpha); return left; } @@ -1005,10 +1040,7 @@ auto operator/=(LeftTensor & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftTensor &> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, row, col, tensor_get_component(left, row, col) / alpha); - + detail::divide_tensor_components(left, alpha); return left; } diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index fffbf789da..591b4d051b 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -44,6 +44,85 @@ vector_semantic_type_t copy_vector(const VectorLike & v) return copy_vector>(v); } +namespace detail +{ + +template +LIBMESH_DEVICE_INLINE +void assign_vector_components(LeftVector & left, const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, component, vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void add_vector_components(LeftVector & left, const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) + vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void add_scaled_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) + + factor * vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void subtract_vector_components(LeftVector & left, const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) - vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void subtract_scaled_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) - + factor * vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void zero_vector_components(VectorLike & v) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(v, component, vector_value_type_t(0)); +} + +template +LIBMESH_DEVICE_INLINE +void scale_vector_components(VectorLike & v, const Scalar & alpha) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(v, component, vector_get_component(v, component) * alpha); +} + +template +LIBMESH_DEVICE_INLINE +void divide_vector_components(VectorLike & v, const Scalar & alpha) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(v, component, vector_get_component(v, component) / alpha); +} + +} // namespace detail + // Reductions and predicates template @@ -453,8 +532,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::assign(const RightVector & right) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, component, vector_get_component(right, component)); + detail::assign_vector_components(*this, right); } template @@ -462,10 +540,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::add(const RightVector & right) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, - component, - vector_get_component(*this, component) + vector_get_component(right, component)); + detail::add_vector_components(*this, right); } template @@ -473,11 +548,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::add_scaled(const RightVector & right, const value_type & factor) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, - component, - vector_get_component(*this, component) + - factor * vector_get_component(right, component)); + detail::add_scaled_vector_components(*this, right, factor); } template @@ -485,10 +556,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract(const RightVector & right) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, - component, - vector_get_component(*this, component) - vector_get_component(right, component)); + detail::subtract_vector_components(*this, right); } template @@ -496,19 +564,14 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract_scaled(const RightVector & right, const value_type & factor) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, - component, - vector_get_component(*this, component) - - factor * vector_get_component(right, component)); + detail::subtract_scaled_vector_components(*this, right, factor); } template LIBMESH_DEVICE_INLINE void vector_ref::zero() { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, component, value_type(0)); + detail::zero_vector_components(*this); } template @@ -668,11 +731,7 @@ auto operator+=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, - component, - vector_get_component(left, component) + vector_get_component(right, component)); - + detail::add_vector_components(left, right); return left; } @@ -683,11 +742,7 @@ auto operator-=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, - component, - vector_get_component(left, component) - vector_get_component(right, component)); - + detail::subtract_vector_components(left, right); return left; } @@ -698,9 +753,7 @@ auto operator*=(LeftVector & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftVector &> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, component, vector_get_component(left, component) * alpha); - + detail::scale_vector_components(left, alpha); return left; } @@ -711,9 +764,7 @@ auto operator/=(LeftVector & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftVector &> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, component, vector_get_component(left, component) / alpha); - + detail::divide_vector_components(left, alpha); return left; } diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index 59aadda6a4..de867d59f6 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -126,7 +126,7 @@ test_tensor_ops() const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); const auto b_ref = libMesh::Kokkos::make_vector_ref(d_b, 0); const auto c_ref = libMesh::Kokkos::make_vector_ref(d_c, 0); - const auto outer_d = libMesh::Kokkos::tensor_outer_product(a_ref, b_ref); + const auto outer_d = libMesh::Kokkos::outer_product(a_ref, b_ref); const auto transpose_d = A_ref.transpose(); const auto mix_d = Real(1.5) * A_ref - Real(0.25) * outer_d; const auto right_d = A_ref * c_ref; @@ -382,7 +382,7 @@ test_mixed_representation_ops() const auto inverse = A_ref.inverse(); const auto add = A_ref + ref_transpose; const auto scaled = Real(0.5) * A_ref; - const auto outer = libMesh::Kokkos::tensor_outer_product(a_ref, b); + const auto outer = libMesh::Kokkos::outer_product(a_ref, b); d_scalars(0) = a_ref * b; d_scalars(1) = A_ref.contract(outer); From 9fc59573591fe0ce4fe1d6c54ad1d9fc4baeed92 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 08:32:34 -0600 Subject: [PATCH 14/45] Make remaining tensor helpers internal-only --- include/gpu/kokkos_tensor_ops.h | 64 +++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index c20ade2661..c820eacd61 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -354,6 +354,9 @@ void divide_tensor_components(TensorLike & T_in, const Scalar & alpha) } // namespace detail +namespace detail +{ + // Tensor reductions and predicates template @@ -568,31 +571,33 @@ tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, // Tensor/vector conversions +} // namespace detail + // libMesh-like convenience wrappers template LIBMESH_DEVICE_INLINE auto contract(const LeftTensor & left, const RightTensor & right) -> std::enable_if_t && is_tensor_like_v, - decltype(tensor_contract(left, right))> + decltype(detail::tensor_contract(left, right))> { - return tensor_contract(left, right); + return detail::tensor_contract(left, right); } template LIBMESH_DEVICE_INLINE auto norm_sq(const TensorLike & T_in) - -> std::enable_if_t, decltype(tensor_norm_sq(T_in))> + -> std::enable_if_t, decltype(detail::tensor_norm_sq(T_in))> { - return tensor_norm_sq(T_in); + return detail::tensor_norm_sq(T_in); } template LIBMESH_DEVICE_INLINE auto norm(const TensorLike & T_in) - -> std::enable_if_t, decltype(tensor_norm(T_in))> + -> std::enable_if_t, decltype(detail::tensor_norm(T_in))> { - return tensor_norm(T_in); + return detail::tensor_norm(T_in); } template @@ -600,7 +605,7 @@ LIBMESH_DEVICE_INLINE auto is_zero(const TensorLike & T_in) -> std::enable_if_t, bool> { - return tensor_is_zero(T_in); + return detail::tensor_is_zero(T_in); } template @@ -743,6 +748,29 @@ auto multiply(const VectorLike & v, const TensorLike & T_in) return multiply>(v, T_in); } +template +LIBMESH_DEVICE_INLINE +auto linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) + -> std::enable_if_t && is_tensor_like_v, ResultTensor> +{ + return detail::tensor_linear_combination(alpha, A, beta, B); +} + +template +LIBMESH_DEVICE_INLINE +auto linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) + -> std::enable_if_t && is_tensor_like_v, + tensor_semantic_type_t> +{ + return linear_combination>(alpha, A, beta, B); +} + template template LIBMESH_DEVICE_INLINE @@ -795,28 +823,28 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::contract(const RightTensor & right) const { - return tensor_contract(*this, right); + return detail::tensor_contract(*this, right); } template LIBMESH_DEVICE_INLINE auto tensor_ref::norm() const { - return tensor_norm(*this); + return detail::tensor_norm(*this); } template LIBMESH_DEVICE_INLINE auto tensor_ref::norm_sq() const { - return tensor_norm_sq(*this); + return detail::tensor_norm_sq(*this); } template LIBMESH_DEVICE_INLINE bool tensor_ref::is_zero() const { - return tensor_is_zero(*this); + return detail::tensor_is_zero(*this); } template @@ -837,7 +865,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::tr() const { - return tensor_trace(*this); + return detail::tensor_trace(*this); } template @@ -887,7 +915,7 @@ auto operator-(const TensorLike & T_in) -> std::enable_if_t && is_tensor_ref_v, tensor_semantic_type_t> { - return tensor_scale(tensor_value_type_t(-1), T_in); + return detail::tensor_scale(tensor_value_type_t(-1), T_in); } template @@ -897,7 +925,7 @@ auto operator+(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return tensor_add(left, right); + return detail::tensor_add(left, right); } template @@ -907,7 +935,7 @@ auto operator-(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return tensor_subtract(left, right); + return detail::tensor_subtract(left, right); } template @@ -939,7 +967,7 @@ auto operator/(const TensorLike & T_in, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, tensor_semantic_type_t> { - return tensor_divide(T_in, alpha); + return detail::tensor_divide(T_in, alpha); } template Date: Tue, 12 May 2026 09:19:25 -0600 Subject: [PATCH 15/45] Reduce Kokkos algebra wrapper layers --- include/gpu/kokkos_tensor_ops.h | 320 ++++++-------------------------- include/gpu/kokkos_vector_ops.h | 282 +++++++--------------------- 2 files changed, 128 insertions(+), 474 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index c820eacd61..2d94cb5344 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -187,7 +187,7 @@ ResultTensor transpose(const TensorLike & T_in) template LIBMESH_DEVICE_INLINE -ResultTensor multiply(const LeftTensor & left, const RightTensor & right) +ResultTensor multiply_tensors(const LeftTensor & left, const RightTensor & right) { ResultTensor out; out.zero(); @@ -232,7 +232,7 @@ ResultVector column(const TensorLike & T_in, const unsigned int col_index) template LIBMESH_DEVICE_INLINE -ResultVector multiply(const TensorLike & T_in, const VectorLike & v) +ResultVector multiply_tensor_vector(const TensorLike & T_in, const VectorLike & v) { ResultVector out; out.zero(); @@ -250,7 +250,7 @@ ResultVector multiply(const TensorLike & T_in, const VectorLike & v) template LIBMESH_DEVICE_INLINE -ResultVector multiply(const VectorLike & v, const TensorLike & T_in) +ResultVector multiply_vector_tensor(const VectorLike & v, const TensorLike & T_in) { ResultVector out; out.zero(); @@ -275,21 +275,18 @@ void assign_tensor_components(LeftTensor & left, const RightTensor & right) tensor_set_component(left, row, col, tensor_get_component(right, row, col)); } -template +template LIBMESH_DEVICE_INLINE -void add_tensor_components(LeftTensor & left, const RightTensor & right) +void fill_tensor_components(TensorLike & T_in, const Scalar & value) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); + tensor_set_component(T_in, row, col, value); } template LIBMESH_DEVICE_INLINE -void add_scaled_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) +void update_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) @@ -300,38 +297,53 @@ void add_scaled_tensor_components(LeftTensor & left, const RightTensor & right, factor * tensor_get_component(right, row, col)); } -template +template LIBMESH_DEVICE_INLINE -void subtract_tensor_components(LeftTensor & left, const RightTensor & right) +ResultTensor linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) { + ResultTensor out; + out.zero(); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, + tensor_set_component(out, row, col, - tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); + alpha * tensor_get_component(A, row, col) + + beta * tensor_get_component(B, row, col)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -void subtract_scaled_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) +ResultTensor scale_tensor(const Scalar & alpha, const TensorLike & T_in) { + ResultTensor out; + out.zero(); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) - - factor * tensor_get_component(right, row, col)); + tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -void zero_tensor_components(TensorLike & T_in) +ResultTensor divide_tensor(const TensorLike & T_in, const Scalar & alpha) { + ResultTensor out; + out.zero(); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(T_in, row, col, tensor_value_type_t(0)); + tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); + + return out; } template @@ -352,11 +364,6 @@ void divide_tensor_components(TensorLike & T_in, const Scalar & alpha) tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) / alpha); } -} // namespace detail - -namespace detail -{ - // Tensor reductions and predicates template @@ -429,148 +436,6 @@ bool tensor_is_zero(const TensorLike & T_in) return true; } -// Tensor arithmetic - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_add(const LeftTensor & left, const RightTensor & right) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_add(const LeftTensor & left, const RightTensor & right) -{ - return tensor_add>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_subtract(const LeftTensor & left, const RightTensor & right) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_subtract(const LeftTensor & left, const RightTensor & right) -{ - return tensor_subtract>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_scale(const Scalar & alpha, const TensorLike & T_in) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_scale(const Scalar & alpha, const TensorLike & T_in) -{ - return tensor_scale>(alpha, T_in); -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_divide(const TensorLike & T_in, const Scalar & alpha) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const Scalar & alpha) -{ - return tensor_divide>(T_in, alpha); -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - alpha * tensor_get_component(A, row, col) + - beta * tensor_get_component(B, row, col)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) -{ - return tensor_linear_combination>(alpha, A, beta, B); -} - -// Tensor/vector conversions - } // namespace detail // libMesh-like convenience wrappers @@ -697,80 +562,6 @@ auto column(const TensorLike & T_in, const unsigned int i) return column>>(T_in, i); } -template -LIBMESH_DEVICE_INLINE -auto multiply(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v, ResultTensor> -{ - return detail::multiply(left, right); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v, - tensor_semantic_type_t> -{ - return multiply>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const TensorLike & T_in, const VectorLike & v) - -> std::enable_if_t && is_vector_like_v, ResultVector> -{ - return detail::multiply(T_in, v); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const TensorLike & T_in, const VectorLike & v) - -> std::enable_if_t && is_vector_like_v, - vector_semantic_type_t> -{ - return multiply>(T_in, v); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const VectorLike & v, const TensorLike & T_in) - -> std::enable_if_t && is_tensor_like_v, ResultVector> -{ - return detail::multiply(v, T_in); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const VectorLike & v, const TensorLike & T_in) - -> std::enable_if_t && is_tensor_like_v, - vector_semantic_type_t> -{ - return multiply>(v, T_in); -} - -template -LIBMESH_DEVICE_INLINE -auto linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) - -> std::enable_if_t && is_tensor_like_v, ResultTensor> -{ - return detail::tensor_linear_combination(alpha, A, beta, B); -} - -template -LIBMESH_DEVICE_INLINE -auto linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) - -> std::enable_if_t && is_tensor_like_v, - tensor_semantic_type_t> -{ - return linear_combination>(alpha, A, beta, B); -} - template template LIBMESH_DEVICE_INLINE @@ -784,7 +575,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add(const RightTensor & right) { - detail::add_tensor_components(*this, right); + detail::update_tensor_components(*this, right, value_type(1)); } template @@ -792,7 +583,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add_scaled(const RightTensor & right, const value_type & factor) { - detail::add_scaled_tensor_components(*this, right, factor); + detail::update_tensor_components(*this, right, factor); } template @@ -800,7 +591,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract(const RightTensor & right) { - detail::subtract_tensor_components(*this, right); + detail::update_tensor_components(*this, right, value_type(-1)); } template @@ -808,14 +599,14 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract_scaled(const RightTensor & right, const value_type & factor) { - detail::subtract_scaled_tensor_components(*this, right, factor); + detail::update_tensor_components(*this, right, -factor); } template LIBMESH_DEVICE_INLINE void tensor_ref::zero() { - detail::zero_tensor_components(*this); + detail::fill_tensor_components(*this, value_type(0)); } template @@ -880,7 +671,8 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::solve(const VectorLike & b, ResultVector & x) const { - const auto solution = libMesh::Kokkos::multiply>(this->inverse(), b); + const auto solution = + detail::multiply_tensor_vector>(this->inverse(), b); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) vector_set_component(x, component, vector_get_component(solution, component)); } @@ -904,7 +696,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::left_multiply(const VectorLike & v) const { - return libMesh::Kokkos::multiply(v, *this); + return v * *this; } // Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. @@ -915,7 +707,7 @@ auto operator-(const TensorLike & T_in) -> std::enable_if_t && is_tensor_ref_v, tensor_semantic_type_t> { - return detail::tensor_scale(tensor_value_type_t(-1), T_in); + return detail::scale_tensor>(tensor_value_type_t(-1), T_in); } template @@ -925,7 +717,8 @@ auto operator+(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::tensor_add(left, right); + return detail::linear_combination>( + tensor_value_type_t(1), left, tensor_value_type_t(1), right); } template @@ -935,7 +728,8 @@ auto operator-(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::tensor_subtract(left, right); + return detail::linear_combination>( + tensor_value_type_t(1), left, tensor_value_type_t(-1), right); } template >(alpha, T_in); } template >(alpha, T_in); } template @@ -967,7 +761,7 @@ auto operator/(const TensorLike & T_in, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, tensor_semantic_type_t> { - return detail::tensor_divide(T_in, alpha); + return detail::divide_tensor>(T_in, alpha); } template >(left, right); } template >(T_in, v); } template >(v, T_in); } template @@ -1035,7 +829,7 @@ auto operator+=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - detail::add_tensor_components(left, right); + detail::update_tensor_components(left, right, tensor_value_type_t(1)); return left; } @@ -1046,7 +840,7 @@ auto operator-=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - detail::subtract_tensor_components(left, right); + detail::update_tensor_components(left, right, tensor_value_type_t(-1)); return left; } diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 591b4d051b..2c68a0341f 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -55,19 +55,17 @@ void assign_vector_components(LeftVector & left, const RightVector & right) vector_set_component(left, component, vector_get_component(right, component)); } -template +template LIBMESH_DEVICE_INLINE -void add_vector_components(LeftVector & left, const RightVector & right) +void fill_vector_components(VectorLike & v, const Scalar & value) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, - component, - vector_get_component(left, component) + vector_get_component(right, component)); + vector_set_component(v, component, value); } template LIBMESH_DEVICE_INLINE -void add_scaled_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) +void update_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) vector_set_component(left, @@ -76,33 +74,72 @@ void add_scaled_vector_components(LeftVector & left, const RightVector & right, factor * vector_get_component(right, component)); } -template +template LIBMESH_DEVICE_INLINE -void subtract_vector_components(LeftVector & left, const RightVector & right) +ResultVector linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b) { + ResultVector out; + out.zero(); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, + vector_set_component(out, component, - vector_get_component(left, component) - vector_get_component(right, component)); + alpha * vector_get_component(a, component) + + beta * vector_get_component(b, component)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -void subtract_scaled_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) +ResultVector linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b, + const ScalarC & gamma, + const VectorC & c) { + ResultVector out; + out.zero(); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, + vector_set_component(out, component, - vector_get_component(left, component) - - factor * vector_get_component(right, component)); + alpha * vector_get_component(a, component) + + beta * vector_get_component(b, component) + + gamma * vector_get_component(c, component)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -void zero_vector_components(VectorLike & v) +ResultVector scale_vector(const Scalar & alpha, const VectorLike & v) { + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, component, alpha * vector_get_component(v, component)); + + return out; +} + +template +LIBMESH_DEVICE_INLINE +ResultVector divide_vector(const VectorLike & v, const Scalar & alpha) +{ + ResultVector out; + out.zero(); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(v, component, vector_value_type_t(0)); + vector_set_component(out, component, vector_get_component(v, component) / alpha); + + return out; } template @@ -194,192 +231,13 @@ bool vector_is_zero(const VectorLike & v) return true; } -// Arithmetic - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_add(const LeftVector & left, const RightVector & right) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - vector_get_component(left, component) + vector_get_component(right, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_add(const LeftVector & left, const RightVector & right) -{ - return vector_add>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_subtract(const LeftVector & left, const RightVector & right) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - vector_get_component(left, component) - vector_get_component(right, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_subtract(const LeftVector & left, const RightVector & right) -{ - return vector_subtract>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_scale(const Scalar & alpha, const VectorLike & v) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, alpha * vector_get_component(v, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_scale(const Scalar & alpha, const VectorLike & v) -{ - return vector_scale>(alpha, v); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_divide(const VectorLike & v, const Scalar & alpha) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, vector_get_component(v, component) / alpha); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_divide(const VectorLike & v, const Scalar & alpha) -{ - return vector_divide>(v, alpha); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - alpha * vector_get_component(a, component) + - beta * vector_get_component(b, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b) -{ - return vector_linear_combination>(alpha, a, beta, b); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b, - const ScalarC & gamma, - const VectorC & c) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - alpha * vector_get_component(a, component) + - beta * vector_get_component(b, component) + - gamma * vector_get_component(c, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b, - const ScalarC & gamma, - const VectorC & c) -{ - return vector_linear_combination>(alpha, a, beta, b, gamma, c); -} - template LIBMESH_DEVICE_INLINE ResultVector vector_unit(const VectorLike & v) { const auto length = vector_norm(v); libmesh_assert_not_equal_to(length, static_cast(0.)); - return vector_divide(v, length); + return detail::divide_vector(v, length); } template LIBMESH_DEVICE_INLINE void vector_ref::add(const RightVector & right) { - detail::add_vector_components(*this, right); + detail::update_vector_components(*this, right, value_type(1)); } template @@ -548,7 +406,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::add_scaled(const RightVector & right, const value_type & factor) { - detail::add_scaled_vector_components(*this, right, factor); + detail::update_vector_components(*this, right, factor); } template @@ -556,7 +414,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract(const RightVector & right) { - detail::subtract_vector_components(*this, right); + detail::update_vector_components(*this, right, value_type(-1)); } template @@ -564,14 +422,14 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract_scaled(const RightVector & right, const value_type & factor) { - detail::subtract_scaled_vector_components(*this, right, factor); + detail::update_vector_components(*this, right, -factor); } template LIBMESH_DEVICE_INLINE void vector_ref::zero() { - detail::zero_vector_components(*this); + detail::fill_vector_components(*this, value_type(0)); } template @@ -633,7 +491,7 @@ auto operator-(const VectorLike & v) -> std::enable_if_t && is_vector_ref_v, vector_semantic_type_t> { - return vector_scale(vector_value_type_t(-1), v); + return detail::scale_vector>(vector_value_type_t(-1), v); } template @@ -643,7 +501,8 @@ auto operator+(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), vector_semantic_type_t> { - return vector_add(left, right); + return detail::linear_combination>( + vector_value_type_t(1), left, vector_value_type_t(1), right); } template @@ -653,7 +512,8 @@ auto operator-(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), vector_semantic_type_t> { - return vector_subtract(left, right); + return detail::linear_combination>( + vector_value_type_t(1), left, vector_value_type_t(-1), right); } template >(alpha, v); } template >(alpha, v); } template >(v, alpha); } template @@ -731,7 +591,7 @@ auto operator+=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - detail::add_vector_components(left, right); + detail::update_vector_components(left, right, vector_value_type_t(1)); return left; } @@ -742,7 +602,7 @@ auto operator-=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - detail::subtract_vector_components(left, right); + detail::update_vector_components(left, right, vector_value_type_t(-1)); return left; } From fbde2be7796abd7ff57c575d7f014616c727d202 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 09:42:50 -0600 Subject: [PATCH 16/45] Update vector oracle to use Kokkos ref operators --- tests/numerics/kokkos_vector_ops_oracle_runners.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h index 73fbbe7834..5fcd7e45a5 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_runners.h +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -34,14 +34,11 @@ test_vector_ops_case(const vector_case & info) const auto c_ref = libMesh::Kokkos::make_vector_ref(d_c, 0); const Vec copied = libMesh::Kokkos::copy_vector(a_ref); - const Vec mix = libMesh::Kokkos::vector_linear_combination( - Real(1), a_ref, Real(1), b_ref, Real(-1), c_ref); - const Vec scaled = libMesh::Kokkos::vector_linear_combination( - Real(1.25), a_ref, Real(-0.5), b_ref, Real(0.25), c_ref); + const Vec mix = a_ref + b_ref - c_ref; + const Vec scaled = Real(1.25) * a_ref + Real(-0.5) * b_ref + Real(0.25) * c_ref; const Vec plus_assign = a_ref + b_ref; const Vec minus_assign = a_ref - b_ref; - const Vec accum = libMesh::Kokkos::vector_linear_combination( - Real(1.25), a_ref, Real(-0.5), b_ref, Real(0.25), c_ref); + const Vec accum = Real(1.25) * a_ref + Real(-0.5) * b_ref + Real(0.25) * c_ref; const Vec divided = a_ref / Real(5.0); const Vec outer_right = Real(5.0) * a_ref; const Vec outer_left = a_ref * Real(5.0); From 088a785910c59265508927d1cda63ff0a31d1fe9 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 09:48:58 -0600 Subject: [PATCH 17/45] Rename tensor combination kernel --- include/gpu/kokkos_tensor_ops.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 2d94cb5344..71926b92b1 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -299,10 +299,10 @@ void update_tensor_components(LeftTensor & left, const RightTensor & right, cons template LIBMESH_DEVICE_INLINE -ResultTensor linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) +ResultTensor combine_tensors(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) { ResultTensor out; out.zero(); @@ -717,7 +717,7 @@ auto operator+(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::linear_combination>( + return detail::combine_tensors>( tensor_value_type_t(1), left, tensor_value_type_t(1), right); } @@ -728,7 +728,7 @@ auto operator-(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::linear_combination>( + return detail::combine_tensors>( tensor_value_type_t(1), left, tensor_value_type_t(-1), right); } From 38ad2ed2adffaecbdcae2d18268896a1dda8ac3f Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 12:02:32 -0500 Subject: [PATCH 18/45] Fixup Kokkos plumbing --- include/base/libmesh_device.h | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 include/base/libmesh_device.h diff --git a/include/base/libmesh_device.h b/include/base/libmesh_device.h new file mode 100644 index 0000000000..f41d4c70b0 --- /dev/null +++ b/include/base/libmesh_device.h @@ -0,0 +1,74 @@ +// The libMesh Finite Element Library. +// Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. + +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +#ifndef LIBMESH_LIBMESH_DEVICE_H +#define LIBMESH_LIBMESH_DEVICE_H + +// Defines LIBMESH_DEVICE_INLINE, mirroring MetaPhysicL's METAPHYSICL_INLINE +// pattern (metaphysicl_device.h / METAPHYSICL_KOKKOS_COMPILATION). +// +// When compiling a .K translation unit (LIBMESH_KOKKOS_COMPILATION is defined +// by kokkos.mk), this expands to KOKKOS_INLINE_FUNCTION so that annotated +// methods are callable from both host and device code. In all other +// translation units it expands to plain `inline`. +#ifdef LIBMESH_KOKKOS_COMPILATION +# include +# include +# define LIBMESH_DEVICE_INLINE KOKKOS_INLINE_FUNCTION + +// Backend-neutral device-code detection for Kokkos .K translation units. +// This lets error/exception plumbing share a single predicate instead of +// hardcoding per-backend checks in multiple headers. +# if defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__) || defined(__SYCL_DEVICE_ONLY__) +# define LIBMESH_IN_DEVICE_CODE 1 +# else +# define LIBMESH_IN_DEVICE_CODE 0 +# endif + +// Device-safe assert: uses printf (supported on CUDA/HIP) and +// Kokkos::abort() for backend-portable device termination. +// Defined here (not in libmesh_common.h) because Kokkos headers +// are only available in .K translation units. +# ifndef NDEBUG +# define LIBMESH_DEVICE_ASSERT(asserted) \ + do { if (!(asserted)) { \ + printf("libMesh assert failed: %s, file %s, line %d\n", \ + #asserted, __FILE__, __LINE__); \ + ::Kokkos::abort("libmesh_assert failed"); \ + } } while (0) +# else +# define LIBMESH_DEVICE_ASSERT(asserted) ((void) 0) +# endif + +# define LIBMESH_DEVICE_ERROR_MSG(msg) \ + do { \ + printf("libMesh error: %s, file %s, line %d\n", \ + msg, __FILE__, __LINE__); \ + ::Kokkos::abort(msg); \ + } while (0) + +# define LIBMESH_DEVICE_ERROR_MSG_IF(cond, msg) \ + do { if (cond) { LIBMESH_DEVICE_ERROR_MSG(msg); } } while (0) + +#else +# define LIBMESH_DEVICE_INLINE inline +# define LIBMESH_IN_DEVICE_CODE 0 +# define LIBMESH_DEVICE_ERROR_MSG(msg) libmesh_error_msg(msg) +# define LIBMESH_DEVICE_ERROR_MSG_IF(cond, msg) libmesh_error_msg_if(cond, msg) +#endif + +#endif // LIBMESH_LIBMESH_DEVICE_H From 556d3f1cd71768c36393bf2c3134d1080b5a8927 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 10:27:16 -0600 Subject: [PATCH 19/45] Forward libMesh error macros into device code --- include/base/libmesh_common.h | 9 ++++++++- include/base/libmesh_device.h | 2 -- include/base/libmesh_exceptions.h | 4 ++++ include/numerics/type_tensor.h | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/base/libmesh_common.h b/include/base/libmesh_common.h index efd5746298..aebc9107f3 100644 --- a/include/base/libmesh_common.h +++ b/include/base/libmesh_common.h @@ -309,7 +309,7 @@ extern bool warned_about_auto_ptr; #define libmesh_assert_less_equal_msg(expr1,expr2, msg) ((void) 0) #define libmesh_assert_greater_equal_msg(expr1,expr2, msg) ((void) 0) -#elif defined(LIBMESH_DEVICE_ASSERT) +#elif defined(LIBMESH_KOKKOS_COMPILATION) // Kokkos compilation: use the device-safe assert from libmesh_device.h. #define libmesh_assert_msg(asserted, msg) LIBMESH_DEVICE_ASSERT(asserted) @@ -426,6 +426,12 @@ struct casting_compare { // // The libmesh_terminate() macro prints a message and throws a // TerminationException exception +#if LIBMESH_IN_DEVICE_CODE +#define libmesh_error_msg(msg) \ + do { \ + LIBMESH_DEVICE_ERROR_MSG(msg); \ + } while (0) +#else #define libmesh_error_msg(msg) \ do { \ std::stringstream message_stream; \ @@ -433,6 +439,7 @@ struct casting_compare { libMesh::MacroFunctions::report_error(__FILE__, __LINE__, LIBMESH_DATE, LIBMESH_TIME, message_stream); \ LIBMESH_THROW(libMesh::LogicError(message_stream.str())); \ } while (0) +#endif #define libmesh_error() libmesh_error_msg("") diff --git a/include/base/libmesh_device.h b/include/base/libmesh_device.h index f41d4c70b0..87388289b8 100644 --- a/include/base/libmesh_device.h +++ b/include/base/libmesh_device.h @@ -67,8 +67,6 @@ #else # define LIBMESH_DEVICE_INLINE inline # define LIBMESH_IN_DEVICE_CODE 0 -# define LIBMESH_DEVICE_ERROR_MSG(msg) libmesh_error_msg(msg) -# define LIBMESH_DEVICE_ERROR_MSG_IF(cond, msg) libmesh_error_msg_if(cond, msg) #endif #endif // LIBMESH_LIBMESH_DEVICE_H diff --git a/include/base/libmesh_exceptions.h b/include/base/libmesh_exceptions.h index c3892f8677..8dd8bdde62 100644 --- a/include/base/libmesh_exceptions.h +++ b/include/base/libmesh_exceptions.h @@ -231,7 +231,11 @@ class TerminationException #else +#if LIBMESH_IN_DEVICE_CODE +#define LIBMESH_THROW(e) do { LIBMESH_DEVICE_ERROR_MSG((e).what()); } while (0) +#else #define LIBMESH_THROW(e) do { libMesh::err << e.what(); libMesh::libmesh_abort(); } while (0) +#endif #define libmesh_rethrow #define libmesh_try #define libmesh_catch(e) if (0) diff --git a/include/numerics/type_tensor.h b/include/numerics/type_tensor.h index ac6dc14542..04f4b5bad8 100644 --- a/include/numerics/type_tensor.h +++ b/include/numerics/type_tensor.h @@ -756,8 +756,8 @@ T & TypeTensor::operator () (const unsigned int i, { #if LIBMESH_DIM < 3 - LIBMESH_DEVICE_ERROR_MSG_IF(i >= LIBMESH_DIM || j >= LIBMESH_DIM, - "ERROR: You are assigning to a tensor component that is out of range for the compiled LIBMESH_DIM!"); + libmesh_error_msg_if(i >= LIBMESH_DIM || j >= LIBMESH_DIM, + "ERROR: You are assigning to a tensor component that is out of range for the compiled LIBMESH_DIM!"); #endif From 05b9b171cda559a7a4e994927683f6e03e721415 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Mon, 18 May 2026 09:44:04 -0600 Subject: [PATCH 20/45] Compact Kokkos numerics operator shims --- include/gpu/kokkos_tensor_ops.h | 227 +++++++++++++------------------- include/gpu/kokkos_vector_ops.h | 225 +++++++++++++++---------------- 2 files changed, 197 insertions(+), 255 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 71926b92b1..783cea91b6 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -42,20 +42,17 @@ ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) return out; } -template -LIBMESH_DEVICE_INLINE -ResultTensor copy_tensor(const TensorLike & T_in) -{ - return materialize_tensor(T_in); -} - -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t copy_tensor(const TensorLike & T_in) +auto copy_tensor(const TensorLike & T_in) + -> std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor> { - return copy_tensor>(T_in); + using output_type = std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>; + return materialize_tensor(T_in); } namespace detail @@ -297,71 +294,13 @@ void update_tensor_components(LeftTensor & left, const RightTensor & right, cons factor * tensor_get_component(right, row, col)); } -template -LIBMESH_DEVICE_INLINE -ResultTensor combine_tensors(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - alpha * tensor_get_component(A, row, col) + - beta * tensor_get_component(B, row, col)); - - return out; -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor scale_tensor(const Scalar & alpha, const TensorLike & T_in) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); - - return out; -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor divide_tensor(const TensorLike & T_in, const Scalar & alpha) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); - - return out; -} - -template +template LIBMESH_DEVICE_INLINE -void scale_tensor_components(TensorLike & T_in, const Scalar & alpha) +void transform_tensor_components(OutputTensor & out, const InputTensor & in, const TransformOp & op) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) * alpha); -} - -template -LIBMESH_DEVICE_INLINE -void divide_tensor_components(TensorLike & T_in, const Scalar & alpha) -{ - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) / alpha); + tensor_set_component(out, row, col, op(tensor_get_component(in, row, col))); } // Tensor reductions and predicates @@ -473,37 +412,32 @@ auto is_zero(const TensorLike & T_in) return detail::tensor_is_zero(T_in); } -template -LIBMESH_DEVICE_INLINE -auto outer_product(const LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v, ResultTensor> -{ - return detail::outer_product(left, right); -} - -template +template LIBMESH_DEVICE_INLINE auto outer_product(const LeftVector & left, const RightVector & right) -> std::enable_if_t && is_vector_like_v, - libMesh::TypeTensor>> -{ - return outer_product>>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -auto transpose(const TensorLike & T_in) - -> std::enable_if_t, ResultTensor> + std::conditional_t::value, + libMesh::TypeTensor>, + ResultTensor>> { - return detail::transpose(T_in); + using output_type = std::conditional_t::value, + libMesh::TypeTensor>, + ResultTensor>; + return detail::outer_product(left, right); } -template +template LIBMESH_DEVICE_INLINE auto transpose(const TensorLike & T_in) - -> std::enable_if_t, tensor_semantic_type_t> + -> std::enable_if_t, + std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>> { - return transpose>(T_in); + using output_type = std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>; + return detail::transpose(T_in); } template @@ -514,53 +448,61 @@ auto det(const TensorLike & T_in) return T_in.det(); } -template -LIBMESH_DEVICE_INLINE -auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) - -> std::enable_if_t, ResultTensor> -{ - return detail::inverse(T_in, dim); -} - -template +template LIBMESH_DEVICE_INLINE auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) - -> std::enable_if_t, tensor_semantic_type_t> + -> std::enable_if_t, + std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>> { - return inverse>(T_in, dim); + using output_type = std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>; + return detail::inverse(T_in, dim); } -template +template LIBMESH_DEVICE_INLINE auto row(const TensorLike & T_in, const unsigned int i) - -> std::enable_if_t, ResultVector> + -> std::enable_if_t, + std::conditional_t::value, + libMesh::TypeVector>, + ResultVector>> { - return detail::row(T_in, i); + using output_type = std::conditional_t::value, + libMesh::TypeVector>, + ResultVector>; + return detail::row(T_in, i); } -template +template LIBMESH_DEVICE_INLINE -auto row(const TensorLike & T_in, const unsigned int i) - -> std::enable_if_t, libMesh::TypeVector>> +auto column(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, + std::conditional_t::value, + libMesh::TypeVector>, + ResultVector>> { - return row>>(T_in, i); + using output_type = std::conditional_t::value, + libMesh::TypeVector>, + ResultVector>; + return detail::column(T_in, i); } -template +template LIBMESH_DEVICE_INLINE -auto column(const TensorLike & T_in, const unsigned int i) - -> std::enable_if_t, ResultVector> -{ - return detail::column(T_in, i); -} +auto operator+=(LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + LeftTensor &>; -template +template LIBMESH_DEVICE_INLINE -auto column(const TensorLike & T_in, const unsigned int i) - -> std::enable_if_t, libMesh::TypeVector>> -{ - return column>>(T_in, i); -} +auto operator-=(LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + LeftTensor &>; template template @@ -575,7 +517,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add(const RightTensor & right) { - detail::update_tensor_components(*this, right, value_type(1)); + libMesh::Kokkos::operator+=(*this, right); } template @@ -591,7 +533,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract(const RightTensor & right) { - detail::update_tensor_components(*this, right, value_type(-1)); + libMesh::Kokkos::operator-=(*this, right); } template @@ -707,7 +649,12 @@ auto operator-(const TensorLike & T_in) -> std::enable_if_t && is_tensor_ref_v, tensor_semantic_type_t> { - return detail::scale_tensor>(tensor_value_type_t(-1), T_in); + auto out = copy_tensor>(T_in); + detail::transform_tensor_components( + out, + T_in, + detail::negate_value>{}); + return out; } template @@ -717,8 +664,9 @@ auto operator+(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::combine_tensors>( - tensor_value_type_t(1), left, tensor_value_type_t(1), right); + auto out = copy_tensor>(left); + out += right; + return out; } template @@ -728,8 +676,9 @@ auto operator-(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::combine_tensors>( - tensor_value_type_t(1), left, tensor_value_type_t(-1), right); + auto out = copy_tensor>(left); + out -= right; + return out; } template >(alpha, T_in); + return T_in * alpha; } template >(alpha, T_in); + auto out = copy_tensor>(T_in); + detail::transform_tensor_components(out, T_in, detail::scale_value{alpha}); + return out; } template @@ -761,7 +712,9 @@ auto operator/(const TensorLike & T_in, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, tensor_semantic_type_t> { - return detail::divide_tensor>(T_in, alpha); + auto out = copy_tensor>(T_in); + detail::transform_tensor_components(out, T_in, detail::divide_value{alpha}); + return out; } template && !is_tensor_like_v, LeftTensor &> { - detail::scale_tensor_components(left, alpha); + detail::transform_tensor_components(left, left, detail::scale_value{alpha}); return left; } @@ -862,7 +815,7 @@ auto operator/=(LeftTensor & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftTensor &> { - detail::divide_tensor_components(left, alpha); + detail::transform_tensor_components(left, left, detail::divide_value{alpha}); return left; } diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 2c68a0341f..f5f99adaa6 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -28,20 +28,17 @@ ResultVector zero_vector_value() return out; } -template +template LIBMESH_DEVICE_INLINE -ResultVector copy_vector(const VectorLike & v) +auto copy_vector(const VectorLike & v) + -> std::conditional_t::value, + vector_semantic_type_t, + ResultVector> { - return materialize_vector(v); -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t copy_vector(const VectorLike & v) -{ - return copy_vector>(v); + using output_type = std::conditional_t::value, + vector_semantic_type_t, + ResultVector>; + return materialize_vector(v); } namespace detail @@ -74,89 +71,61 @@ void update_vector_components(LeftVector & left, const RightVector & right, cons factor * vector_get_component(right, component)); } -template +template LIBMESH_DEVICE_INLINE -ResultVector linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b) +void transform_vector_components(OutputVector & out, const InputVector & in, const TransformOp & op) { - ResultVector out; - out.zero(); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - alpha * vector_get_component(a, component) + - beta * vector_get_component(b, component)); - - return out; + vector_set_component(out, component, op(vector_get_component(in, component))); } -template -LIBMESH_DEVICE_INLINE -ResultVector linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b, - const ScalarC & gamma, - const VectorC & c) +template +struct negate_value { - ResultVector out; - out.zero(); + LIBMESH_DEVICE_INLINE + auto operator()(const ValueType & value) const + { + return -value; + } +}; - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - alpha * vector_get_component(a, component) + - beta * vector_get_component(b, component) + - gamma * vector_get_component(c, component)); - - return out; -} - -template -LIBMESH_DEVICE_INLINE -ResultVector scale_vector(const Scalar & alpha, const VectorLike & v) +template +struct scale_value { - ResultVector out; - out.zero(); + const Scalar & alpha; - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, alpha * vector_get_component(v, component)); + LIBMESH_DEVICE_INLINE + auto operator()(const Scalar & value) const -> decltype(value * alpha) + { + return value * alpha; + } - return out; -} + template + LIBMESH_DEVICE_INLINE + auto operator()(const ValueType & value) const -> decltype(value * alpha) + { + return value * alpha; + } +}; -template -LIBMESH_DEVICE_INLINE -ResultVector divide_vector(const VectorLike & v, const Scalar & alpha) +template +struct divide_value { - ResultVector out; - out.zero(); + const Scalar & alpha; - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, vector_get_component(v, component) / alpha); + LIBMESH_DEVICE_INLINE + auto operator()(const Scalar & value) const -> decltype(value / alpha) + { + return value / alpha; + } - return out; -} - -template -LIBMESH_DEVICE_INLINE -void scale_vector_components(VectorLike & v, const Scalar & alpha) -{ - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(v, component, vector_get_component(v, component) * alpha); -} - -template -LIBMESH_DEVICE_INLINE -void divide_vector_components(VectorLike & v, const Scalar & alpha) -{ - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(v, component, vector_get_component(v, component) / alpha); -} + template + LIBMESH_DEVICE_INLINE + auto operator()(const ValueType & value) const -> decltype(value / alpha) + { + return value / alpha; + } +}; } // namespace detail @@ -231,31 +200,36 @@ bool vector_is_zero(const VectorLike & v) return true; } -template +template LIBMESH_DEVICE_INLINE -ResultVector vector_unit(const VectorLike & v) +auto vector_unit(const VectorLike & v) + -> std::conditional_t::value, + vector_semantic_type_t, + ResultVector> { const auto length = vector_norm(v); libmesh_assert_not_equal_to(length, static_cast(0.)); - return detail::divide_vector(v, length); -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_unit(const VectorLike & v) -{ - return vector_unit>(v); + using output_type = std::conditional_t::value, + vector_semantic_type_t, + ResultVector>; + auto out = copy_vector(v); + detail::transform_vector_components(out, v, detail::divide_value{length}); + return out; } // Geometry -template +template LIBMESH_DEVICE_INLINE -ResultVector vector_cross(const LeftVector & left, const RightVector & right) +auto vector_cross(const LeftVector & left, const RightVector & right) + -> std::conditional_t::value, + vector_semantic_type_t, + ResultVector> { - ResultVector out; + using output_type = std::conditional_t::value, + vector_semantic_type_t, + ResultVector>; + output_type out; out.zero(); #if LIBMESH_DIM == 3 @@ -279,16 +253,6 @@ ResultVector vector_cross(const LeftVector & left, const RightVector & right) return out; } -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_cross(const LeftVector & left, const RightVector & right) -{ - return vector_cross>(left, right); -} - template LIBMESH_DEVICE_INLINE auto vector_triple_product(const LeftVector & left, @@ -385,6 +349,20 @@ auto is_zero(const VectorLike & v) return vector_is_zero(v); } +template +LIBMESH_DEVICE_INLINE +auto operator+=(LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + LeftVector &>; + +template +LIBMESH_DEVICE_INLINE +auto operator-=(LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + LeftVector &>; + template template LIBMESH_DEVICE_INLINE @@ -398,7 +376,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::add(const RightVector & right) { - detail::update_vector_components(*this, right, value_type(1)); + libMesh::Kokkos::operator+=(*this, right); } template @@ -414,7 +392,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract(const RightVector & right) { - detail::update_vector_components(*this, right, value_type(-1)); + libMesh::Kokkos::operator-=(*this, right); } template @@ -491,7 +469,12 @@ auto operator-(const VectorLike & v) -> std::enable_if_t && is_vector_ref_v, vector_semantic_type_t> { - return detail::scale_vector>(vector_value_type_t(-1), v); + auto out = copy_vector>(v); + detail::transform_vector_components( + out, + v, + detail::negate_value>{}); + return out; } template @@ -501,8 +484,9 @@ auto operator+(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), vector_semantic_type_t> { - return detail::linear_combination>( - vector_value_type_t(1), left, vector_value_type_t(1), right); + auto out = copy_vector>(left); + out += right; + return out; } template @@ -512,8 +496,9 @@ auto operator-(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), vector_semantic_type_t> { - return detail::linear_combination>( - vector_value_type_t(1), left, vector_value_type_t(-1), right); + auto out = copy_vector>(left); + out -= right; + return out; } template >(alpha, v); + return v * alpha; } template >(alpha, v); + auto out = copy_vector>(v); + detail::transform_vector_components(out, v, detail::scale_value{alpha}); + return out; } template >(v, alpha); + auto out = copy_vector>(v); + detail::transform_vector_components(out, v, detail::divide_value{alpha}); + return out; } template @@ -613,7 +602,7 @@ auto operator*=(LeftVector & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftVector &> { - detail::scale_vector_components(left, alpha); + detail::transform_vector_components(left, left, detail::scale_value{alpha}); return left; } @@ -624,7 +613,7 @@ auto operator/=(LeftVector & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftVector &> { - detail::divide_vector_components(left, alpha); + detail::transform_vector_components(left, left, detail::divide_value{alpha}); return left; } From 35a212b863b06301c653eaca7c4025518fa2f7d9 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 28 May 2026 16:11:02 -0500 Subject: [PATCH 21/45] More explanation on not requesting GNU extensions With Kokkos we may have device compilers that can't handle them. --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 7118fa1e89..c0c0c08b0d 100644 --- a/configure.ac +++ b/configure.ac @@ -174,6 +174,10 @@ AS_IF([test "x$enablemarch" != "xno"], # flag, for the current compiler, for the user's requested C++ # standards level. Adds the required flag to CXXFLAGS if # one is found. Exits if no acceptable flag is found. +# +# Don't turn on GNU extensions. We don't use them, and with device +# computing we might be using a mix of compilers that don't all +# support them. # -------------------------------------------------------------- ACSM_CXX_COMPILER_STANDARD([2017], [2017], [defaultnoext]) From cdcc33fafd0de7851c686faeb55ef03290bf3e0c Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Fri, 29 May 2026 13:45:32 -0500 Subject: [PATCH 22/45] We can run Kokkos tests with Kokkos w/o CppUnit --- Makefile.am | 2 +- m4/libmesh_optional_packages.m4 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index dd0ad2ec2a..e7cadb9900 100644 --- a/Makefile.am +++ b/Makefile.am @@ -310,7 +310,7 @@ endif # Make sure we build the library before we test it SUBDIRS += . -if LIBMESH_ENABLE_CPPUNIT +if LIBMESH_ENABLE_TESTS_DIR SUBDIRS += tests endif diff --git a/m4/libmesh_optional_packages.m4 b/m4/libmesh_optional_packages.m4 index e99fe1781a..abf765e7ce 100644 --- a/m4/libmesh_optional_packages.m4 +++ b/m4/libmesh_optional_packages.m4 @@ -876,6 +876,10 @@ AS_IF([test "x$enablekokkos" != "xno"], AM_CONDITIONAL(LIBMESH_ENABLE_KOKKOS, test x$enablekokkos = xyes) # ------------------------------------------------------------- +# ------------------------------------------------------------- +# With either CppUnit or Kokkos we'll have tests to run +# ------------------------------------------------------------- +AM_CONDITIONAL(LIBMESH_ENABLE_TESTS_DIR, test x$enablekokkos = xyes -o x$enablecppunit = xyes) AS_IF([test "$enableoptional" != no], From e77e44ce06f19d38055e0b0db58190b2f018dfcd Mon Sep 17 00:00:00 2001 From: Rochishnu Chowdhury Date: Tue, 26 May 2026 20:37:33 -0600 Subject: [PATCH 23/45] Align Kokkos unit test naming --- tests/Makefile.am | 91 +++++++++++++------ ...nsor_ops_oracle_test.K => driver_kokkos.K} | 9 +- .../numerics/kokkos_vector_ops_oracle_test.K | 20 ---- 3 files changed, 70 insertions(+), 50 deletions(-) rename tests/{numerics/kokkos_tensor_ops_oracle_test.K => driver_kokkos.K} (53%) delete mode 100644 tests/numerics/kokkos_vector_ops_oracle_test.K diff --git a/tests/Makefile.am b/tests/Makefile.am index 266c260650..3b9a2d8e8f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -243,6 +243,13 @@ unit_tests_data = $(data) # Why isn't this working automatically? EXTRA_DIST = $(data) +kokkos_unit_test_sources = \ + numerics/kokkos_numerics_oracle_test_utils.h \ + numerics/kokkos_tensor_ops_oracle_fixtures.h \ + numerics/kokkos_tensor_ops_oracle_runners.h \ + numerics/kokkos_vector_ops_oracle_fixtures.h \ + numerics/kokkos_vector_ops_oracle_runners.h +EXTRA_DIST += $(kokkos_unit_test_sources) if LIBMESH_ENABLE_FPARSER unit_tests_sources += \ @@ -255,20 +262,19 @@ TESTS = if LIBMESH_ENABLE_KOKKOS KOKKOS_TEST_CPPFLAGS += -I$(top_srcdir)/include $(KOKKOS_CPPFLAGS) - check_PROGRAMS += kokkos_vector_ops_oracle_unit kokkos_tensor_ops_oracle_unit - TESTS += kokkos_vector_ops_oracle_unit kokkos_tensor_ops_oracle_unit - - kokkos_vector_ops_oracle_unit_SOURCES = numerics/kokkos_vector_ops_oracle_test.K - kokkos_vector_ops_oracle_unit_CPPFLAGS = $(AM_CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) - kokkos_vector_ops_oracle_unit_CXXFLAGS = $(AM_CXXFLAGS) $(KOKKOS_CXXFLAGS) - kokkos_vector_ops_oracle_unit_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) - kokkos_vector_ops_oracle_unit_LDADD = $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) +if LIBMESH_DBG_MODE + check_PROGRAMS += unit_tests-kokkos-dbg + TESTS += unit_tests-kokkos-dbg + unit_tests_kokkos_dbg_SOURCES = + EXTRA_unit_tests_kokkos_dbg_SOURCES = driver_kokkos.K +endif - kokkos_tensor_ops_oracle_unit_SOURCES = numerics/kokkos_tensor_ops_oracle_test.K - kokkos_tensor_ops_oracle_unit_CPPFLAGS = $(AM_CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) - kokkos_tensor_ops_oracle_unit_CXXFLAGS = $(AM_CXXFLAGS) $(KOKKOS_CXXFLAGS) - kokkos_tensor_ops_oracle_unit_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) - kokkos_tensor_ops_oracle_unit_LDADD = $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) +if LIBMESH_OPT_MODE + check_PROGRAMS += unit_tests-kokkos-opt + TESTS += unit_tests-kokkos-opt + unit_tests_kokkos_opt_SOURCES = + EXTRA_unit_tests_kokkos_opt_SOURCES = driver_kokkos.K +endif endif # our GLIBC debugging preprocessor flags seem to potentially conflict @@ -383,24 +389,52 @@ if LIBMESH_ENABLE_CPPUNIT TESTS += run_unit_tests.sh endif -# Compile .K translation units with the Kokkos device compiler. -# If KOKKOS_CXX is not the MPI wrapper, configure populates -# $(KOKKOS_MPI_CPPFLAGS) from the wrapper's compile flags so mpi.h and -# any wrapper-provided defines remain visible. -.K.o: +if LIBMESH_ENABLE_KOKKOS +driver_kokkos_src = driver_kokkos.K +unit_tests_kokkos_dbg_object = unit_tests_kokkos_dbg-driver_kokkos.$(OBJEXT) +unit_tests_kokkos_opt_object = unit_tests_kokkos_opt-driver_kokkos.$(OBJEXT) +unit_tests_kokkos_dbg_depfile = $(DEPDIR)/unit_tests_kokkos_dbg-driver_kokkos.d +unit_tests_kokkos_opt_depfile = $(DEPDIR)/unit_tests_kokkos_opt-driver_kokkos.d +kokkos_unit_test_depfiles = $(unit_tests_kokkos_dbg_depfile) $(unit_tests_kokkos_opt_depfile) +kokkos_unit_test_cleanfiles = $(unit_tests_kokkos_dbg_object) $(unit_tests_kokkos_opt_object) \ + $(kokkos_unit_test_depfiles) \ + unit_tests-kokkos-dbg$(EXEEXT) unit_tests-kokkos-opt$(EXEEXT) + +# Build the Kokkos tests with the same mode-suffixed naming as the +# original libMesh unit test executables, while still compiling with +# the Kokkos device compiler and mode-specific flags. +$(unit_tests_kokkos_dbg_object): $(driver_kokkos_src) + @$(MKDIR_P) $(DEPDIR) $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(KOKKOS_MPI_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ + $(KOKKOS_MPI_CPPFLAGS) $(CPPFLAGS_DBG) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS_DBG) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ + -MMD -MP -MF $(unit_tests_kokkos_dbg_depfile) \ -c $< -o $@ -# Custom link rules so the Kokkos compiler drives the final link step. -kokkos_vector_ops_oracle_unit_LINK = \ - $(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ - $(LDFLAGS) $(kokkos_vector_ops_oracle_unit_LDFLAGS) -o $@ +$(unit_tests_kokkos_opt_object): $(driver_kokkos_src) + @$(MKDIR_P) $(DEPDIR) + $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(KOKKOS_MPI_CPPFLAGS) $(CPPFLAGS_OPT) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS_OPT) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ + -MMD -MP -MF $(unit_tests_kokkos_opt_depfile) \ + -c $< -o $@ -kokkos_tensor_ops_oracle_unit_LINK = \ - $(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ - $(LDFLAGS) $(kokkos_tensor_ops_oracle_unit_LDFLAGS) -o $@ +unit_tests-kokkos-dbg$(EXEEXT): $(unit_tests_kokkos_dbg_object) $(top_builddir)/libmesh_dbg.la + @rm -f $@ + $(AM_V_GEN)$(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ + $(LDFLAGS) $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) -o $@ \ + $(unit_tests_kokkos_dbg_object) \ + $(top_builddir)/libmesh_dbg.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) $(LIBS) + +unit_tests-kokkos-opt$(EXEEXT): $(unit_tests_kokkos_opt_object) $(top_builddir)/libmesh_opt.la + @rm -f $@ + $(AM_V_GEN)$(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ + $(LDFLAGS) $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) -o $@ \ + $(unit_tests_kokkos_opt_object) \ + $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) $(LIBS) + +-include $(kokkos_unit_test_depfiles) +endif CLEANFILES = cube_mesh.xda \ slit_mesh.xda \ @@ -487,7 +521,8 @@ CLEANFILES = cube_mesh.xda \ write_exodus_TRI6.e \ write_exodus_TRI7.e \ write_exodus_TRISHELL3.e \ - smoother.out + smoother.out \ + $(kokkos_unit_test_cleanfiles) # need to link any data files for VPATH builds if LIBMESH_VPATH_BUILD diff --git a/tests/numerics/kokkos_tensor_ops_oracle_test.K b/tests/driver_kokkos.K similarity index 53% rename from tests/numerics/kokkos_tensor_ops_oracle_test.K rename to tests/driver_kokkos.K index 858d477369..e9e22cd54b 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_test.K +++ b/tests/driver_kokkos.K @@ -1,5 +1,8 @@ #include "libmesh/libmesh_config.h" -#include "kokkos_tensor_ops_oracle_runners.h" +#include "numerics/kokkos_tensor_ops_oracle_runners.h" +#include "numerics/kokkos_vector_ops_oracle_runners.h" + +#include int main(int argc, char ** argv) @@ -7,7 +10,9 @@ main(int argc, char ** argv) Kokkos::initialize(argc, argv); libMesh::LibMeshInit init(argc, argv); - const int total_fail = libMeshTest::KokkosTensorOracle::run_all_oracles(); + int total_fail = 0; + total_fail += libMeshTest::KokkosVectorOracle::run_all_oracles(); + total_fail += libMeshTest::KokkosTensorOracle::run_all_oracles(); Kokkos::finalize(); diff --git a/tests/numerics/kokkos_vector_ops_oracle_test.K b/tests/numerics/kokkos_vector_ops_oracle_test.K deleted file mode 100644 index fedc7651ff..0000000000 --- a/tests/numerics/kokkos_vector_ops_oracle_test.K +++ /dev/null @@ -1,20 +0,0 @@ -#include "libmesh/libmesh_config.h" -#include "kokkos_vector_ops_oracle_runners.h" - -int -main(int argc, char ** argv) -{ - Kokkos::initialize(argc, argv); - libMesh::LibMeshInit init(argc, argv); - - const int total_fail = libMeshTest::KokkosVectorOracle::run_all_oracles(); - - Kokkos::finalize(); - - if (total_fail == 0) - std::printf("ALL TESTS PASSED\n"); - else - std::printf("%d TEST(S) FAILED\n", total_fail); - - return total_fail ? 1 : 0; -} From 405b152574dbc4f912a2b179824e8053664b7a9e Mon Sep 17 00:00:00 2001 From: Rochishnu Chowdhury Date: Tue, 9 Jun 2026 17:13:58 -0600 Subject: [PATCH 24/45] Consolidate Kokkos numerics operator helpers --- include/gpu/kokkos_tensor_ops.h | 82 +++++++++++++++--------- include/gpu/kokkos_vector_ops.h | 109 +++++++++++++++++++------------- 2 files changed, 118 insertions(+), 73 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 783cea91b6..940e7edb41 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -58,6 +58,9 @@ auto copy_tensor(const TensorLike & T_in) namespace detail { +// These helpers are shared by the public functions and ref operators so +// Kokkos-backed refs use direct component access without extra materialization. + template LIBMESH_DEVICE_INLINE auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) @@ -182,6 +185,8 @@ ResultTensor transpose(const TensorLike & T_in) return out; } +// Tensor/tensor product operators delegate here for the same direct-access path. + template LIBMESH_DEVICE_INLINE ResultTensor multiply_tensors(const LeftTensor & left, const RightTensor & right) @@ -227,6 +232,8 @@ ResultVector column(const TensorLike & T_in, const unsigned int col_index) return out; } +// Tensor/vector and vector/tensor product operators keep the direct-access path too. + template LIBMESH_DEVICE_INLINE ResultVector multiply_tensor_vector(const TensorLike & T_in, const VectorLike & v) @@ -303,6 +310,28 @@ void transform_tensor_components(OutputTensor & out, const InputTensor & in, con tensor_set_component(out, row, col, op(tensor_get_component(in, row, col))); } +template +LIBMESH_DEVICE_INLINE +ResultTensor transformed_tensor(const TensorLike & T_in, const TransformOp & op) +{ + ResultTensor out; + out.zero(); + transform_tensor_components(out, T_in, op); + return out; +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_equal_impl(const LeftTensor & left, const RightTensor & right) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) + return false; + + return true; +} + // Tensor reductions and predicates template @@ -379,35 +408,36 @@ bool tensor_is_zero(const TensorLike & T_in) // libMesh-like convenience wrappers -template +template && is_tensor_like_v, + int>::type = 0> LIBMESH_DEVICE_INLINE auto contract(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v, - decltype(detail::tensor_contract(left, right))> { return detail::tensor_contract(left, right); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE auto norm_sq(const TensorLike & T_in) - -> std::enable_if_t, decltype(detail::tensor_norm_sq(T_in))> { return detail::tensor_norm_sq(T_in); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE auto norm(const TensorLike & T_in) - -> std::enable_if_t, decltype(detail::tensor_norm(T_in))> { return detail::tensor_norm(T_in); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE -auto is_zero(const TensorLike & T_in) - -> std::enable_if_t, bool> +bool is_zero(const TensorLike & T_in) { return detail::tensor_is_zero(T_in); } @@ -556,28 +586,28 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::contract(const RightTensor & right) const { - return detail::tensor_contract(*this, right); + return libMesh::Kokkos::contract(*this, right); } template LIBMESH_DEVICE_INLINE auto tensor_ref::norm() const { - return detail::tensor_norm(*this); + return libMesh::Kokkos::norm(*this); } template LIBMESH_DEVICE_INLINE auto tensor_ref::norm_sq() const { - return detail::tensor_norm_sq(*this); + return libMesh::Kokkos::norm_sq(*this); } template LIBMESH_DEVICE_INLINE bool tensor_ref::is_zero() const { - return detail::tensor_is_zero(*this); + return libMesh::Kokkos::is_zero(*this); } template @@ -649,12 +679,9 @@ auto operator-(const TensorLike & T_in) -> std::enable_if_t && is_tensor_ref_v, tensor_semantic_type_t> { - auto out = copy_tensor>(T_in); - detail::transform_tensor_components( - out, + return detail::transformed_tensor>( T_in, detail::negate_value>{}); - return out; } template @@ -700,9 +727,9 @@ template >(T_in); - detail::transform_tensor_components(out, T_in, detail::scale_value{alpha}); - return out; + return detail::transformed_tensor>( + T_in, + detail::scale_value{alpha}); } template @@ -712,9 +739,9 @@ auto operator/(const TensorLike & T_in, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, tensor_semantic_type_t> { - auto out = copy_tensor>(T_in); - detail::transform_tensor_components(out, T_in, detail::divide_value{alpha}); - return out; + return detail::transformed_tensor>( + T_in, + detail::divide_value{alpha}); } template || is_tensor_ref_v), bool> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) - return false; - - return true; + return detail::tensor_equal_impl(left, right); } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index f5f99adaa6..96b1e923e2 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -44,6 +44,26 @@ auto copy_vector(const VectorLike & v) namespace detail { +// These helpers are shared by the public functions and ref operators so +// Kokkos-backed refs use direct component access without extra materialization. + +template +LIBMESH_DEVICE_INLINE +auto vector_dot_impl(const LeftVector & left, const RightVector & right) +{ + static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); + static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); + + using sum_type = + detail::remove_cvref_t; + + sum_type sum = sum_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += vector_get_component(left, component) * vector_get_component(right, component); + + return sum; +} + template LIBMESH_DEVICE_INLINE void assign_vector_components(LeftVector & left, const RightVector & right) @@ -79,6 +99,27 @@ void transform_vector_components(OutputVector & out, const InputVector & in, con vector_set_component(out, component, op(vector_get_component(in, component))); } +template +LIBMESH_DEVICE_INLINE +ResultVector transformed_vector(const VectorLike & v, const TransformOp & op) +{ + ResultVector out; + out.zero(); + transform_vector_components(out, v, op); + return out; +} + +template +LIBMESH_DEVICE_INLINE +bool vector_equal_impl(const LeftVector & left, const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if (vector_get_component(left, component) != vector_get_component(right, component)) + return false; + + return true; +} + template struct negate_value { @@ -135,17 +176,7 @@ template LIBMESH_DEVICE_INLINE auto vector_dot(const LeftVector & left, const RightVector & right) { - static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); - static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); - - using sum_type = - detail::remove_cvref_t; - - sum_type sum = sum_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += vector_get_component(left, component) * vector_get_component(right, component); - - return sum; + return detail::vector_dot_impl(left, right); } template @@ -212,9 +243,7 @@ auto vector_unit(const VectorLike & v) using output_type = std::conditional_t::value, vector_semantic_type_t, ResultVector>; - auto out = copy_vector(v); - detail::transform_vector_components(out, v, detail::divide_value{length}); - return out; + return detail::transformed_vector(v, detail::divide_value{length}); } // Geometry @@ -316,35 +345,36 @@ auto vector_solid_angle(const VectorA & v01, const VectorB & v02, const VectorC // libMesh-like convenience wrappers -template +template && is_vector_like_v, + int>::type = 0> LIBMESH_DEVICE_INLINE auto contract(const LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v, - decltype(vector_dot(left, right))> { return vector_dot(left, right); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE auto norm_sq(const VectorLike & v) - -> std::enable_if_t, decltype(vector_norm_sq(v))> { return vector_norm_sq(v); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE auto norm(const VectorLike & v) - -> std::enable_if_t, decltype(vector_norm(v))> { return vector_norm(v); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE -auto is_zero(const VectorLike & v) - -> std::enable_if_t, bool> +bool is_zero(const VectorLike & v) { return vector_is_zero(v); } @@ -415,21 +445,21 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::contract(const RightVector & right) const { - return vector_dot(*this, right); + return libMesh::Kokkos::contract(*this, right); } template LIBMESH_DEVICE_INLINE auto vector_ref::norm() const { - return vector_norm(*this); + return libMesh::Kokkos::norm(*this); } template LIBMESH_DEVICE_INLINE auto vector_ref::norm_sq() const { - return vector_norm_sq(*this); + return libMesh::Kokkos::norm_sq(*this); } template @@ -443,7 +473,7 @@ template LIBMESH_DEVICE_INLINE bool vector_ref::is_zero() const { - return vector_is_zero(*this); + return libMesh::Kokkos::is_zero(*this); } template @@ -469,12 +499,9 @@ auto operator-(const VectorLike & v) -> std::enable_if_t && is_vector_ref_v, vector_semantic_type_t> { - auto out = copy_vector>(v); - detail::transform_vector_components( - out, + return detail::transformed_vector>( v, detail::negate_value>{}); - return out; } template @@ -531,9 +558,9 @@ template >(v); - detail::transform_vector_components(out, v, detail::scale_value{alpha}); - return out; + return detail::transformed_vector>( + v, + detail::scale_value{alpha}); } template >(v); - detail::transform_vector_components(out, v, detail::divide_value{alpha}); - return out; + return detail::transformed_vector>( + v, + detail::divide_value{alpha}); } template @@ -556,11 +583,7 @@ auto operator==(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), bool> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (vector_get_component(left, component) != vector_get_component(right, component)) - return false; - - return true; + return detail::vector_equal_impl(left, right); } template From 3750b447d606a43223b3849ac2baca3ecf299bb1 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 14:29:47 -0500 Subject: [PATCH 25/45] Ignore warnings from Kokkos headers This is necessary for --enable-werror --enable-paranoid-warnings (and possibly just the former?) configurations with Ubuntu 26.4 Kokkos for me. --- include/base/libmesh_device.h | 2 ++ include/gpu/kokkos_storage_policy.h | 2 ++ tests/numerics/kokkos_numerics_oracle_test_utils.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/include/base/libmesh_device.h b/include/base/libmesh_device.h index 87388289b8..f7670328f6 100644 --- a/include/base/libmesh_device.h +++ b/include/base/libmesh_device.h @@ -26,8 +26,10 @@ // methods are callable from both host and device code. In all other // translation units it expands to plain `inline`. #ifdef LIBMESH_KOKKOS_COMPILATION +# include "libmesh/ignore_warnings.h" # include # include +# include "libmesh/restore_warnings.h" # define LIBMESH_DEVICE_INLINE KOKKOS_INLINE_FUNCTION // Backend-neutral device-code detection for Kokkos .K translation units. diff --git a/include/gpu/kokkos_storage_policy.h b/include/gpu/kokkos_storage_policy.h index 6bfec5a6df..d20884eb3a 100644 --- a/include/gpu/kokkos_storage_policy.h +++ b/include/gpu/kokkos_storage_policy.h @@ -10,7 +10,9 @@ #include "libmesh/libmesh_common.h" #define PETSC_SKIP_CXX_COMPLEX_FIX 1 +#include "libmesh/ignore_warnings.h" #include +#include "libmesh/restore_warnings.h" #undef __CUDACC_VER__ #include diff --git a/tests/numerics/kokkos_numerics_oracle_test_utils.h b/tests/numerics/kokkos_numerics_oracle_test_utils.h index c25ce2a056..5f9e42c13b 100644 --- a/tests/numerics/kokkos_numerics_oracle_test_utils.h +++ b/tests/numerics/kokkos_numerics_oracle_test_utils.h @@ -5,7 +5,9 @@ // Avoid conflicting complex operators between CUDA and PETSc #define PETSC_SKIP_CXX_COMPLEX_FIX 1 +#include "libmesh/ignore_warnings.h" #include +#include "libmesh/restore_warnings.h" #undef __CUDACC_VER__ #include From aaa2c5933c7695f068f6bf6e288bb0b4989a59d5 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 14:44:19 -0500 Subject: [PATCH 26/45] Fix for unused `dot` This looks like more of the sort of redundancy I want to get rid of, but I want to get compiling first. --- tests/numerics/kokkos_vector_ops_oracle_fixtures.h | 3 ++- tests/numerics/kokkos_vector_ops_oracle_runners.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/numerics/kokkos_vector_ops_oracle_fixtures.h b/tests/numerics/kokkos_vector_ops_oracle_fixtures.h index 5bce52de34..7fe92e0e06 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_fixtures.h +++ b/tests/numerics/kokkos_vector_ops_oracle_fixtures.h @@ -28,7 +28,7 @@ static constexpr unsigned int solid_angle_results = 1 + ((LIBMESH_DIM > 1) ? 2u : 0u) + ((LIBMESH_DIM > 2) ? 4u : 0u); static constexpr unsigned int vector_results = 11 + ((LIBMESH_DIM > 2) ? 2u : 0u); -static constexpr unsigned int scalar_results = 11 + solid_angle_results; +static constexpr unsigned int scalar_results = 12 + solid_angle_results; template LIBMESH_DEVICE_INLINE @@ -152,6 +152,7 @@ build_host_oracle(const Vec & a, const Vec & b, const Vec & c) result.vectors.push_back(mult_assign); result.vectors.push_back(div_assign); + result.scalars.push_back(a * b); result.scalars.push_back(a * b); result.scalars.push_back(a.contract(b)); result.scalars.push_back(mix.norm()); diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h index 5fcd7e45a5..233cbfed4a 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_runners.h +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -67,6 +67,7 @@ test_vector_ops_case(const vector_case & info) unsigned int scalar_offset = 0; d_scalars(scalar_offset++) = a_ref * b_ref; + d_scalars(scalar_offset++) = dot; d_scalars(scalar_offset++) = contract; d_scalars(scalar_offset++) = norm; d_scalars(scalar_offset++) = norm_sq; From f46800de09b12c79f7ad8e2e2df5ed2b4cc41444 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 15:03:18 -0500 Subject: [PATCH 27/45] Ignore -Wformat-nonliteral in ignore_warnings.h I can't actually trigger this directly yet, but I needed it in MetaPhysicL for indirectly included Kokkos headers (at least for the version in Ubuntu 26.4) there. --- include/utils/ignore_warnings.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/utils/ignore_warnings.h b/include/utils/ignore_warnings.h index af1f373aa2..33946ace9b 100644 --- a/include/utils/ignore_warnings.h +++ b/include/utils/ignore_warnings.h @@ -102,6 +102,8 @@ #pragma GCC diagnostic ignored "-Wcast-function-type" #pragma GCC diagnostic ignored "-Wdeprecated-copy" #pragma GCC diagnostic ignored "-Wclass-memaccess" +// Ignore warnings from Kokkos passing printf formats through char * +#pragma GCC diagnostic ignored "-Wformat-nonliteral" #endif #endif // __GNUC__ && !__INTEL_COMPILER From df1d58883b7559c69e4e4646306d6fc56beb8569 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 15:12:14 -0500 Subject: [PATCH 28/45] Update MetaPhysicL This fixes --enable-werror --enable-paranoid-warnings --enable-kokkos builds for me. --- contrib/metaphysicl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/metaphysicl b/contrib/metaphysicl index d40fd8a6f8..e4bb5f09e8 160000 --- a/contrib/metaphysicl +++ b/contrib/metaphysicl @@ -1 +1 @@ -Subproject commit d40fd8a6f83bf8ba3be29b9e38416ec7e29def36 +Subproject commit e4bb5f09e821c8300f44670df42a549f3c1f4232 From d31a268aa873bc923d2dda10a5822d8f2bbeb116 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 15:54:58 -0500 Subject: [PATCH 29/45] Get rid of vector_get/set_component() "Should I add a layer of indirection to accomplish X" is one of the hardest questions in software, unless X is "nothing". Then it's easy. --- include/gpu/kokkos_linalg_base.h | 32 ++++------------ include/gpu/kokkos_storage.h | 2 +- include/gpu/kokkos_tensor_ops.h | 20 +++++----- include/gpu/kokkos_vector_ops.h | 65 +++++++++++--------------------- 4 files changed, 40 insertions(+), 79 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index 70a634f1f1..a8357a59ba 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -96,6 +96,12 @@ class vector_ref return _view(_index, component); } + LIBMESH_DEVICE_INLINE + decltype(auto) operator()(const unsigned int component) + { + return _view(_index, component); + } + template LIBMESH_DEVICE_INLINE void set(const unsigned int component, const Scalar & value) @@ -366,30 +372,6 @@ using vector_semantic_type_t = typename vector_traits> template using tensor_semantic_type_t = typename tensor_traits>::semantic_type; -template -LIBMESH_DEVICE_INLINE -decltype(auto) -vector_get_component(const T & v, const unsigned int component) -{ - return v(component); -} - -template -LIBMESH_DEVICE_INLINE -void vector_set_component(T & v, const unsigned int component, const Scalar & value) -{ - v(component) = value; -} - -template -LIBMESH_DEVICE_INLINE -void vector_set_component(vector_ref v, - const unsigned int component, - const Scalar & value) -{ - v.set(component, value); -} - template LIBMESH_DEVICE_INLINE decltype(auto) @@ -445,7 +427,7 @@ OutputVector materialize_vector(const VectorLike & v) out.zero(); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, vector_get_component(v, component)); + out(component) = v(component); return out; } diff --git a/include/gpu/kokkos_storage.h b/include/gpu/kokkos_storage.h index 23e59aabf8..95c0661f70 100644 --- a/include/gpu/kokkos_storage.h +++ b/include/gpu/kokkos_storage.h @@ -27,7 +27,7 @@ void store_vector(const ViewType & view, const unsigned int i, const VectorType auto out = make_vector_ref(view, i); for (unsigned int d = 0; d < LIBMESH_DIM; ++d) - vector_set_component(out, d, vector_get_component(v, d)); + out(d) = v(d); } template diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 940e7edb41..a9828b35c3 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -110,7 +110,7 @@ ResultTensor outer_product(const LeftVector & left, const RightVector & right) tensor_set_component(out, row, col, - vector_get_component(left, row) * libmesh_conj(vector_get_component(right, col))); + left(row) * libmesh_conj(right(col))); return out; } @@ -214,7 +214,7 @@ ResultVector row(const TensorLike & T_in, const unsigned int row_index) out.zero(); for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - vector_set_component(out, col, tensor_get_component(T_in, row_index, col)); + out(col) = tensor_get_component(T_in, row_index, col); return out; } @@ -227,7 +227,7 @@ ResultVector column(const TensorLike & T_in, const unsigned int col_index) out.zero(); for (unsigned int row_index = 0; row_index < LIBMESH_DIM; ++row_index) - vector_set_component(out, row_index, tensor_get_component(T_in, row_index, col_index)); + out(row_index) = tensor_get_component(T_in, row_index, col_index); return out; } @@ -243,10 +243,10 @@ ResultVector multiply_tensor_vector(const TensorLike & T_in, const VectorLike & for (unsigned int row = 0; row < LIBMESH_DIM; ++row) { - auto value = tensor_get_component(T_in, row, 0) * vector_get_component(v, 0); + auto value = tensor_get_component(T_in, row, 0) * v(0); for (unsigned int col = 1; col < LIBMESH_DIM; ++col) - value += tensor_get_component(T_in, row, col) * vector_get_component(v, col); - vector_set_component(out, row, value); + value += tensor_get_component(T_in, row, col) * v(col); + out(row) = value; } return out; @@ -261,10 +261,10 @@ ResultVector multiply_vector_tensor(const VectorLike & v, const TensorLike & T_i for (unsigned int col = 0; col < LIBMESH_DIM; ++col) { - auto value = vector_get_component(v, 0) * tensor_get_component(T_in, 0, col); + auto value = v(0) * tensor_get_component(T_in, 0, col); for (unsigned int row = 1; row < LIBMESH_DIM; ++row) - value += vector_get_component(v, row) * tensor_get_component(T_in, row, col); - vector_set_component(out, col, value); + value += v(row) * tensor_get_component(T_in, row, col); + out(col) = value; } return out; @@ -646,7 +646,7 @@ void tensor_ref::solve(const VectorLike & b, ResultVector & x) const const auto solution = detail::multiply_tensor_vector>(this->inverse(), b); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(x, component, vector_get_component(solution, component)); + x(component) = solution(component); } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 96b1e923e2..814144d60f 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -55,11 +55,11 @@ auto vector_dot_impl(const LeftVector & left, const RightVector & right) static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); using sum_type = - detail::remove_cvref_t; + detail::remove_cvref_t; sum_type sum = sum_type(0); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += vector_get_component(left, component) * vector_get_component(right, component); + sum += left(component) * right(component); return sum; } @@ -69,7 +69,7 @@ LIBMESH_DEVICE_INLINE void assign_vector_components(LeftVector & left, const RightVector & right) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, component, vector_get_component(right, component)); + left(component) = right(component); } template @@ -77,7 +77,7 @@ LIBMESH_DEVICE_INLINE void fill_vector_components(VectorLike & v, const Scalar & value) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(v, component, value); + v(component) = value; } template @@ -85,10 +85,7 @@ LIBMESH_DEVICE_INLINE void update_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, - component, - vector_get_component(left, component) + - factor * vector_get_component(right, component)); + left(component) = left(component) + factor * right(component); } template @@ -96,7 +93,7 @@ LIBMESH_DEVICE_INLINE void transform_vector_components(OutputVector & out, const InputVector & in, const TransformOp & op) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, op(vector_get_component(in, component))); + out(component) = op(in(component)); } template @@ -114,7 +111,7 @@ LIBMESH_DEVICE_INLINE bool vector_equal_impl(const LeftVector & left, const RightVector & right) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (vector_get_component(left, component) != vector_get_component(right, component)) + if (left(component) != right(component)) return false; return true; @@ -185,11 +182,11 @@ auto vector_norm_sq(const VectorLike & v) { static_assert(is_vector_like_v, "vector_norm_sq() requires a vector-like input"); - using norm_type = detail::remove_cvref_t; + using norm_type = detail::remove_cvref_t; norm_type sum = norm_type(0); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += libMesh::TensorTools::norm_sq(vector_get_component(v, component)); + sum += libMesh::TensorTools::norm_sq(v(component)); return sum; } @@ -209,11 +206,11 @@ auto vector_l1_norm(const VectorLike & v) static_assert(is_vector_like_v, "vector_l1_norm() requires a vector-like input"); using std::abs; - using norm_type = detail::remove_cvref_t; + using norm_type = detail::remove_cvref_t; norm_type sum = norm_type(0); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += abs(vector_get_component(v, component)); + sum += abs(v(component)); return sum; } @@ -225,7 +222,7 @@ bool vector_is_zero(const VectorLike & v) static_assert(is_vector_like_v, "vector_is_zero() requires a vector-like input"); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (vector_get_component(v, component) != vector_value_type_t(0)) + if (v(component) != vector_value_type_t(0)) return false; return true; @@ -262,18 +259,9 @@ auto vector_cross(const LeftVector & left, const RightVector & right) out.zero(); #if LIBMESH_DIM == 3 - vector_set_component(out, - 0, - vector_get_component(left, 1) * vector_get_component(right, 2) - - vector_get_component(left, 2) * vector_get_component(right, 1)); - vector_set_component(out, - 1, - -vector_get_component(left, 0) * vector_get_component(right, 2) + - vector_get_component(left, 2) * vector_get_component(right, 0)); - vector_set_component(out, - 2, - vector_get_component(left, 0) * vector_get_component(right, 1) - - vector_get_component(left, 1) * vector_get_component(right, 0)); + out(0) = left(1) * right(2) - left(2) * right(1); + out(1) = -left(0) * right(2) + left(2) * right(0); + out(2) = left(0) * right(1) - left(1) * right(0); #else libmesh_ignore(left); libmesh_ignore(right); @@ -289,19 +277,13 @@ auto vector_triple_product(const LeftVector & left, const RightVector & right) { #if LIBMESH_DIM == 3 - return vector_get_component(left, 0) * - (vector_get_component(middle, 1) * vector_get_component(right, 2) - - vector_get_component(middle, 2) * vector_get_component(right, 1)) - - vector_get_component(left, 1) * - (vector_get_component(middle, 0) * vector_get_component(right, 2) - - vector_get_component(middle, 2) * vector_get_component(right, 0)) + - vector_get_component(left, 2) * - (vector_get_component(middle, 0) * vector_get_component(right, 1) - - vector_get_component(middle, 1) * vector_get_component(right, 0)); + return left(0) * (middle(1) * right(2) - middle(2) * right(1)) - + left(1) * (middle(0) * right(2) - middle(2) * right(0)) + + left(2) * (middle(0) * right(1) - middle(1) * right(0)); #else libmesh_ignore(left, middle, right); using value_type = - detail::remove_cvref_t; + detail::remove_cvref_t; return value_type(0); #endif } @@ -310,14 +292,11 @@ template LIBMESH_DEVICE_INLINE auto vector_cross_norm_sq(const LeftVector & left, const RightVector & right) { - const auto z = vector_get_component(left, 0) * vector_get_component(right, 1) - - vector_get_component(left, 1) * vector_get_component(right, 0); + const auto z = left(0) * right(1) - left(1) * right(0); #if LIBMESH_DIM == 3 - const auto x = vector_get_component(left, 1) * vector_get_component(right, 2) - - vector_get_component(left, 2) * vector_get_component(right, 1); - const auto y = vector_get_component(left, 0) * vector_get_component(right, 2) - - vector_get_component(left, 2) * vector_get_component(right, 0); + const auto x = left(1) * right(2) - left(2) * right(1); + const auto y = left(0) * right(2) - left(2) * right(0); return x * x + y * y + z * z; #else return z * z; From 316e26fc947b30c687907f0718bb43e7eb62311c Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 16:07:46 -0500 Subject: [PATCH 30/45] Remove redundant set() This might become useful again depending on how we change things in the backend, but for now it's redundant with operator(). --- include/gpu/kokkos_linalg_base.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index a8357a59ba..53d4b93ba8 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -102,15 +102,6 @@ class vector_ref return _view(_index, component); } - template - LIBMESH_DEVICE_INLINE - void set(const unsigned int component, const Scalar & value) - { - static_assert(std::is_assignable::value, - "Cannot write through a vector_ref built from a read-only view"); - _view(_index, component) = value; - } - template LIBMESH_DEVICE_INLINE void assign(const RightVector & right); From 3fc522a61fd9df59bcadc81ef5e1bf62b90d6399 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 16:41:23 -0500 Subject: [PATCH 31/45] Remove tensor_get/set_component operator() setters here lets us avoid an indirection layer --- include/gpu/kokkos_linalg_base.h | 37 +-------- include/gpu/kokkos_storage.h | 2 +- include/gpu/kokkos_tensor_ops.h | 127 +++++++++++++++---------------- 3 files changed, 64 insertions(+), 102 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index 53d4b93ba8..504550e517 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -175,13 +175,10 @@ class tensor_ref return _view(_index, row, col); } - template LIBMESH_DEVICE_INLINE - void set(const unsigned int row, const unsigned int col, const Scalar & value) + decltype(auto) operator()(const unsigned int row, const unsigned int col) { - static_assert(std::is_assignable::value, - "Cannot write through a tensor_ref built from a read-only view"); - _view(_index, row, col) = value; + return _view(_index, row, col); } template @@ -363,34 +360,6 @@ using vector_semantic_type_t = typename vector_traits> template using tensor_semantic_type_t = typename tensor_traits>::semantic_type; -template -LIBMESH_DEVICE_INLINE -decltype(auto) -tensor_get_component(const T & T_in, const unsigned int row, const unsigned int col) -{ - return T_in(row, col); -} - -template -LIBMESH_DEVICE_INLINE -void tensor_set_component(T & T_out, - const unsigned int row, - const unsigned int col, - const Scalar & value) -{ - T_out(row, col) = value; -} - -template -LIBMESH_DEVICE_INLINE -void tensor_set_component(tensor_ref T_out, - const unsigned int row, - const unsigned int col, - const Scalar & value) -{ - T_out.set(row, col, value); -} - template LIBMESH_DEVICE_INLINE vector_ref> @@ -435,7 +404,7 @@ OutputTensor materialize_tensor(const TensorLike & T_in) for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, row, col)); + out(row, col) = T_in(row, col); return out; } diff --git a/include/gpu/kokkos_storage.h b/include/gpu/kokkos_storage.h index 95c0661f70..c63baee1f7 100644 --- a/include/gpu/kokkos_storage.h +++ b/include/gpu/kokkos_storage.h @@ -45,7 +45,7 @@ void store_tensor(const ViewType & view, const unsigned int i, const TensorType for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T, row, col)); + out(row, col) = T(row, col); } } // namespace libMesh::Kokkos diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index a9828b35c3..5787e22625 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -37,7 +37,7 @@ ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) out.zero(); for (unsigned int i = 0; i < dim; ++i) - tensor_set_component(out, i, i, tensor_value_type_t(1)); + out(i, i) = tensor_value_type_t(1); return out; } @@ -72,22 +72,22 @@ auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBME return tensor_value_type_t(1); if (dim == 1) - return tensor_get_component(T_in, 0, 0); + return T_in(0, 0); if (dim == 2) - return tensor_get_component(T_in, 0, 0) * tensor_get_component(T_in, 1, 1) - - tensor_get_component(T_in, 0, 1) * tensor_get_component(T_in, 1, 0); + return T_in(0, 0) * T_in(1, 1) - + T_in(0, 1) * T_in(1, 0); #if LIBMESH_DIM > 2 - const auto a00 = tensor_get_component(T_in, 0, 0); - const auto a01 = tensor_get_component(T_in, 0, 1); - const auto a02 = tensor_get_component(T_in, 0, 2); - const auto a10 = tensor_get_component(T_in, 1, 0); - const auto a11 = tensor_get_component(T_in, 1, 1); - const auto a12 = tensor_get_component(T_in, 1, 2); - const auto a20 = tensor_get_component(T_in, 2, 0); - const auto a21 = tensor_get_component(T_in, 2, 1); - const auto a22 = tensor_get_component(T_in, 2, 2); + const auto a00 = T_in(0, 0); + const auto a01 = T_in(0, 1); + const auto a02 = T_in(0, 2); + const auto a10 = T_in(1, 0); + const auto a11 = T_in(1, 1); + const auto a12 = T_in(1, 2); + const auto a20 = T_in(2, 0); + const auto a21 = T_in(2, 1); + const auto a22 = T_in(2, 2); return a00 * (a11 * a22 - a12 * a21) - a01 * (a10 * a22 - a12 * a20) + @@ -107,10 +107,7 @@ ResultTensor outer_product(const LeftVector & left, const RightVector & right) for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - left(row) * libmesh_conj(right(col))); + out(row, col) = left(row) * libmesh_conj(right(col)); return out; } @@ -129,7 +126,7 @@ ResultTensor inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_D if (dim == 1) { - tensor_set_component(out, 0, 0, tensor_value_type_t(1) / tensor_get_component(T_in, 0, 0)); + out(0, 0) = tensor_value_type_t(1) / T_in(0, 0); return out; } @@ -137,33 +134,33 @@ ResultTensor inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_D if (dim == 2) { - tensor_set_component(out, 0, 0, tensor_get_component(T_in, 1, 1) / det); - tensor_set_component(out, 0, 1, -tensor_get_component(T_in, 0, 1) / det); - tensor_set_component(out, 1, 0, -tensor_get_component(T_in, 1, 0) / det); - tensor_set_component(out, 1, 1, tensor_get_component(T_in, 0, 0) / det); + out(0, 0) = T_in(1, 1) / det; + out(0, 1) = -T_in(0, 1) / det; + out(1, 0) = -T_in(1, 0) / det; + out(1, 1) = T_in(0, 0) / det; return out; } #if LIBMESH_DIM > 2 - const auto a00 = tensor_get_component(T_in, 0, 0); - const auto a01 = tensor_get_component(T_in, 0, 1); - const auto a02 = tensor_get_component(T_in, 0, 2); - const auto a10 = tensor_get_component(T_in, 1, 0); - const auto a11 = tensor_get_component(T_in, 1, 1); - const auto a12 = tensor_get_component(T_in, 1, 2); - const auto a20 = tensor_get_component(T_in, 2, 0); - const auto a21 = tensor_get_component(T_in, 2, 1); - const auto a22 = tensor_get_component(T_in, 2, 2); - - tensor_set_component(out, 0, 0, (a11 * a22 - a12 * a21) / det); - tensor_set_component(out, 0, 1, (a02 * a21 - a01 * a22) / det); - tensor_set_component(out, 0, 2, (a01 * a12 - a02 * a11) / det); - tensor_set_component(out, 1, 0, (a12 * a20 - a10 * a22) / det); - tensor_set_component(out, 1, 1, (a00 * a22 - a02 * a20) / det); - tensor_set_component(out, 1, 2, (a02 * a10 - a00 * a12) / det); - tensor_set_component(out, 2, 0, (a10 * a21 - a11 * a20) / det); - tensor_set_component(out, 2, 1, (a01 * a20 - a00 * a21) / det); - tensor_set_component(out, 2, 2, (a00 * a11 - a01 * a10) / det); + const auto a00 = T_in(0, 0); + const auto a01 = T_in(0, 1); + const auto a02 = T_in(0, 2); + const auto a10 = T_in(1, 0); + const auto a11 = T_in(1, 1); + const auto a12 = T_in(1, 2); + const auto a20 = T_in(2, 0); + const auto a21 = T_in(2, 1); + const auto a22 = T_in(2, 2); + + out(0, 0) = (a11 * a22 - a12 * a21) / det; + out(0, 1) = (a02 * a21 - a01 * a22) / det; + out(0, 2) = (a01 * a12 - a02 * a11) / det; + out(1, 0) = (a12 * a20 - a10 * a22) / det; + out(1, 1) = (a00 * a22 - a02 * a20) / det; + out(1, 2) = (a02 * a10 - a00 * a12) / det; + out(2, 0) = (a10 * a21 - a11 * a20) / det; + out(2, 1) = (a01 * a20 - a00 * a21) / det; + out(2, 2) = (a00 * a11 - a01 * a10) / det; #else libmesh_ignore(T_in); #endif @@ -180,7 +177,7 @@ ResultTensor transpose(const TensorLike & T_in) for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, col, row)); + out(row, col) = T_in(col, row); return out; } @@ -197,10 +194,10 @@ ResultTensor multiply_tensors(const LeftTensor & left, const RightTensor & right for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) { - auto value = tensor_get_component(left, row, 0) * tensor_get_component(right, 0, col); + auto value = left(row, 0) * right(0, col); for (unsigned int k = 1; k < LIBMESH_DIM; ++k) - value += tensor_get_component(left, row, k) * tensor_get_component(right, k, col); - tensor_set_component(out, row, col, value); + value += left(row, k) * right(k, col); + out(row, col) = value; } return out; @@ -214,7 +211,7 @@ ResultVector row(const TensorLike & T_in, const unsigned int row_index) out.zero(); for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - out(col) = tensor_get_component(T_in, row_index, col); + out(col) = T_in(row_index, col); return out; } @@ -227,7 +224,7 @@ ResultVector column(const TensorLike & T_in, const unsigned int col_index) out.zero(); for (unsigned int row_index = 0; row_index < LIBMESH_DIM; ++row_index) - out(row_index) = tensor_get_component(T_in, row_index, col_index); + out(row_index) = T_in(row_index, col_index); return out; } @@ -243,9 +240,9 @@ ResultVector multiply_tensor_vector(const TensorLike & T_in, const VectorLike & for (unsigned int row = 0; row < LIBMESH_DIM; ++row) { - auto value = tensor_get_component(T_in, row, 0) * v(0); + auto value = T_in(row, 0) * v(0); for (unsigned int col = 1; col < LIBMESH_DIM; ++col) - value += tensor_get_component(T_in, row, col) * v(col); + value += T_in(row, col) * v(col); out(row) = value; } @@ -261,9 +258,9 @@ ResultVector multiply_vector_tensor(const VectorLike & v, const TensorLike & T_i for (unsigned int col = 0; col < LIBMESH_DIM; ++col) { - auto value = v(0) * tensor_get_component(T_in, 0, col); + auto value = v(0) * T_in(0, col); for (unsigned int row = 1; row < LIBMESH_DIM; ++row) - value += v(row) * tensor_get_component(T_in, row, col); + value += v(row) * T_in(row, col); out(col) = value; } @@ -276,7 +273,7 @@ void assign_tensor_components(LeftTensor & left, const RightTensor & right) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, row, col, tensor_get_component(right, row, col)); + left(row, col) = right(row, col); } template @@ -285,7 +282,7 @@ void fill_tensor_components(TensorLike & T_in, const Scalar & value) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(T_in, row, col, value); + T_in(row, col) = value; } template @@ -294,11 +291,7 @@ void update_tensor_components(LeftTensor & left, const RightTensor & right, cons { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) + - factor * tensor_get_component(right, row, col)); + left(row, col) = left(row, col) + factor * right(row, col); } template @@ -307,7 +300,7 @@ void transform_tensor_components(OutputTensor & out, const InputTensor & in, con { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, op(tensor_get_component(in, row, col))); + out(row, col) = op(in(row, col)); } template @@ -326,7 +319,7 @@ bool tensor_equal_impl(const LeftTensor & left, const RightTensor & right) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) + if (left(row, col) != right(row, col)) return false; return true; @@ -342,12 +335,12 @@ auto tensor_contract(const LeftTensor & left, const RightTensor & right) static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like right input"); using sum_type = - detail::remove_cvref_t; + detail::remove_cvref_t; sum_type sum = sum_type(0); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += tensor_get_component(left, row, col) * tensor_get_component(right, row, col); + sum += left(row, col) * right(row, col); return sum; } @@ -358,12 +351,12 @@ auto tensor_norm_sq(const TensorLike & T_in) { static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); - using norm_type = detail::remove_cvref_t; + using norm_type = detail::remove_cvref_t; norm_type sum = norm_type(0); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += libMesh::TensorTools::norm_sq(tensor_get_component(T_in, row, col)); + sum += libMesh::TensorTools::norm_sq(T_in(row, col)); return sum; } @@ -382,10 +375,10 @@ auto tensor_trace(const TensorLike & T_in) { static_assert(is_tensor_like_v, "tensor_trace() requires a tensor-like input"); - using trace_type = detail::remove_cvref_t; + using trace_type = detail::remove_cvref_t; trace_type sum = trace_type(0); for (unsigned int i = 0; i < LIBMESH_DIM; ++i) - sum += tensor_get_component(T_in, i, i); + sum += T_in(i, i); return sum; } @@ -398,7 +391,7 @@ bool tensor_is_zero(const TensorLike & T_in) for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(T_in, row, col) != tensor_value_type_t(0)) + if (T_in(row, col) != tensor_value_type_t(0)) return false; return true; From d590d79c713370b5035d38ccfd4d04c617d30dbb Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 17:58:05 -0500 Subject: [PATCH 32/45] Remove redundant is_zero()/zero-init code --- include/gpu/kokkos_tensor_ops.h | 38 +++---------------- include/gpu/kokkos_vector_ops.h | 34 +++-------------- .../kokkos_tensor_ops_oracle_runners.h | 5 ++- .../kokkos_vector_ops_oracle_runners.h | 4 +- 4 files changed, 16 insertions(+), 65 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 5787e22625..4134a40f63 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -20,15 +20,6 @@ namespace libMesh::Kokkos // Construction and materialization -template -LIBMESH_DEVICE_INLINE -ResultTensor zero_tensor_value() -{ - ResultTensor out; - out.zero(); - return out; -} - template LIBMESH_DEVICE_INLINE ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) @@ -383,20 +374,6 @@ auto tensor_trace(const TensorLike & T_in) return sum; } -template -LIBMESH_DEVICE_INLINE -bool tensor_is_zero(const TensorLike & T_in) -{ - static_assert(is_tensor_like_v, "tensor_is_zero() requires a tensor-like input"); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (T_in(row, col) != tensor_value_type_t(0)) - return false; - - return true; -} - } // namespace detail // libMesh-like convenience wrappers @@ -427,14 +404,6 @@ auto norm(const TensorLike & T_in) return detail::tensor_norm(T_in); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -bool is_zero(const TensorLike & T_in) -{ - return detail::tensor_is_zero(T_in); -} - template LIBMESH_DEVICE_INLINE auto outer_product(const LeftVector & left, const RightVector & right) @@ -600,7 +569,12 @@ template LIBMESH_DEVICE_INLINE bool tensor_ref::is_zero() const { - return libMesh::Kokkos::is_zero(*this); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if ((*this)(row, col) != value_type(0)) + return false; + + return true; } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 814144d60f..591635f95c 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -19,15 +19,6 @@ namespace libMesh::Kokkos // Construction and materialization -template -LIBMESH_DEVICE_INLINE -ResultVector zero_vector_value() -{ - ResultVector out; - out.zero(); - return out; -} - template LIBMESH_DEVICE_INLINE auto copy_vector(const VectorLike & v) @@ -215,18 +206,6 @@ auto vector_l1_norm(const VectorLike & v) return sum; } -template -LIBMESH_DEVICE_INLINE -bool vector_is_zero(const VectorLike & v) -{ - static_assert(is_vector_like_v, "vector_is_zero() requires a vector-like input"); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (v(component) != vector_value_type_t(0)) - return false; - - return true; -} template LIBMESH_DEVICE_INLINE @@ -350,13 +329,6 @@ auto norm(const VectorLike & v) return vector_norm(v); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -bool is_zero(const VectorLike & v) -{ - return vector_is_zero(v); -} template LIBMESH_DEVICE_INLINE @@ -452,7 +424,11 @@ template LIBMESH_DEVICE_INLINE bool vector_ref::is_zero() const { - return libMesh::Kokkos::is_zero(*this); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if ((*this)(component) != value_type(0)) + return false; + + return true; } template diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index de867d59f6..f607978849 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -90,7 +90,7 @@ test_tensor_ops() const auto left = c * A; const Real contract = A.contract(outer); const Real norm = A.norm(); - const auto zero = libMesh::Kokkos::zero_tensor_value(); + const oracle_tensor zero; // Via default initialization std::vector ref_outer(1, outer); std::vector ref_transpose(1, transpose); @@ -133,7 +133,8 @@ test_tensor_ops() const auto left_d = c_ref * A_ref; const Real contract_d = A_ref.contract(outer_d); const Real norm_d = A_ref.norm(); - const bool zero_is_zero_d = libMesh::Kokkos::zero_tensor_value().is_zero(); + oracle_tensor default_tensor; // We don't default to uninitialized! + const bool zero_is_zero_d = default_tensor.is_zero(); const bool A_is_zero_d = A_ref.is_zero(); for (unsigned int i = 0; i < LIBMESH_DIM; ++i) diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h index 233cbfed4a..844b34e375 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_runners.h +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -44,13 +44,13 @@ test_vector_ops_case(const vector_case & info) const Vec outer_left = a_ref * Real(5.0); const Vec mult_assign = a_ref * Real(5.0); const Vec div_assign = a_ref / Real(5.0); - const Vec assign_zero = libMesh::Kokkos::zero_vector_value(); const Real dot = libMesh::Kokkos::vector_dot(a_ref, b_ref); const Real contract = a_ref.contract(b_ref); const Real norm = mix.norm(); const Real norm_sq = mix.norm_sq(); - const Vec zero = libMesh::Kokkos::zero_vector_value(); + const Vec zero; // By default initialization + const Vec assign_zero = zero; unsigned int vector_offset = 0; libMesh::Kokkos::store_vector(d_vectors, vector_offset++, copied); From 27e5a33328d57f9564fac910ef21c0b52ebd1042 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 18:13:13 -0500 Subject: [PATCH 33/45] Eliminate vector_value_type_t If we had to support arbitrary third-party classes directly this would have been helpful, but we're writing our own shims here. --- include/gpu/kokkos_linalg_base.h | 11 ----------- include/gpu/kokkos_tensor_ops.h | 30 ++++++++++++++++-------------- include/gpu/kokkos_vector_ops.h | 6 +++--- 3 files changed, 19 insertions(+), 28 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index 504550e517..f37e9d70eb 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -257,21 +257,18 @@ class tensor_ref template struct vector_traits> { - using value_type = T; using semantic_type = libMesh::TypeVector; }; template struct vector_traits> { - using value_type = T; using semantic_type = libMesh::VectorValue; }; template <> struct vector_traits { - using value_type = libMesh::Real; using semantic_type = libMesh::Point; }; @@ -310,14 +307,12 @@ struct is_vector_ref> : std::true_type template struct tensor_traits> { - using value_type = T; using semantic_type = libMesh::TypeTensor; }; template struct tensor_traits> { - using value_type = T; using semantic_type = libMesh::TensorValue; }; @@ -348,12 +343,6 @@ struct is_tensor_ref> : std::true_type { }; -template -using vector_value_type_t = typename vector_traits>::value_type; - -template -using tensor_value_type_t = typename tensor_traits>::value_type; - template using vector_semantic_type_t = typename vector_traits>::semantic_type; diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 4134a40f63..df1bdc2ac4 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -28,7 +28,7 @@ ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) out.zero(); for (unsigned int i = 0; i < dim; ++i) - out(i, i) = tensor_value_type_t(1); + out(i, i) = 1; return out; } @@ -54,13 +54,14 @@ namespace detail template LIBMESH_DEVICE_INLINE -auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +typename TensorLike::value_type +leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) { static_assert(is_tensor_like_v, "detail::leading_determinant() requires a tensor-like input"); if (dim == 0) - return tensor_value_type_t(1); + return 1; if (dim == 1) return T_in(0, 0); @@ -85,7 +86,7 @@ auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBME a02 * (a10 * a21 - a11 * a20); #else libmesh_ignore(T_in); - return tensor_value_type_t(0); + return 0; #endif } @@ -117,7 +118,8 @@ ResultTensor inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_D if (dim == 1) { - out(0, 0) = tensor_value_type_t(1) / T_in(0, 0); + using value_type = typename ResultTensor::value_type; + out(0, 0) = value_type(1) / T_in(0, 0); return out; } @@ -409,11 +411,11 @@ LIBMESH_DEVICE_INLINE auto outer_product(const LeftVector & left, const RightVector & right) -> std::enable_if_t && is_vector_like_v, std::conditional_t::value, - libMesh::TypeTensor>, + libMesh::TypeTensor, ResultTensor>> { using output_type = std::conditional_t::value, - libMesh::TypeTensor>, + libMesh::TypeTensor, ResultTensor>; return detail::outer_product(left, right); } @@ -459,11 +461,11 @@ LIBMESH_DEVICE_INLINE auto row(const TensorLike & T_in, const unsigned int i) -> std::enable_if_t, std::conditional_t::value, - libMesh::TypeVector>, + libMesh::TypeVector, ResultVector>> { using output_type = std::conditional_t::value, - libMesh::TypeVector>, + libMesh::TypeVector, ResultVector>; return detail::row(T_in, i); } @@ -473,11 +475,11 @@ LIBMESH_DEVICE_INLINE auto column(const TensorLike & T_in, const unsigned int i) -> std::enable_if_t, std::conditional_t::value, - libMesh::TypeVector>, + libMesh::TypeVector, ResultVector>> { using output_type = std::conditional_t::value, - libMesh::TypeVector>, + libMesh::TypeVector, ResultVector>; return detail::column(T_in, i); } @@ -648,7 +650,7 @@ auto operator-(const TensorLike & T_in) { return detail::transformed_tensor>( T_in, - detail::negate_value>{}); + detail::negate_value{}); } template @@ -771,7 +773,7 @@ auto operator+=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - detail::update_tensor_components(left, right, tensor_value_type_t(1)); + detail::update_tensor_components(left, right, 1); return left; } @@ -782,7 +784,7 @@ auto operator-=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - detail::update_tensor_components(left, right, tensor_value_type_t(-1)); + detail::update_tensor_components(left, right, -1); return left; } diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 591635f95c..1ba61ce6b4 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -456,7 +456,7 @@ auto operator-(const VectorLike & v) { return detail::transformed_vector>( v, - detail::negate_value>{}); + detail::negate_value{}); } template @@ -558,7 +558,7 @@ auto operator+=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - detail::update_vector_components(left, right, vector_value_type_t(1)); + detail::update_vector_components(left, right, 1); return left; } @@ -569,7 +569,7 @@ auto operator-=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - detail::update_vector_components(left, right, vector_value_type_t(-1)); + detail::update_vector_components(left, right, -1); return left; } From ff7574e7f0eefe952624e9ce21a41461050bf4e2 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 18:23:23 -0500 Subject: [PATCH 34/45] Clean up Kokkos norm_sq() --- include/gpu/kokkos_tensor_ops.h | 35 +++++++++------------------------ include/gpu/kokkos_vector_ops.h | 31 ++++++++--------------------- 2 files changed, 17 insertions(+), 49 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index df1bdc2ac4..827317cbcd 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -338,28 +338,12 @@ auto tensor_contract(const LeftTensor & left, const RightTensor & right) return sum; } -template -LIBMESH_DEVICE_INLINE -auto tensor_norm_sq(const TensorLike & T_in) -{ - static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); - - using norm_type = detail::remove_cvref_t; - - norm_type sum = norm_type(0); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += libMesh::TensorTools::norm_sq(T_in(row, col)); - - return sum; -} - template LIBMESH_DEVICE_INLINE auto tensor_norm(const TensorLike & T_in) { using std::sqrt; - return sqrt(tensor_norm_sq(T_in)); + return sqrt(T_in.norm_sq()); } template @@ -390,14 +374,6 @@ auto contract(const LeftTensor & left, const RightTensor & right) return detail::tensor_contract(left, right); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -auto norm_sq(const TensorLike & T_in) -{ - return detail::tensor_norm_sq(T_in); -} - template , int>::type = 0> LIBMESH_DEVICE_INLINE @@ -564,7 +540,14 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::norm_sq() const { - return libMesh::Kokkos::norm_sq(*this); + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + sum += libMesh::TensorTools::norm_sq((*this)(row, col)); + + return sum; } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 1ba61ce6b4..0457ccec5a 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -167,27 +167,13 @@ auto vector_dot(const LeftVector & left, const RightVector & right) return detail::vector_dot_impl(left, right); } -template -LIBMESH_DEVICE_INLINE -auto vector_norm_sq(const VectorLike & v) -{ - static_assert(is_vector_like_v, "vector_norm_sq() requires a vector-like input"); - - using norm_type = detail::remove_cvref_t; - - norm_type sum = norm_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += libMesh::TensorTools::norm_sq(v(component)); - - return sum; -} template LIBMESH_DEVICE_INLINE auto vector_norm(const VectorLike & v) { using std::sqrt; - return sqrt(vector_norm_sq(v)); + return sqrt(v.norm_sq()); } template @@ -313,13 +299,6 @@ auto contract(const LeftVector & left, const RightVector & right) return vector_dot(left, right); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -auto norm_sq(const VectorLike & v) -{ - return vector_norm_sq(v); -} template , int>::type = 0> @@ -410,7 +389,13 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::norm_sq() const { - return libMesh::Kokkos::norm_sq(*this); + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += libMesh::TensorTools::norm_sq((*this)(component)); + + return sum; } template From c51e4688c26b8cd1f00993a23c7136148831abc7 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 18:29:12 -0500 Subject: [PATCH 35/45] Clean up Kokkos norm(), l1_norm() --- include/gpu/kokkos_tensor_ops.h | 17 +----- include/gpu/kokkos_vector_ops.h | 54 +++++-------------- .../kokkos_vector_ops_oracle_runners.h | 4 +- 3 files changed, 18 insertions(+), 57 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 827317cbcd..5b7a2388de 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -338,13 +338,6 @@ auto tensor_contract(const LeftTensor & left, const RightTensor & right) return sum; } -template -LIBMESH_DEVICE_INLINE -auto tensor_norm(const TensorLike & T_in) -{ - using std::sqrt; - return sqrt(T_in.norm_sq()); -} template LIBMESH_DEVICE_INLINE @@ -374,13 +367,6 @@ auto contract(const LeftTensor & left, const RightTensor & right) return detail::tensor_contract(left, right); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -auto norm(const TensorLike & T_in) -{ - return detail::tensor_norm(T_in); -} template LIBMESH_DEVICE_INLINE @@ -533,7 +519,8 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::norm() const { - return libMesh::Kokkos::norm(*this); + using std::sqrt; + return sqrt(this->norm_sq()); } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 0457ccec5a..db2c7967d6 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -168,31 +168,6 @@ auto vector_dot(const LeftVector & left, const RightVector & right) } -template -LIBMESH_DEVICE_INLINE -auto vector_norm(const VectorLike & v) -{ - using std::sqrt; - return sqrt(v.norm_sq()); -} - -template -LIBMESH_DEVICE_INLINE -auto vector_l1_norm(const VectorLike & v) -{ - static_assert(is_vector_like_v, "vector_l1_norm() requires a vector-like input"); - - using std::abs; - using norm_type = detail::remove_cvref_t; - - norm_type sum = norm_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += abs(v(component)); - - return sum; -} - - template LIBMESH_DEVICE_INLINE auto vector_unit(const VectorLike & v) @@ -200,7 +175,7 @@ auto vector_unit(const VectorLike & v) vector_semantic_type_t, ResultVector> { - const auto length = vector_norm(v); + const auto length = v.norm(); libmesh_assert_not_equal_to(length, static_cast(0.)); using output_type = std::conditional_t::value, vector_semantic_type_t, @@ -274,9 +249,9 @@ auto vector_solid_angle(const VectorA & v01, const VectorB & v02, const VectorC { using std::atan; - const auto norm01 = vector_norm(v01); - const auto norm02 = vector_norm(v02); - const auto norm03 = vector_norm(v03); + const auto norm01 = v01.norm(); + const auto norm02 = v02.norm(); + const auto norm03 = v03.norm(); const auto tan_half_angle = vector_triple_product(v01, v02, v03) / (vector_dot(v01, v02) * norm03 + @@ -300,15 +275,6 @@ auto contract(const LeftVector & left, const RightVector & right) } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -auto norm(const VectorLike & v) -{ - return vector_norm(v); -} - - template LIBMESH_DEVICE_INLINE auto operator+=(LeftVector & left, const RightVector & right) @@ -382,7 +348,8 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::norm() const { - return libMesh::Kokkos::norm(*this); + using std::sqrt; + return sqrt(this->norm_sq()); } template @@ -402,7 +369,14 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::l1_norm() const { - return vector_l1_norm(*this); + using std::abs; + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += abs((*this)(component)); + + return sum; } template diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h index 844b34e375..48f49a9e40 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_runners.h +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -105,7 +105,7 @@ test_vector_ops_case(const vector_case & info) #if LIBMESH_DIM > 2 const Vec cross = a_ref.cross(b_ref); Vec unit_cross = cross; - if (libMesh::Kokkos::vector_norm(cross) > unit_tol) + if (cross.norm() > unit_tol) unit_cross = libMesh::Kokkos::vector_unit(cross); libMesh::Kokkos::store_vector(d_vectors, vector_offset++, cross); @@ -226,7 +226,7 @@ test_mixed_representation_ops() #if LIBMESH_DIM > 2 const auto cross = a_ref.cross(b); Vec unit_cross = cross; - if (libMesh::Kokkos::vector_norm(cross) > unit_tol) + if (cross.norm() > unit_tol) unit_cross = libMesh::Kokkos::vector_unit(cross); libMesh::Kokkos::store_vector(d_vectors, 3, cross); From 08a43c06d8a6d6cb0239b7cfe32ce4de48eec16a Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Mon, 15 Jun 2026 15:12:09 -0500 Subject: [PATCH 36/45] Remove vector_dot_impl --- include/gpu/kokkos_vector_ops.h | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index db2c7967d6..48cc01f92e 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -38,23 +38,6 @@ namespace detail // These helpers are shared by the public functions and ref operators so // Kokkos-backed refs use direct component access without extra materialization. -template -LIBMESH_DEVICE_INLINE -auto vector_dot_impl(const LeftVector & left, const RightVector & right) -{ - static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); - static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); - - using sum_type = - detail::remove_cvref_t; - - sum_type sum = sum_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += left(component) * right(component); - - return sum; -} - template LIBMESH_DEVICE_INLINE void assign_vector_components(LeftVector & left, const RightVector & right) @@ -164,7 +147,17 @@ template LIBMESH_DEVICE_INLINE auto vector_dot(const LeftVector & left, const RightVector & right) { - return detail::vector_dot_impl(left, right); + static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); + static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); + + using sum_type = + detail::remove_cvref_t; + + sum_type sum = sum_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += left(component) * right(component); + + return sum; } From caf44645e99cc3856449d3fe4d1b89e04199cc62 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Fri, 17 Jul 2026 14:41:23 -0500 Subject: [PATCH 37/45] Debugging info in test_installed_headers output --- contrib/bin/test_installed_headers.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/bin/test_installed_headers.sh b/contrib/bin/test_installed_headers.sh index 2154bc19c2..53538d03ed 100755 --- a/contrib/bin/test_installed_headers.sh +++ b/contrib/bin/test_installed_headers.sh @@ -55,9 +55,11 @@ if test "$test_CXXFLAGS" = ""; then if test "$PKG_CONFIG" != "no"; then test_CXXFLAGS=$(pkg-config libmesh --cflags) + echo "Using pkg-config CXXFLAGS $test_CXXFLAGS" elif test -x $LIBMESH_CONFIG_PATH/libmesh-config; then test_CXXFLAGS=$($LIBMESH_CONFIG_PATH/libmesh-config --cppflags --cxxflags --include) + echo "Using libmesh-config CXXFLAGS $test_CXXFLAGS" else echo "Cannot query package installation!!" From 6b63a1254392bae871dc3191e3d026eafa07c542 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Fri, 17 Jul 2026 14:47:57 -0500 Subject: [PATCH 38/45] Check for threads before AC_SUBST of *FLAGS Hopefully this fixes the problem when Kokkos yells at us when we configure with OpenMP but then test its header (which we were doing without -fopenmp), as well as any problems downstream from people missing -fopenmp in pkgconfig. --- m4/libmesh_method.m4 | 14 ++++++++++++++ m4/libmesh_optional_packages.m4 | 13 ------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/m4/libmesh_method.m4 b/m4/libmesh_method.m4 index d74471c84a..8f4f7d9ddb 100644 --- a/m4/libmesh_method.m4 +++ b/m4/libmesh_method.m4 @@ -80,6 +80,20 @@ AC_DEFUN([LIBMESH_SET_METHODS], CXXFLAGS_OPROF="$CXXFLAGS_OPROF $SANITIZE_OPROF_FLAGS" CFLAGS_OPROF="$CFLAGS_OPROF $SANITIZE_OPROF_FLAGS" + # ------------------------------------------------------------- + # Choose between TBB, OpenMP, and pthreads thread models. + # The user can control this by configuring with + # + # --with-thread-model={tbb,pthread,auto,none} + # + # where "auto" will try to automatically detect the best possible + # version (see threads.m4). + # + # We do this here so that any openmp flags will get added to CFLAGS + # and CXXFLAGS before we AC_SUBST them. + # ------------------------------------------------------------- + ACX_BEST_THREAD + dnl conditionally compile selected methods for method in ${METHODS}; do AS_CASE("${method}", diff --git a/m4/libmesh_optional_packages.m4 b/m4/libmesh_optional_packages.m4 index abf765e7ce..df1decdfbc 100644 --- a/m4/libmesh_optional_packages.m4 +++ b/m4/libmesh_optional_packages.m4 @@ -314,19 +314,6 @@ AS_IF([test "$enablenvtx" = yes], # -------------------------------------------------------------- -# ------------------------------------------------------------- -# Choose between TBB, OpenMP, and pthreads thread models. -# The user can control this by configuring with -# -# --with-thread-model={tbb,pthread,auto,none} -# -# where "auto" will try to automatically detect the best possible -# version (see threads.m4). -# ------------------------------------------------------------- -ACX_BEST_THREAD - - - # ------------------------------------------------------------- # LASPACK iterative solvers -- enabled unless # --enable-strict-lgpl is specified From 176bef72109de9aade783d47a3d842b006053a8c Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Fri, 17 Jul 2026 15:01:09 -0500 Subject: [PATCH 39/45] Use cxxflags_extra in test_installed_headers --- contrib/bin/test_installed_headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/bin/test_installed_headers.sh b/contrib/bin/test_installed_headers.sh index 53538d03ed..8a475a49af 100755 --- a/contrib/bin/test_installed_headers.sh +++ b/contrib/bin/test_installed_headers.sh @@ -54,7 +54,7 @@ if test "$test_CXXFLAGS" = ""; then # testing_installed_tree="yes" if test "$PKG_CONFIG" != "no"; then - test_CXXFLAGS=$(pkg-config libmesh --cflags) + test_CXXFLAGS="$(pkg-config libmesh --cflags) $(pkg-config libmesh --variable=cxxflags_extra)" echo "Using pkg-config CXXFLAGS $test_CXXFLAGS" elif test -x $LIBMESH_CONFIG_PATH/libmesh-config; then From 0f81209d6ac099af30b32a1b102352f91242d0f7 Mon Sep 17 00:00:00 2001 From: Rochishnu Chowdhury Date: Mon, 20 Jul 2026 11:12:29 -0600 Subject: [PATCH 40/45] Remove Kokkos vector ref member helpers --- include/gpu/kokkos_linalg_base.h | 46 ----- include/gpu/kokkos_vector_ops.h | 290 ++++++++----------------------- 2 files changed, 68 insertions(+), 268 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index f37e9d70eb..54780f7713 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -102,52 +102,6 @@ class vector_ref return _view(_index, component); } - template - LIBMESH_DEVICE_INLINE - void assign(const RightVector & right); - - template - LIBMESH_DEVICE_INLINE - void add(const RightVector & right); - - template - LIBMESH_DEVICE_INLINE - void add_scaled(const RightVector & right, const value_type & factor); - - template - LIBMESH_DEVICE_INLINE - void subtract(const RightVector & right); - - template - LIBMESH_DEVICE_INLINE - void subtract_scaled(const RightVector & right, const value_type & factor); - - LIBMESH_DEVICE_INLINE - void zero(); - - template - LIBMESH_DEVICE_INLINE - auto contract(const RightVector & right) const; - - LIBMESH_DEVICE_INLINE - auto norm() const; - - LIBMESH_DEVICE_INLINE - auto norm_sq() const; - - LIBMESH_DEVICE_INLINE - auto l1_norm() const; - - LIBMESH_DEVICE_INLINE - bool is_zero() const; - - LIBMESH_DEVICE_INLINE - auto unit() const; - - template - LIBMESH_DEVICE_INLINE - auto cross(const RightVector & right) const; - LIBMESH_DEVICE_INLINE unsigned int index() const { diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 48cc01f92e..559b574eec 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -17,50 +17,30 @@ namespace libMesh::Kokkos { -// Construction and materialization - -template -LIBMESH_DEVICE_INLINE -auto copy_vector(const VectorLike & v) - -> std::conditional_t::value, - vector_semantic_type_t, - ResultVector> -{ - using output_type = std::conditional_t::value, - vector_semantic_type_t, - ResultVector>; - return materialize_vector(v); -} - namespace detail { // These helpers are shared by the public functions and ref operators so // Kokkos-backed refs use direct component access without extra materialization. +template +constexpr bool is_vector_ref_unary_v = + is_vector_like_v && is_vector_ref_v; + template -LIBMESH_DEVICE_INLINE -void assign_vector_components(LeftVector & left, const RightVector & right) -{ - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - left(component) = right(component); -} +constexpr bool is_vector_ref_binary_v = + is_vector_like_v && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v); -template -LIBMESH_DEVICE_INLINE -void fill_vector_components(VectorLike & v, const Scalar & value) -{ - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - v(component) = value; -} +template +constexpr bool is_scalar_vector_ref_product_v = + !is_vector_like_v && !is_tensor_like_v && + is_vector_like_v && is_vector_ref_v; -template -LIBMESH_DEVICE_INLINE -void update_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) -{ - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - left(component) = left(component) + factor * right(component); -} +template +constexpr bool is_vector_ref_scalar_product_v = + is_vector_like_v && is_vector_ref_v && + !is_vector_like_v && !is_tensor_like_v; template LIBMESH_DEVICE_INLINE @@ -80,17 +60,6 @@ ResultVector transformed_vector(const VectorLike & v, const TransformOp & op) return out; } -template -LIBMESH_DEVICE_INLINE -bool vector_equal_impl(const LeftVector & left, const RightVector & right) -{ - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (left(component) != right(component)) - return false; - - return true; -} - template struct negate_value { @@ -106,12 +75,6 @@ struct scale_value { const Scalar & alpha; - LIBMESH_DEVICE_INLINE - auto operator()(const Scalar & value) const -> decltype(value * alpha) - { - return value * alpha; - } - template LIBMESH_DEVICE_INLINE auto operator()(const ValueType & value) const -> decltype(value * alpha) @@ -125,12 +88,6 @@ struct divide_value { const Scalar & alpha; - LIBMESH_DEVICE_INLINE - auto operator()(const Scalar & value) const -> decltype(value / alpha) - { - return value / alpha; - } - template LIBMESH_DEVICE_INLINE auto operator()(const ValueType & value) const -> decltype(value / alpha) @@ -160,6 +117,29 @@ auto vector_dot(const LeftVector & left, const RightVector & right) return sum; } +template +LIBMESH_DEVICE_INLINE +auto vector_norm_sq(const VectorLike & v) +{ + static_assert(is_vector_like_v, "vector_norm_sq() requires a vector-like input"); + + using norm_type = + detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += libMesh::TensorTools::norm_sq(v(component)); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto vector_norm(const VectorLike & v) +{ + using std::sqrt; + return sqrt(vector_norm_sq(v)); +} template LIBMESH_DEVICE_INLINE @@ -168,7 +148,7 @@ auto vector_unit(const VectorLike & v) vector_semantic_type_t, ResultVector> { - const auto length = v.norm(); + const auto length = vector_norm(v); libmesh_assert_not_equal_to(length, static_cast(0.)); using output_type = std::conditional_t::value, vector_semantic_type_t, @@ -242,9 +222,9 @@ auto vector_solid_angle(const VectorA & v01, const VectorB & v02, const VectorC { using std::atan; - const auto norm01 = v01.norm(); - const auto norm02 = v02.norm(); - const auto norm03 = v03.norm(); + const auto norm01 = vector_norm(v01); + const auto norm02 = vector_norm(v02); + const auto norm03 = vector_norm(v03); const auto tan_half_angle = vector_triple_product(v01, v02, v03) / (vector_dot(v01, v02) * norm03 + @@ -268,142 +248,12 @@ auto contract(const LeftVector & left, const RightVector & right) } -template -LIBMESH_DEVICE_INLINE -auto operator+=(LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v && - (is_vector_ref_v || is_vector_ref_v), - LeftVector &>; - -template -LIBMESH_DEVICE_INLINE -auto operator-=(LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v && - (is_vector_ref_v || is_vector_ref_v), - LeftVector &>; - -template -template -LIBMESH_DEVICE_INLINE -void vector_ref::assign(const RightVector & right) -{ - detail::assign_vector_components(*this, right); -} - -template -template -LIBMESH_DEVICE_INLINE -void vector_ref::add(const RightVector & right) -{ - libMesh::Kokkos::operator+=(*this, right); -} - -template -template -LIBMESH_DEVICE_INLINE -void vector_ref::add_scaled(const RightVector & right, const value_type & factor) -{ - detail::update_vector_components(*this, right, factor); -} - -template -template -LIBMESH_DEVICE_INLINE -void vector_ref::subtract(const RightVector & right) -{ - libMesh::Kokkos::operator-=(*this, right); -} - -template -template -LIBMESH_DEVICE_INLINE -void vector_ref::subtract_scaled(const RightVector & right, const value_type & factor) -{ - detail::update_vector_components(*this, right, -factor); -} - -template -LIBMESH_DEVICE_INLINE -void vector_ref::zero() -{ - detail::fill_vector_components(*this, value_type(0)); -} - -template -template -LIBMESH_DEVICE_INLINE -auto vector_ref::contract(const RightVector & right) const -{ - return libMesh::Kokkos::contract(*this, right); -} - -template -LIBMESH_DEVICE_INLINE -auto vector_ref::norm() const -{ - using std::sqrt; - return sqrt(this->norm_sq()); -} - -template -LIBMESH_DEVICE_INLINE -auto vector_ref::norm_sq() const -{ - using norm_type = detail::remove_cvref_t; - - norm_type sum = norm_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += libMesh::TensorTools::norm_sq((*this)(component)); - - return sum; -} - -template -LIBMESH_DEVICE_INLINE -auto vector_ref::l1_norm() const -{ - using std::abs; - using norm_type = detail::remove_cvref_t; - - norm_type sum = norm_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += abs((*this)(component)); - - return sum; -} - -template -LIBMESH_DEVICE_INLINE -bool vector_ref::is_zero() const -{ - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if ((*this)(component) != value_type(0)) - return false; - - return true; -} - -template -LIBMESH_DEVICE_INLINE -auto vector_ref::unit() const -{ - return vector_unit(*this); -} - -template -template -LIBMESH_DEVICE_INLINE -auto vector_ref::cross(const RightVector & right) const -{ - return vector_cross(*this, right); -} - // Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. template LIBMESH_DEVICE_INLINE auto operator-(const VectorLike & v) - -> std::enable_if_t && is_vector_ref_v, + -> std::enable_if_t, vector_semantic_type_t> { return detail::transformed_vector>( @@ -414,11 +264,10 @@ auto operator-(const VectorLike & v) template LIBMESH_DEVICE_INLINE auto operator+(const LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v && - (is_vector_ref_v || is_vector_ref_v), + -> std::enable_if_t, vector_semantic_type_t> { - auto out = copy_vector>(left); + auto out = materialize_vector>(left); out += right; return out; } @@ -426,19 +275,17 @@ auto operator+(const LeftVector & left, const RightVector & right) template LIBMESH_DEVICE_INLINE auto operator-(const LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v && - (is_vector_ref_v || is_vector_ref_v), + -> std::enable_if_t, vector_semantic_type_t> { - auto out = copy_vector>(left); + auto out = materialize_vector>(left); out -= right; return out; } template && is_vector_like_v && - (is_vector_ref_v || is_vector_ref_v), + typename std::enable_if, int>::type = 0> LIBMESH_DEVICE_INLINE auto operator*(const LeftVector & left, const RightVector & right) @@ -448,8 +295,7 @@ auto operator*(const LeftVector & left, const RightVector & right) template && !is_tensor_like_v && - is_vector_like_v && is_vector_ref_v, + typename std::enable_if, int>::type = 0> LIBMESH_DEVICE_INLINE auto operator*(const Scalar & alpha, const VectorLike & v) @@ -459,8 +305,7 @@ auto operator*(const Scalar & alpha, const VectorLike & v) template && is_vector_ref_v && - !is_vector_like_v && !is_tensor_like_v, + typename std::enable_if, int>::type = 0> LIBMESH_DEVICE_INLINE auto operator*(const VectorLike & v, const Scalar & alpha) @@ -472,8 +317,7 @@ auto operator*(const VectorLike & v, const Scalar & alpha) template && is_vector_ref_v && - !is_vector_like_v && !is_tensor_like_v, + typename std::enable_if, int>::type = 0> LIBMESH_DEVICE_INLINE auto operator/(const VectorLike & v, const Scalar & alpha) @@ -486,18 +330,20 @@ auto operator/(const VectorLike & v, const Scalar & alpha) template LIBMESH_DEVICE_INLINE auto operator==(const LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v && - (is_vector_ref_v || is_vector_ref_v), + -> std::enable_if_t, bool> { - return detail::vector_equal_impl(left, right); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if (left(component) != right(component)) + return false; + + return true; } template LIBMESH_DEVICE_INLINE auto operator!=(const LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v && - (is_vector_ref_v || is_vector_ref_v), + -> std::enable_if_t, bool> { return !(left == right); @@ -506,30 +352,31 @@ auto operator!=(const LeftVector & left, const RightVector & right) template LIBMESH_DEVICE_INLINE auto operator+=(LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v && - (is_vector_ref_v || is_vector_ref_v), + -> std::enable_if_t, LeftVector &> { - detail::update_vector_components(left, right, 1); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + left(component) = left(component) + right(component); + return left; } template LIBMESH_DEVICE_INLINE auto operator-=(LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v && - (is_vector_ref_v || is_vector_ref_v), + -> std::enable_if_t, LeftVector &> { - detail::update_vector_components(left, right, -1); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + left(component) = left(component) - right(component); + return left; } template LIBMESH_DEVICE_INLINE auto operator*=(LeftVector & left, const Scalar & alpha) - -> std::enable_if_t && is_vector_ref_v && - !is_vector_like_v && !is_tensor_like_v, + -> std::enable_if_t, LeftVector &> { detail::transform_vector_components(left, left, detail::scale_value{alpha}); @@ -539,8 +386,7 @@ auto operator*=(LeftVector & left, const Scalar & alpha) template LIBMESH_DEVICE_INLINE auto operator/=(LeftVector & left, const Scalar & alpha) - -> std::enable_if_t && is_vector_ref_v && - !is_vector_like_v && !is_tensor_like_v, + -> std::enable_if_t, LeftVector &> { detail::transform_vector_components(left, left, detail::divide_value{alpha}); From 80ba68220d2d0efe917a91ff9d7274b409b5357c Mon Sep 17 00:00:00 2001 From: Rochishnu Chowdhury Date: Mon, 20 Jul 2026 11:12:49 -0600 Subject: [PATCH 41/45] Remove Kokkos tensor ref member helpers --- include/gpu/kokkos_linalg_base.h | 62 ------ include/gpu/kokkos_tensor_ops.h | 365 ++++++++++--------------------- 2 files changed, 112 insertions(+), 315 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index 54780f7713..17607f6a45 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -135,68 +135,6 @@ class tensor_ref return _view(_index, row, col); } - template - LIBMESH_DEVICE_INLINE - void assign(const RightTensor & right); - - template - LIBMESH_DEVICE_INLINE - void add(const RightTensor & right); - - template - LIBMESH_DEVICE_INLINE - void add_scaled(const RightTensor & right, const value_type & factor); - - template - LIBMESH_DEVICE_INLINE - void subtract(const RightTensor & right); - - template - LIBMESH_DEVICE_INLINE - void subtract_scaled(const RightTensor & right, const value_type & factor); - - LIBMESH_DEVICE_INLINE - void zero(); - - template - LIBMESH_DEVICE_INLINE - auto contract(const RightTensor & right) const; - - LIBMESH_DEVICE_INLINE - auto norm() const; - - LIBMESH_DEVICE_INLINE - auto norm_sq() const; - - LIBMESH_DEVICE_INLINE - bool is_zero() const; - - LIBMESH_DEVICE_INLINE - auto transpose() const; - - LIBMESH_DEVICE_INLINE - auto det(const unsigned int dim = LIBMESH_DIM) const; - - LIBMESH_DEVICE_INLINE - auto tr() const; - - LIBMESH_DEVICE_INLINE - auto inverse(const unsigned int dim = LIBMESH_DIM) const; - - template - LIBMESH_DEVICE_INLINE - void solve(const VectorLike & b, ResultVector & x) const; - - LIBMESH_DEVICE_INLINE - auto row(const unsigned int i) const; - - LIBMESH_DEVICE_INLINE - auto column(const unsigned int i) const; - - template - LIBMESH_DEVICE_INLINE - auto left_multiply(const VectorLike & v) const; - LIBMESH_DEVICE_INLINE unsigned int index() const { diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 5b7a2388de..0151bfe2cc 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -33,25 +33,41 @@ ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) return out; } -template -LIBMESH_DEVICE_INLINE -auto copy_tensor(const TensorLike & T_in) - -> std::conditional_t::value, - tensor_semantic_type_t, - ResultTensor> -{ - using output_type = std::conditional_t::value, - tensor_semantic_type_t, - ResultTensor>; - return materialize_tensor(T_in); -} - namespace detail { // These helpers are shared by the public functions and ref operators so // Kokkos-backed refs use direct component access without extra materialization. +template +constexpr bool is_tensor_ref_unary_v = + is_tensor_like_v && is_tensor_ref_v; + +template +constexpr bool is_tensor_ref_binary_v = + is_tensor_like_v && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v); + +template +constexpr bool is_scalar_tensor_ref_product_v = + !is_vector_like_v && !is_tensor_like_v && + is_tensor_like_v && is_tensor_ref_v; + +template +constexpr bool is_tensor_ref_scalar_product_v = + is_tensor_like_v && is_tensor_ref_v && + !is_vector_like_v && !is_tensor_like_v; + +template +constexpr bool is_tensor_vector_ref_product_v = + is_tensor_like_v && is_vector_like_v && + (is_tensor_ref_v || is_vector_ref_v); + +template +constexpr bool is_vector_tensor_ref_product_v = + is_vector_like_v && is_tensor_like_v && + (is_vector_ref_v || is_tensor_ref_v); + template LIBMESH_DEVICE_INLINE typename TensorLike::value_type @@ -260,33 +276,6 @@ ResultVector multiply_vector_tensor(const VectorLike & v, const TensorLike & T_i return out; } -template -LIBMESH_DEVICE_INLINE -void assign_tensor_components(LeftTensor & left, const RightTensor & right) -{ - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - left(row, col) = right(row, col); -} - -template -LIBMESH_DEVICE_INLINE -void fill_tensor_components(TensorLike & T_in, const Scalar & value) -{ - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - T_in(row, col) = value; -} - -template -LIBMESH_DEVICE_INLINE -void update_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) -{ - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - left(row, col) = left(row, col) + factor * right(row, col); -} - template LIBMESH_DEVICE_INLINE void transform_tensor_components(OutputTensor & out, const InputTensor & in, const TransformOp & op) @@ -306,18 +295,6 @@ ResultTensor transformed_tensor(const TensorLike & T_in, const TransformOp & op) return out; } -template -LIBMESH_DEVICE_INLINE -bool tensor_equal_impl(const LeftTensor & left, const RightTensor & right) -{ - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (left(row, col) != right(row, col)) - return false; - - return true; -} - // Tensor reductions and predicates template @@ -367,6 +344,54 @@ auto contract(const LeftTensor & left, const RightTensor & right) return detail::tensor_contract(left, right); } +template +LIBMESH_DEVICE_INLINE +auto tensor_norm_sq(const TensorLike & T_in) +{ + static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); + + using norm_type = + detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int row_index = 0; row_index < LIBMESH_DIM; ++row_index) + for (unsigned int col_index = 0; col_index < LIBMESH_DIM; ++col_index) + sum += libMesh::TensorTools::norm_sq(T_in(row_index, col_index)); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_norm(const TensorLike & T_in) +{ + using std::sqrt; + return sqrt(tensor_norm_sq(T_in)); +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_is_zero(const TensorLike & T_in) +{ + static_assert(is_tensor_like_v, "tensor_is_zero() requires a tensor-like input"); + + using value_type = detail::remove_cvref_t; + for (unsigned int row_index = 0; row_index < LIBMESH_DIM; ++row_index) + for (unsigned int col_index = 0; col_index < LIBMESH_DIM; ++col_index) + if (T_in(row_index, col_index) != value_type(0)) + return false; + + return true; +} + +template +LIBMESH_DEVICE_INLINE +auto tr(const TensorLike & T_in) + -> std::enable_if_t, + decltype(detail::tensor_trace(T_in))> +{ + return detail::tensor_trace(T_in); +} template LIBMESH_DEVICE_INLINE @@ -398,10 +423,11 @@ auto transpose(const TensorLike & T_in) template LIBMESH_DEVICE_INLINE -auto det(const TensorLike & T_in) - -> std::enable_if_t, decltype(T_in.det())> +auto det(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) + -> std::enable_if_t, + decltype(detail::leading_determinant(T_in, LIBMESH_DIM))> { - return T_in.det(); + return detail::leading_determinant(T_in, dim); } template @@ -446,176 +472,12 @@ auto column(const TensorLike & T_in, const unsigned int i) return detail::column(T_in, i); } -template -LIBMESH_DEVICE_INLINE -auto operator+=(LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v && - (is_tensor_ref_v || is_tensor_ref_v), - LeftTensor &>; - -template -LIBMESH_DEVICE_INLINE -auto operator-=(LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v && - (is_tensor_ref_v || is_tensor_ref_v), - LeftTensor &>; - -template -template -LIBMESH_DEVICE_INLINE -void tensor_ref::assign(const RightTensor & right) -{ - detail::assign_tensor_components(*this, right); -} - -template -template -LIBMESH_DEVICE_INLINE -void tensor_ref::add(const RightTensor & right) -{ - libMesh::Kokkos::operator+=(*this, right); -} - -template -template -LIBMESH_DEVICE_INLINE -void tensor_ref::add_scaled(const RightTensor & right, const value_type & factor) -{ - detail::update_tensor_components(*this, right, factor); -} - -template -template -LIBMESH_DEVICE_INLINE -void tensor_ref::subtract(const RightTensor & right) -{ - libMesh::Kokkos::operator-=(*this, right); -} - -template -template -LIBMESH_DEVICE_INLINE -void tensor_ref::subtract_scaled(const RightTensor & right, const value_type & factor) -{ - detail::update_tensor_components(*this, right, -factor); -} - -template -LIBMESH_DEVICE_INLINE -void tensor_ref::zero() -{ - detail::fill_tensor_components(*this, value_type(0)); -} - -template -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::contract(const RightTensor & right) const -{ - return libMesh::Kokkos::contract(*this, right); -} - -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::norm() const -{ - using std::sqrt; - return sqrt(this->norm_sq()); -} - -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::norm_sq() const -{ - using norm_type = detail::remove_cvref_t; - - norm_type sum = norm_type(0); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += libMesh::TensorTools::norm_sq((*this)(row, col)); - - return sum; -} - -template -LIBMESH_DEVICE_INLINE -bool tensor_ref::is_zero() const -{ - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if ((*this)(row, col) != value_type(0)) - return false; - - return true; -} - -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::transpose() const -{ - return libMesh::Kokkos::transpose(*this); -} - -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::det(const unsigned int dim) const -{ - return detail::leading_determinant(*this, dim); -} - -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::tr() const -{ - return detail::tensor_trace(*this); -} - -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::inverse(const unsigned int dim) const -{ - return libMesh::Kokkos::inverse(*this, dim); -} - -template -template -LIBMESH_DEVICE_INLINE -void tensor_ref::solve(const VectorLike & b, ResultVector & x) const -{ - const auto solution = - detail::multiply_tensor_vector>(this->inverse(), b); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - x(component) = solution(component); -} - -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::row(const unsigned int i) const -{ - return libMesh::Kokkos::row(*this, i); -} - -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::column(const unsigned int i) const -{ - return libMesh::Kokkos::column(*this, i); -} - -template -template -LIBMESH_DEVICE_INLINE -auto tensor_ref::left_multiply(const VectorLike & v) const -{ - return v * *this; -} - // Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. template LIBMESH_DEVICE_INLINE auto operator-(const TensorLike & T_in) - -> std::enable_if_t && is_tensor_ref_v, + -> std::enable_if_t, tensor_semantic_type_t> { return detail::transformed_tensor>( @@ -626,11 +488,10 @@ auto operator-(const TensorLike & T_in) template LIBMESH_DEVICE_INLINE auto operator+(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v && - (is_tensor_ref_v || is_tensor_ref_v), + -> std::enable_if_t, tensor_semantic_type_t> { - auto out = copy_tensor>(left); + auto out = materialize_tensor>(left); out += right; return out; } @@ -638,19 +499,17 @@ auto operator+(const LeftTensor & left, const RightTensor & right) template LIBMESH_DEVICE_INLINE auto operator-(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v && - (is_tensor_ref_v || is_tensor_ref_v), + -> std::enable_if_t, tensor_semantic_type_t> { - auto out = copy_tensor>(left); + auto out = materialize_tensor>(left); out -= right; return out; } template && !is_tensor_like_v && - is_tensor_like_v && is_tensor_ref_v, + typename std::enable_if, int>::type = 0> LIBMESH_DEVICE_INLINE auto operator*(const Scalar & alpha, const TensorLike & T_in) @@ -660,8 +519,7 @@ auto operator*(const Scalar & alpha, const TensorLike & T_in) template && is_tensor_ref_v && - !is_vector_like_v && !is_tensor_like_v, + typename std::enable_if, int>::type = 0> LIBMESH_DEVICE_INLINE auto operator*(const TensorLike & T_in, const Scalar & alpha) @@ -674,8 +532,7 @@ auto operator*(const TensorLike & T_in, const Scalar & alpha) template LIBMESH_DEVICE_INLINE auto operator/(const TensorLike & T_in, const Scalar & alpha) - -> std::enable_if_t && is_tensor_ref_v && - !is_vector_like_v && !is_tensor_like_v, + -> std::enable_if_t, tensor_semantic_type_t> { return detail::transformed_tensor>( @@ -685,8 +542,7 @@ auto operator/(const TensorLike & T_in, const Scalar & alpha) template && is_tensor_like_v && - (is_tensor_ref_v || is_tensor_ref_v), + typename std::enable_if, int>::type = 0> LIBMESH_DEVICE_INLINE auto operator*(const LeftTensor & left, const RightTensor & right) @@ -696,8 +552,7 @@ auto operator*(const LeftTensor & left, const RightTensor & right) template && is_vector_like_v && - (is_tensor_ref_v || is_vector_ref_v), + typename std::enable_if, int>::type = 0> LIBMESH_DEVICE_INLINE auto operator*(const TensorLike & T_in, const VectorLike & v) @@ -707,8 +562,7 @@ auto operator*(const TensorLike & T_in, const VectorLike & v) template && is_tensor_like_v && - (is_vector_ref_v || is_tensor_ref_v), + typename std::enable_if, int>::type = 0> LIBMESH_DEVICE_INLINE auto operator*(const VectorLike & v, const TensorLike & T_in) @@ -719,18 +573,21 @@ auto operator*(const VectorLike & v, const TensorLike & T_in) template LIBMESH_DEVICE_INLINE auto operator==(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v && - (is_tensor_ref_v || is_tensor_ref_v), + -> std::enable_if_t, bool> { - return detail::tensor_equal_impl(left, right); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (left(row, col) != right(row, col)) + return false; + + return true; } template LIBMESH_DEVICE_INLINE auto operator!=(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v && - (is_tensor_ref_v || is_tensor_ref_v), + -> std::enable_if_t, bool> { return !(left == right); @@ -739,30 +596,33 @@ auto operator!=(const LeftTensor & left, const RightTensor & right) template LIBMESH_DEVICE_INLINE auto operator+=(LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v && - (is_tensor_ref_v || is_tensor_ref_v), + -> std::enable_if_t, LeftTensor &> { - detail::update_tensor_components(left, right, 1); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + left(row, col) = left(row, col) + right(row, col); + return left; } template LIBMESH_DEVICE_INLINE auto operator-=(LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v && - (is_tensor_ref_v || is_tensor_ref_v), + -> std::enable_if_t, LeftTensor &> { - detail::update_tensor_components(left, right, -1); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + left(row, col) = left(row, col) - right(row, col); + return left; } template LIBMESH_DEVICE_INLINE auto operator*=(LeftTensor & left, const Scalar & alpha) - -> std::enable_if_t && is_tensor_ref_v && - !is_vector_like_v && !is_tensor_like_v, + -> std::enable_if_t, LeftTensor &> { detail::transform_tensor_components(left, left, detail::scale_value{alpha}); @@ -772,8 +632,7 @@ auto operator*=(LeftTensor & left, const Scalar & alpha) template LIBMESH_DEVICE_INLINE auto operator/=(LeftTensor & left, const Scalar & alpha) - -> std::enable_if_t && is_tensor_ref_v && - !is_vector_like_v && !is_tensor_like_v, + -> std::enable_if_t, LeftTensor &> { detail::transform_tensor_components(left, left, detail::divide_value{alpha}); From 65f819298aacf6ceec9e5f463a0b568875fa5235 Mon Sep 17 00:00:00 2001 From: Rochishnu Chowdhury Date: Mon, 20 Jul 2026 11:13:03 -0600 Subject: [PATCH 42/45] Simplify Kokkos ref factories --- include/gpu/kokkos_linalg_base.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index 17607f6a45..3ffd888b72 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -29,9 +29,6 @@ template using remove_cvref_t = typename std::remove_cv::type>::type; -template -using remove_ref_t = typename std::remove_reference::type; - template using vector_view_value_t = remove_cvref_t()(0, 0))>; @@ -243,25 +240,29 @@ using tensor_semantic_type_t = typename tensor_traits> template LIBMESH_DEVICE_INLINE -vector_ref> +vector_ref::type> make_vector_ref(ViewType && view, const unsigned int index) { - return vector_ref>(std::forward(view), index); + return vector_ref::type>(std::forward(view), + index); } template LIBMESH_DEVICE_INLINE -tensor_ref> +tensor_ref::type> make_tensor_ref(ViewType && view, const unsigned int index) { - return tensor_ref>(std::forward(view), index); + return tensor_ref::type>(std::forward(view), + index); } template LIBMESH_DEVICE_INLINE OutputVector materialize_vector(const VectorLike & v) { - static_assert(is_vector_like>::value, + static_assert(is_vector_like_v, + "materialize_vector() requires a vector-like output type"); + static_assert(is_vector_like_v, "materialize_vector() requires a vector-like input type"); OutputVector out; @@ -277,7 +278,9 @@ template LIBMESH_DEVICE_INLINE OutputTensor materialize_tensor(const TensorLike & T_in) { - static_assert(is_tensor_like>::value, + static_assert(is_tensor_like_v, + "materialize_tensor() requires a tensor-like output type"); + static_assert(is_tensor_like_v, "materialize_tensor() requires a tensor-like input type"); OutputTensor out; From 94a44ef096f3fee180996c3733e15a37c5b37c33 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Tue, 21 Jul 2026 13:40:05 -0500 Subject: [PATCH 43/45] Save Kokkos compiler flags for our custom .K rules --- m4/libmesh_optional_packages.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/m4/libmesh_optional_packages.m4 b/m4/libmesh_optional_packages.m4 index df1decdfbc..8c3b6896a7 100644 --- a/m4/libmesh_optional_packages.m4 +++ b/m4/libmesh_optional_packages.m4 @@ -852,12 +852,14 @@ AM_CONDITIONAL(LIBMESH_ENABLE_METAPHYSICL, test x$enablemetaphysicl = xyes) # ------------------------------------------------------------- # Kokkos -- enables the native Kokkos FE math path +# +# We *don't* add KOKKOS_CPPFLAGS or KOKKOS_CXXFLAGS here; those +# are just for compilation of .K files, not .C # ------------------------------------------------------------- ACSM_CONFIGURE_KOKKOS AS_IF([test "x$enablekokkos" != "xno"], [ - libmesh_optional_INCLUDES="$KOKKOS_CPPFLAGS $libmesh_optional_INCLUDES" libmesh_optional_LIBS="$KOKKOS_LDFLAGS $KOKKOS_LIBS $libmesh_optional_LIBS" ]) AM_CONDITIONAL(LIBMESH_ENABLE_KOKKOS, test x$enablekokkos = xyes) From 4c06d292081aa33e175e597604182838a8a4ffe0 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Wed, 12 Aug 2026 21:29:59 -0500 Subject: [PATCH 44/45] ACSM update This gets some Kokkos updates from Rochi --- m4/autoconf-submodule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/autoconf-submodule b/m4/autoconf-submodule index 83f2d766b3..b989dd3d61 160000 --- a/m4/autoconf-submodule +++ b/m4/autoconf-submodule @@ -1 +1 @@ -Subproject commit 83f2d766b334b869d14898ab4ed51b49942be40e +Subproject commit b989dd3d611c3d6c18d0d183acc1a555a71e0127 From 12d23b23acb6551aeea0b25628fa84d43421c9f4 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 14:16:39 -0500 Subject: [PATCH 45/45] Re-bootstrap --- Makefile.in | 15 +- aclocal.m4 | 1 + configure | 12292 +++++++++------- contrib/Makefile.in | 13 + contrib/capnproto/Makefile.in | 13 + contrib/eigen/gitshim/Makefile.in | 13 + contrib/exodusii/5.22b/exodus/Makefile.in | 13 + contrib/exodusii/5.22b/nemesis/Makefile.in | 13 + contrib/exodusii/Lib/Makefile.in | 13 + contrib/exodusii/v8.11/exodus/Makefile.in | 13 + contrib/exodusii/v8.11/nemesis/Makefile.in | 13 + contrib/fparser/Makefile.in | 13 + contrib/fparser/extrasrc/Makefile.in | 13 + contrib/gmv/Makefile.in | 13 + contrib/gzstream/Makefile.in | 13 + contrib/laspack/Makefile.in | 13 + contrib/libHilbert/Makefile.in | 13 + contrib/metis/Makefile.in | 13 + contrib/nanoflann/Makefile.in | 13 + contrib/nemesis/Lib/Makefile.in | 13 + contrib/netgen/Makefile.in | 13 + contrib/parmetis/Makefile.in | 13 + contrib/poly2tri/modified/Makefile.in | 13 + contrib/qhull/Makefile.in | 13 + contrib/sfcurves/Makefile.in | 13 + contrib/tecplot/binary/Makefile.in | 13 + contrib/tecplot/tecio/Makefile.in | 13 + contrib/tetgen/Makefile.in | 13 + contrib/triangle/Makefile.in | 13 + doc/Makefile.in | 13 + doc/html/Makefile.in | 13 + examples/Makefile.in | 13 + .../adaptivity/adaptivity_ex1/Makefile.in | 13 + .../adaptivity/adaptivity_ex2/Makefile.in | 13 + .../adaptivity/adaptivity_ex3/Makefile.in | 13 + .../adaptivity/adaptivity_ex4/Makefile.in | 13 + .../adaptivity/adaptivity_ex5/Makefile.in | 13 + examples/adjoints/adjoints_ex1/Makefile.in | 13 + examples/adjoints/adjoints_ex2/Makefile.in | 13 + examples/adjoints/adjoints_ex3/Makefile.in | 13 + examples/adjoints/adjoints_ex4/Makefile.in | 13 + examples/adjoints/adjoints_ex5/Makefile.in | 13 + examples/adjoints/adjoints_ex6/Makefile.in | 13 + examples/adjoints/adjoints_ex7/Makefile.in | 13 + .../eigenproblems_ex1/Makefile.in | 13 + .../eigenproblems_ex2/Makefile.in | 13 + .../eigenproblems_ex3/Makefile.in | 13 + .../eigenproblems_ex4/Makefile.in | 13 + .../fem_system/fem_system_ex1/Makefile.in | 13 + .../fem_system/fem_system_ex2/Makefile.in | 13 + .../fem_system/fem_system_ex3/Makefile.in | 13 + .../fem_system/fem_system_ex4/Makefile.in | 13 + .../fem_system/fem_system_ex5/Makefile.in | 13 + .../introduction/introduction_ex1/Makefile.in | 13 + .../introduction/introduction_ex2/Makefile.in | 13 + .../introduction/introduction_ex3/Makefile.in | 13 + .../introduction/introduction_ex4/Makefile.in | 13 + .../introduction/introduction_ex5/Makefile.in | 13 + .../miscellaneous_ex1/Makefile.in | 13 + .../miscellaneous_ex10/Makefile.in | 13 + .../miscellaneous_ex11/Makefile.in | 13 + .../miscellaneous_ex12/Makefile.in | 13 + .../miscellaneous_ex13/Makefile.in | 13 + .../miscellaneous_ex14/Makefile.in | 13 + .../miscellaneous_ex15/Makefile.in | 13 + .../miscellaneous_ex16/Makefile.in | 13 + .../miscellaneous_ex17/Makefile.in | 13 + .../miscellaneous_ex2/Makefile.in | 13 + .../miscellaneous_ex3/Makefile.in | 13 + .../miscellaneous_ex4/Makefile.in | 13 + .../miscellaneous_ex5/Makefile.in | 13 + .../miscellaneous_ex6/Makefile.in | 13 + .../miscellaneous_ex7/Makefile.in | 13 + .../miscellaneous_ex8/Makefile.in | 13 + .../miscellaneous_ex9/Makefile.in | 13 + .../optimization/optimization_ex1/Makefile.in | 13 + .../optimization/optimization_ex2/Makefile.in | 13 + .../reduced_basis_ex1/Makefile.in | 13 + .../reduced_basis_ex2/Makefile.in | 13 + .../reduced_basis_ex3/Makefile.in | 13 + .../reduced_basis_ex4/Makefile.in | 13 + .../reduced_basis_ex5/Makefile.in | 13 + .../reduced_basis_ex6/Makefile.in | 13 + .../reduced_basis_ex7/Makefile.in | 13 + .../solution_transfer_ex1/Makefile.in | 13 + .../subdomains/subdomains_ex1/Makefile.in | 13 + .../subdomains/subdomains_ex2/Makefile.in | 13 + .../subdomains/subdomains_ex3/Makefile.in | 13 + .../systems_of_equations_ex1/Makefile.in | 13 + .../systems_of_equations_ex2/Makefile.in | 13 + .../systems_of_equations_ex3/Makefile.in | 13 + .../systems_of_equations_ex4/Makefile.in | 13 + .../systems_of_equations_ex5/Makefile.in | 13 + .../systems_of_equations_ex6/Makefile.in | 13 + .../systems_of_equations_ex7/Makefile.in | 13 + .../systems_of_equations_ex8/Makefile.in | 13 + .../systems_of_equations_ex9/Makefile.in | 13 + examples/transient/transient_ex1/Makefile.in | 13 + examples/transient/transient_ex2/Makefile.in | 13 + examples/transient/transient_ex3/Makefile.in | 13 + examples/vector_fe/vector_fe_ex1/Makefile.in | 13 + examples/vector_fe/vector_fe_ex10/Makefile.in | 13 + examples/vector_fe/vector_fe_ex2/Makefile.in | 13 + examples/vector_fe/vector_fe_ex3/Makefile.in | 13 + examples/vector_fe/vector_fe_ex4/Makefile.in | 13 + examples/vector_fe/vector_fe_ex5/Makefile.in | 13 + examples/vector_fe/vector_fe_ex6/Makefile.in | 13 + examples/vector_fe/vector_fe_ex7/Makefile.in | 13 + examples/vector_fe/vector_fe_ex8/Makefile.in | 13 + examples/vector_fe/vector_fe_ex9/Makefile.in | 13 + include/Makefile.in | 19 + include/libmesh/Makefile.in | 44 +- tests/Makefile.in | 151 +- 113 files changed, 8189 insertions(+), 5724 deletions(-) diff --git a/Makefile.in b/Makefile.in index 408e2f102f..f8d0c7d7bd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -114,7 +114,7 @@ target_triplet = @target@ @LIBMESH_OPT_MODE_TRUE@am__append_13 = libmesh_opt.la @LIBMESH_PROF_MODE_TRUE@am__append_14 = libmesh_prof.la @LIBMESH_OPROF_MODE_TRUE@am__append_15 = libmesh_oprof.la -@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_16 = tests +@LIBMESH_ENABLE_TESTS_DIR_TRUE@am__append_16 = tests bin_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_4) $(am__EXEEXT_6) \ $(am__EXEEXT_8) @LIBMESH_OPT_MODE_TRUE@am__append_17 = $(opt_programs) @@ -135,6 +135,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -7723,11 +7724,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -7775,6 +7787,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/aclocal.m4 b/aclocal.m4 index 7f0fee71c0..63650f6b04 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1357,6 +1357,7 @@ m4_include([m4/autoconf-submodule/acsm_compiler_flags.m4]) m4_include([m4/autoconf-submodule/acsm_cxx_compiler_standard.m4]) m4_include([m4/autoconf-submodule/acsm_enable_paranoid.m4]) m4_include([m4/autoconf-submodule/acsm_enable_werror.m4]) +m4_include([m4/autoconf-submodule/acsm_kokkos.m4]) m4_include([m4/autoconf-submodule/acsm_mpi.m4]) m4_include([m4/autoconf-submodule/acsm_precision.m4]) m4_include([m4/autoconf-submodule/acsm_scrape_petsc_configure.m4]) diff --git a/configure b/configure index 9aaa955b76..84b3fe83ce 100755 --- a/configure +++ b/configure @@ -672,6 +672,24 @@ libmesh_contrib_LDFLAGS libmesh_contrib_INCLUDES libmesh_optional_LIBS libmesh_optional_INCLUDES +LIBMESH_ENABLE_TESTS_DIR_FALSE +LIBMESH_ENABLE_TESTS_DIR_TRUE +LIBMESH_ENABLE_KOKKOS_FALSE +LIBMESH_ENABLE_KOKKOS_TRUE +ACSM_ENABLE_KOKKOS_FALSE +ACSM_ENABLE_KOKKOS_TRUE +KOKKOS_MPI_LDFLAGS +KOKKOS_MPI_CPPFLAGS +KOKKOS_LIBS +KOKKOS_LDFLAGS +KOKKOS_CPPFLAGS +KOKKOS_INCLUDES +KOKKOS_CXX +KOKKOS_BACKEND +ICPX +HIPCC +NVCC +KOKKOS_CXXFLAGS LIBMESH_ENABLE_METAPHYSICL_FALSE LIBMESH_ENABLE_METAPHYSICL_TRUE METAPHYSICL_INCLUDE @@ -836,15 +854,6 @@ LIBMESH_ENABLE_LASPACK_FALSE LIBMESH_ENABLE_LASPACK_TRUE LASPACK_LIB LASPACK_INCLUDE -TBB_INCLUDE -TBB_LIBRARY -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CC -ax_pthread_config -OPENMP_CXXFLAGS -OPENMP_FFLAGS -OPENMP_CFLAGS NVTX_INCLUDE TPETRA_INCLUDES TPETRA_LIBS @@ -991,6 +1000,15 @@ LIBMESH_DBG_MODE_FALSE LIBMESH_DBG_MODE_TRUE LIBMESH_OPT_MODE_FALSE LIBMESH_OPT_MODE_TRUE +TBB_INCLUDE +TBB_LIBRARY +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +ax_pthread_config +OPENMP_CXXFLAGS +OPENMP_FFLAGS +OPENMP_CFLAGS libmesh_CFLAGS libmesh_CXXFLAGS libmesh_CPPFLAGS @@ -1207,6 +1225,12 @@ enable_sanitize enable_fpe_safety enable_coverage with_methods +with_thread_model +enable_openmp +enable_pthreads +enable_tbb +with_tbb +with_tbb_lib enable_werror enable_paranoid_warnings enable_static @@ -1284,12 +1308,6 @@ with_tpetra with_dtk enable_nvtx with_nvtx -with_thread_model -enable_openmp -enable_pthreads -enable_tbb -with_tbb -with_tbb_lib enable_laspack enable_sfc enable_gzstreams @@ -1353,6 +1371,11 @@ enable_metaphysicl with_metaphysicl with_metaphysicl_include enable_metaphysicl_required +with_kokkos +with_kokkos_include +with_kokkos_lib +with_kokkos_backend +enable_kokkos_required ' ac_precious_vars='build_alias host_alias @@ -1383,7 +1406,8 @@ VTK_INCLUDE VTK_DIR HDF5_DIR YACC -YFLAGS' +YFLAGS +KOKKOS_CXXFLAGS' # Initialize some variables set by options. @@ -2035,6 +2059,10 @@ Optional Features: turn on sanitizer flags for the given methods --disable-fpe-safety remove FPE-trapping compiler flags --enable-coverage configure code coverage analysis tools + --disable-openmp build without OpenMP support + --disable-pthreads build without POSIX threading (pthreads) support + --disable-tbb build without threading support via Threading + Building Blocks --enable-werror Turn compilation warnings into errors --enable-paranoid-warnings Turn on paranoid compiler warnings @@ -2112,10 +2140,6 @@ Optional Features: --disable-slepc build without SLEPc eigen solver support --disable-trilinos build without Trilinos support --disable-nvtx build without annotation support via NVTX - --disable-openmp build without OpenMP support - --disable-pthreads build without POSIX threading (pthreads) support - --disable-tbb build without threading support via Threading - Building Blocks --disable-laspack build without LASPACK iterative solver support --disable-sfc build without space-filling curves support --disable-gzstreams build without gzstreams compressed I/O support @@ -2169,6 +2193,8 @@ Optional Features: --disable-metaphysicl build without MetaPhysicL support --enable-metaphysicl-required Error if MetaPhysicL is not detected by configure + --enable-kokkos-required + Error if Kokkos is not detected by configure Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -2194,6 +2220,12 @@ Optional Packages: --with-cxx-std[=ARG] Exact C++ standard year to require --with-methods=METHODS methods used to build libMesh (opt,dbg,devel,prof,oprof) + --with-thread-model=tbb,pthread,openmp,auto,none + Specify the thread model to use + --with-tbb=PATH Specify the path where Threading Building Blocks is + installed + --with-tbb-lib=PATH Specify the path to Threading Building Blocks + libraries --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). @@ -2235,12 +2267,6 @@ Optional Packages: --with-tpetra=PATH Specify the path to Tpetra installation --with-dtk=PATH Specify the path to Dtk installation --with-nvtx=PATH Specify the path where NVTX is installed - --with-thread-model=tbb,pthread,openmp,auto,none - Specify the thread model to use - --with-tbb=PATH Specify the path where Threading Building Blocks is - installed - --with-tbb-lib=PATH Specify the path to Threading Building Blocks - libraries --with-tecio-x11-include=PATH Path to X11 header files. E.g. /usr/include but _not_ /usr/include/X11 @@ -2280,6 +2306,13 @@ Optional Packages: internal: build from contrib --with-metaphysicl-include= + --with-kokkos=DIR Enable Kokkos support using the installation at DIR + --with-kokkos-include=DIR + Enable Kokkos support using the headers in DIR + --with-kokkos-lib=DIR Enable Kokkos support using the libraries in DIR + --with-kokkos-backend=BACKEND + cuda|hip|sycl|openmp|serial (default: auto-detect + from KokkosCore_config.h) Some influential environment variables: PETSC_DIR path to PETSc installation @@ -2320,6 +2353,8 @@ Some influential environment variables: YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of '-d' given by some make applications. + KOKKOS_CXXFLAGS + Extra C++ flags for compiling Kokkos sources Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -2795,144 +2830,6 @@ fi } # ac_fn_fc_try_link -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (void); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (void); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext ;; -esac -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 ;; -esac -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - # ac_fn_f77_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -2981,11 +2878,11 @@ fi } # ac_fn_f77_try_link -# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. -ac_fn_cxx_check_header_compile () +ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2999,7 +2896,7 @@ else case e in #( $4 #include <$2> _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( @@ -3014,261 +2911,399 @@ eval ac_res=\$$3 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_cxx_check_header_compile - -# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES -# ---------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_cxx_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_hi=$ac_mid; break -else case e in #( - e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_lo=$ac_mid; break -else case e in #( - e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done -else case e in #( - e) ac_lo= ac_hi= ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_hi=$ac_mid -else case e in #( - e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval (void) { return $2; } -static unsigned long int ulongval (void) { return $2; } -#include -#include -int -main (void) -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO" -then : - echo >>conftest.val; read $3 &5 -printf %s "checking whether $as_decl_name is declared... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - eval ac_save_FLAGS=\$$6 - as_fn_append $6 " $5" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - eval $6=\$ac_save_FLAGS - ;; -esac -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_check_decl +} # ac_fn_c_check_header_compile -# ac_fn_cxx_check_func LINENO FUNC VAR -# ------------------------------------ +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_cxx_check_func () +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (void); below. */ + +#include +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (void); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$3=yes" +else case e in #( + e) eval "$3=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext ;; +esac +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 ;; +esac +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES +# --------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_cxx_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + eval "$3=yes" +else case e in #( + e) eval "$3=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_cxx_check_header_compile + +# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES +# ---------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_cxx_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_hi=$ac_mid; break +else case e in #( + e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_lo=$ac_mid; break +else case e in #( + e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else case e in #( + e) ac_lo= ac_hi= ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_hi=$ac_mid +else case e in #( + e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval (void) { return $2; } +static unsigned long int ulongval (void) { return $2; } +#include +#include +int +main (void) +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_run "$LINENO" +then : + echo >>conftest.val; read $3 &5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + eval "$3=yes" +else case e in #( + e) eval "$3=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + ;; +esac +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_check_decl + +# ac_fn_cxx_check_func LINENO FUNC VAR +# ------------------------------------ +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -9256,6 +9291,10 @@ fi # flag, for the current compiler, for the user's requested C++ # standards level. Adds the required flag to CXXFLAGS if # one is found. Exits if no acceptable flag is found. +# +# Don't turn on GNU extensions. We don't use them, and with device +# computing we might be using a mix of compilers that don't all +# support them. # -------------------------------------------------------------- acsm_CXX_STD_MIN="2017" @@ -37221,6 +37260,7 @@ libmesh_CXXFLAGS="$GCOV_FLAGS $libmesh_CXXFLAGS" + # Check whether --with-methods was given. if test ${with_methods+y} then : @@ -37304,374 +37344,1508 @@ printf "%s\n" "<<< Configuring libMesh with methods \"$METHODS\" >>>" >&6; } CXXFLAGS_OPROF="$CXXFLAGS_OPROF $SANITIZE_OPROF_FLAGS" CFLAGS_OPROF="$CFLAGS_OPROF $SANITIZE_OPROF_FLAGS" - for method in ${METHODS}; do - case "${method}" in #( - optimized|opt) : - build_opt=yes ;; #( - debug|dbg) : - build_dbg=yes ;; #( - devel) : - build_devel=yes ;; #( - profiling|pro|prof) : - build_prof=yes ;; #( - oprofile|oprof) : - build_oprof=yes ;; #( - *) : - as_fn_error $? "bad value ${method} for --with-methods" "$LINENO" 5 ;; -esac - done - - if test x$build_opt = xyes; then - LIBMESH_OPT_MODE_TRUE= - LIBMESH_OPT_MODE_FALSE='#' -else - LIBMESH_OPT_MODE_TRUE='#' - LIBMESH_OPT_MODE_FALSE= -fi - - if test x$build_dbg = xyes; then - LIBMESH_DBG_MODE_TRUE= - LIBMESH_DBG_MODE_FALSE='#' -else - LIBMESH_DBG_MODE_TRUE='#' - LIBMESH_DBG_MODE_FALSE= -fi - - if test x$build_devel = xyes; then - LIBMESH_DEVEL_MODE_TRUE= - LIBMESH_DEVEL_MODE_FALSE='#' -else - LIBMESH_DEVEL_MODE_TRUE='#' - LIBMESH_DEVEL_MODE_FALSE= -fi - - if test x$build_prof = xyes; then - LIBMESH_PROF_MODE_TRUE= - LIBMESH_PROF_MODE_FALSE='#' -else - LIBMESH_PROF_MODE_TRUE='#' - LIBMESH_PROF_MODE_FALSE= -fi - - if test x$build_oprof = xyes; then - LIBMESH_OPROF_MODE_TRUE= - LIBMESH_OPROF_MODE_FALSE='#' -else - LIBMESH_OPROF_MODE_TRUE='#' - LIBMESH_OPROF_MODE_FALSE= -fi + # ------------------------------------------------------------- + # Choose between TBB, OpenMP, and pthreads thread models. + # The user can control this by configuring with + # + # --with-thread-model={tbb,pthread,auto,none} + # + # where "auto" will try to automatically detect the best possible + # version (see threads.m4). + # + # We do this here so that any openmp flags will get added to CFLAGS + # and CXXFLAGS before we AC_SUBST them. + # ------------------------------------------------------------- - LIBMESH_PC_IN="" - # set the configuration input file for libmesh.pc - if test x$build_opt = xyes -then : - LIBMESH_PC_IN="contrib/utils/libmesh-opt.pc.in" -elif test x$build_dbg = xyes -then : - LIBMESH_PC_IN="contrib/utils/libmesh-dbg.pc.in" -elif test x$build_devel = xyes -then : - LIBMESH_PC_IN="contrib/utils/libmesh-devel.pc.in" -elif test x$build_prof = xyes -then : - LIBMESH_PC_IN="contrib/utils/libmesh-prof.pc.in" -elif test x$build_oprof = xyes +# Check whether --with-thread-model was given. +if test ${with_thread_model+y} then : - LIBMESH_PC_IN="contrib/utils/libmesh-oprof.pc.in" + withval=$with_thread_model; case "${withval}" in #( + tbb) : + requested_thread_model=tbb ;; #( + pthread) : + requested_thread_model=pthread ;; #( + pthreads) : + requested_thread_model=pthread ;; #( + openmp) : + requested_thread_model=openmp ;; #( + auto) : + requested_thread_model=auto ;; #( + none) : + requested_thread_model=none ;; #( + *) : + as_fn_error $? "bad value ${withval} for --with-thread-model" "$LINENO" 5 ;; +esac +else case e in #( + e) requested_thread_model=auto ;; +esac fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< User requested thread model: $requested_thread_model >>>" >&5 +printf "%s\n" "<<< User requested thread model: $requested_thread_model >>>" >&6; } - - - - - - - - - - - - - - - - - - - - -ac_config_files="$ac_config_files contrib/utils/libmesh.pc:$LIBMESH_PC_IN" - - - - - - # By default we merely enable some warnings, but we can turn those - # into errors (for library code only, not contrib or external code) - # by configuring with --enable-werror - # Check whether --enable-werror was given. -if test ${enable_werror+y} + # Check whether --enable-openmp was given. +if test ${enable_openmp+y} then : - enableval=$enable_werror; case "${enableval}" in #( + enableval=$enable_openmp; case "${enableval}" in #( yes) : - acsm_enablewerror=yes ;; #( + enableopenmp=yes ;; #( no) : - acsm_enablewerror=no ;; #( + enableopenmp=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-openmp" "$LINENO" 5 ;; esac else case e in #( - e) acsm_enablewerror=no ;; + e) enableopenmp=yes ;; esac fi - ACSM_ANY_WERROR_FLAG=$WERROR_FLAGS - if test "x$acsm_enablewerror" != "xyes" + if test "x$enableopenmp" = "xyes" then : - ACSM_ANY_WERROR_FLAG='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are just warnings >>>" >&5 -printf "%s\n" "<<< Compiler warnings are just warnings >>>" >&6; } -else case e in #( - e) as_CACHEVAR=`printf "%s\n" "ax_cv_check_cxxflags__$WERROR_FLAGS" | sed "$as_sed_sh"` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $WERROR_FLAGS" >&5 -printf %s "checking whether C++ compiler accepts $WERROR_FLAGS... " >&6; } -if eval test \${$as_CACHEVAR+y} + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C++ compiler" >&5 +printf %s "checking for OpenMP flag of C++ compiler... " >&6; } +if test ${ax_cv_cxx_openmp+y} then : printf %s "(cached) " >&6 else case e in #( - e) - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $WERROR_FLAGS" + e) saveCXXFLAGS=$CXXFLAGS +ax_cv_cxx_openmp=unknown +# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), +# -qopenmp (icc>=15), -openmp (icc), +# -xopenmp (Sun), -omp (Tru64), +# -qsmp=omp (AIX), +# none +ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" +if test "x$OPENMP_CXXFLAGS" != x; then + ax_openmp_flags="$OPENMP_CXXFLAGS $ax_openmp_flags" +fi +for ax_openmp_flag in $ax_openmp_flags; do + case $ax_openmp_flag in + none) CXXFLAGS=$saveCXX ;; + *) CXXFLAGS="$saveCXXFLAGS $ax_openmp_flag" ;; + esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main (void) +#include + +static void +parallel_fill(int * data, int n) { + int i; +#pragma omp parallel for + for (i = 0; i < n; ++i) + data[i] = i; +} - ; +int +main(void) +{ + int arr[100000]; + omp_set_num_threads(2); + parallel_fill(arr, 100000); return 0; } + _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - eval "$as_CACHEVAR=yes" -else case e in #( - e) eval "$as_CACHEVAR=no" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags ;; -esac -fi -eval ac_res=\$$as_CACHEVAR - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +if ac_fn_cxx_try_link "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are now errors >>>" >&5 -printf "%s\n" "<<< Compiler warnings are now errors >>>" >&6; } -else case e in #( - e) ACSM_ANY_WERROR_FLAG='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler does not support $WERROR_FLAGS >>>" >&5 -printf "%s\n" "<<< Compiler does not support $WERROR_FLAGS >>>" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are just warnings >>>" >&5 -printf "%s\n" "<<< Compiler warnings are just warnings >>>" >&6; } ;; -esac + ax_cv_cxx_openmp=$ax_openmp_flag; break fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +done +CXXFLAGS=$saveCXXFLAGS ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_openmp" >&5 +printf "%s\n" "$ax_cv_cxx_openmp" >&6; } +if test "x$ax_cv_cxx_openmp" = "xunknown"; then + enableopenmp=no +else + if test "x$ax_cv_cxx_openmp" != "xnone"; then + OPENMP_CXXFLAGS=$ax_cv_cxx_openmp + fi +printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h +fi + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - # By default we merely enable some of the most common compiler - # warnings, but we can turn on as many warnings as we avoid triggering - # (for library code only, not contrib or external code) by configuring - # with --enable-paranoid-warnings - # Check whether --enable-paranoid-warnings was given. -if test ${enable_paranoid_warnings+y} + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C compiler" >&5 +printf %s "checking for OpenMP flag of C compiler... " >&6; } +if test ${ax_cv_c_openmp+y} then : - enableval=$enable_paranoid_warnings; case "${enableval}" in #( - yes) : - acsm_enableparanoid=yes ;; #( - no) : - acsm_enableparanoid=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-paranoid-warnings" "$LINENO" 5 ;; -esac + printf %s "(cached) " >&6 else case e in #( - e) acsm_enableparanoid=no ;; -esac + e) saveCFLAGS=$CFLAGS +ax_cv_c_openmp=unknown +# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), +# -qopenmp (icc>=15), -openmp (icc), +# -xopenmp (Sun), -omp (Tru64), +# -qsmp=omp (AIX), +# none +ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" +if test "x$OPENMP_CFLAGS" != x; then + ax_openmp_flags="$OPENMP_CFLAGS $ax_openmp_flags" fi +for ax_openmp_flag in $ax_openmp_flags; do + case $ax_openmp_flag in + none) CFLAGS=$saveC ;; + *) CFLAGS="$saveCFLAGS $ax_openmp_flag" ;; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - ACSM_ANY_PARANOID_FLAGS=$ACSM_PARANOID_FLAGS - if test "x$acsm_enableparanoid" != "xyes" -then : - ACSM_ANY_PARANOID_FLAGS='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling extra paranoid compiler warnings >>>" >&5 -printf "%s\n" "<<< Disabling extra paranoid compiler warnings >>>" >&6; } -else case e in #( - e) ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $WERROR_FLAGS $PARANOID_FLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +static void +parallel_fill(int * data, int n) +{ + int i; +#pragma omp parallel for + for (i = 0; i < n; ++i) + data[i] = i; +} int -main (void) +main(void) { - - ; + int arr[100000]; + omp_set_num_threads(2); + parallel_fill(arr, 100000); return 0; } + _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Enabled extra paranoid compiler warnings >>>" >&5 -printf "%s\n" "<<< Enabled extra paranoid compiler warnings >>>" >&6; } -else case e in #( - e) ACSM_ANY_PARANOID_FLAGS='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler may not support all of $PARANOID_FLAGS >>>" >&5 -printf "%s\n" "<<< Compiler may not support all of $PARANOID_FLAGS >>>" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling extra paranoid compiler warnings >>>" >&5 -printf "%s\n" "<<< Disabling extra paranoid compiler warnings >>>" >&6; } ;; -esac + ax_cv_c_openmp=$ax_openmp_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +done +CFLAGS=$saveCFLAGS ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_openmp" >&5 +printf "%s\n" "$ax_cv_c_openmp" >&6; } +if test "x$ax_cv_c_openmp" = "xunknown"; then + : +else + if test "x$ax_cv_c_openmp" != "xnone"; then + OPENMP_CFLAGS=$ax_cv_c_openmp + fi +printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h +fi -# -------------------------------------------------------------- -# Test for optional modern C++ features, which libMesh offers shims -# for and/or which libMesh applications may want to selectively use. -# -------------------------------------------------------------- - - have_cxx14_make_unique=no - - # std::make_unique is actually part of the C++14 standard, but some - # compilers might (?) support it via the -std=c++11 flag, or eventually - # with no flag at all. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++14 std::make_unique support" >&5 -printf %s "checking for C++14 std::make_unique support... " >&6; } - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test "x$enablefortran" = "xyes" +then : - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include -int -main (void) -{ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of Fortran 77 compiler" >&5 +printf %s "checking for OpenMP flag of Fortran 77 compiler... " >&6; } +if test ${ax_cv_f77_openmp+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) saveFFLAGS=$FFLAGS +ax_cv_f77_openmp=unknown +# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), +# -qopenmp (icc>=15), -openmp (icc), +# -xopenmp (Sun), -omp (Tru64), +# -qsmp=omp (AIX), +# none +ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" +if test "x$OPENMP_FFLAGS" != x; then + ax_openmp_flags="$OPENMP_FFLAGS $ax_openmp_flags" +fi +for ax_openmp_flag in $ax_openmp_flags; do + case $ax_openmp_flag in + none) FFLAGS=$saveF ;; + *) FFLAGS="$saveFFLAGS $ax_openmp_flag" ;; + esac + cat > conftest.$ac_ext <<_ACEOF - { - // Normally, you would use "auto" on the LHS here to avoid - // repeating the type name, but we are not testing auto here. - std::unique_ptr up = std::make_unique(42); - } // Foo deleted when up goes out of scope +#include - ; +static void +parallel_fill(int * data, int n) +{ + int i; +#pragma omp parallel for + for (i = 0; i < n; ++i) + data[i] = i; +} + +int +main(void) +{ + int arr[100000]; + omp_set_num_threads(2); + parallel_fill(arr, 100000); return 0; } + _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_f77_try_link "$LINENO" then : + ax_cv_f77_openmp=$ax_openmp_flag; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +done +FFLAGS=$saveFFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f77_openmp" >&5 +printf "%s\n" "$ax_cv_f77_openmp" >&6; } +if test "x$ax_cv_f77_openmp" = "xunknown"; then + : +else + if test "x$ax_cv_f77_openmp" != "xnone"; then + OPENMP_FFLAGS=$ax_cv_f77_openmp + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX14_MAKE_UNIQUE 1" >>confdefs.h - - have_cxx14_make_unique=yes +printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - # Reset the flags - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test x$have_cxx14_make_unique == xyes; then - HAVE_CXX14_MAKE_UNIQUE_TRUE= - HAVE_CXX14_MAKE_UNIQUE_FALSE='#' -else - HAVE_CXX14_MAKE_UNIQUE_TRUE='#' - HAVE_CXX14_MAKE_UNIQUE_FALSE= fi + if test "x$OPENMP_CFLAGS" != "x" +then : - - have_cxx11_regex=no - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::regex support" >&5 -printf %s "checking for C++11 std::regex support... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with C OpenMP support >>>" >&5 +printf "%s\n" "<<< Configuring library with C OpenMP support >>>" >&6; } + CFLAGS_OPT="$CFLAGS_OPT $OPENMP_CFLAGS" + CFLAGS_DBG="$CFLAGS_DBG $OPENMP_CFLAGS" + CFLAGS_DEVEL="$CFLAGS_DEVEL $OPENMP_CFLAGS" + CFLAGS_PROF="$CFLAGS_PROF $OPENMP_CFLAGS" + CFLAGS_OPROF="$CFLAGS_OPROF $OPENMP_CFLAGS" - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" +fi - if test "$cross_compiling" = yes + if test "x$OPENMP_FFLAGS" != "x" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Fortran OpenMP support >>>" >&5 +printf "%s\n" "<<< Configuring library with Fortran OpenMP support >>>" >&6; } + FFLAGS="$FFLAGS $OPENMP_FFLAGS" -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include +fi -int -main (void) -{ + if test "x$OPENMP_CXXFLAGS" != "x" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with OpenMP support >>>" >&5 +printf "%s\n" "<<< Configuring library with OpenMP support >>>" >&6; } + CXXFLAGS_OPT="$CXXFLAGS_OPT $OPENMP_CXXFLAGS" + CXXFLAGS_DBG="$CXXFLAGS_DBG $OPENMP_CXXFLAGS" + CXXFLAGS_DEVEL="$CXXFLAGS_DEVEL $OPENMP_CXXFLAGS" + CXXFLAGS_PROF="$CXXFLAGS_PROF $OPENMP_CXXFLAGS" + CXXFLAGS_OPROF="$CXXFLAGS_OPROF $OPENMP_CXXFLAGS" + + +else case e in #( + e) if test "x$requested_thread_model" = "xopenmp" +then : + as_fn_error $? "requested openmp threading model, but C++ compiler does not support openmp." "$LINENO" 5 +fi ;; +esac +fi +else case e in #( + e) if test "x$requested_thread_model" = "xopenmp" +then : + as_fn_error $? "requested openmp threading model, but --disable-openmp has been specified." "$LINENO" 5 +fi ;; +esac +fi + + found_thread_model=none + + if test "x$requested_thread_model" = "xpthread" || test "x$requested_thread_model" = "xauto" || test "x$requested_thread_model" = "xopenmp" +then : + + # Check whether --enable-pthreads was given. +if test ${enable_pthreads+y} +then : + enableval=$enable_pthreads; case "${enableval}" in #( + yes) : + enablepthreads=yes ;; #( + no) : + enablepthreads=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-pthreads" "$LINENO" 5 ;; +esac +else case e in #( + e) enablepthreads=$enableoptional ;; +esac +fi + + + if test "x$enablepthreads" = "xyes" +then : + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +printf %s "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (void); +int +main (void) +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +printf "%s\n" "$ax_pthread_ok" >&6; } + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case ${host_os} in + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + + darwin*) + ax_pthread_flags="-pthread $ax_pthread_flags" + ;; +esac + +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do + + case $flag in + none) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +printf %s "checking whether pthreads work without any flags... " >&6; } + ;; + + -*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 +printf %s "checking whether pthreads work with $flag... " >&6; } + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ax_pthread_config+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ax_pthread_config="yes" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi ;; +esac +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +printf "%s\n" "$ax_pthread_config" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 +printf %s "checking for the pthreads library -l$flag... " >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; } +int +main (void) +{ +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +printf "%s\n" "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +printf %s "checking for joinable pthread attribute... " >&6; } + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int attr = $attr; return attr /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + attr_name=$attr; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 +printf "%s\n" "$attr_name" >&6; } + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + +printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $attr_name" >>confdefs.h + + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 +printf %s "checking if more special flags are required for pthreads... " >&6; } + flag=no + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + flag="-mt -D_REENTRANT" + fi + ;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 +printf "%s\n" "${flag}" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main (void) +{ +int i = PTHREAD_PRIO_INHERIT; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_PTHREAD_PRIO_INHERIT=yes +else case e in #( + e) ax_cv_PTHREAD_PRIO_INHERIT=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" +then : + +printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + +fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != xyes; then + case $host_os in + aix*) + case "x/$CC" in #( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in #( + x/*) : + if as_fn_executable_p ${CC}_r +then : + PTHREAD_CC="${CC}_r" +fi ;; #( + *) : + for ac_prog in ${CC}_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PTHREAD_CC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +printf "%s\n" "$PTHREAD_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; #( + *) : + ;; +esac + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then + +printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h + + : +else + ax_pthread_ok=no + +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + if test "x$ax_pthread_ok" = "xyes" +then : + + +printf "%s\n" "#define USING_THREADS 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with pthread support >>>" >&5 +printf "%s\n" "<<< Configuring library with pthread support >>>" >&6; } + libmesh_optional_INCLUDES="$PTHREAD_CFLAGS $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$PTHREAD_LIBS $libmesh_optional_LIBS" + found_thread_model=pthread + +else case e in #( + e) enablepthreads=no ;; +esac +fi + +fi + + if test "x$enablepthreads" = "xno" && test "x$requested_thread_model" = "xpthread" +then : + as_fn_error $? "requested threading model, pthreads, could not be found." "$LINENO" 5 +fi + if test "x$enablepthreads" = "xno" && test "x$requested_thread_model" = "xopenmp" +then : + as_fn_error $? "openmp threading model requested, but required pthread support unavailable." "$LINENO" 5 +fi + +fi + + if test "x$found_thread_model" = "xnone" +then : + + if test "x$requested_thread_model" = "xtbb" || test "x$requested_thread_model" = "xauto" +then : + + + # Check whether --enable-tbb was given. +if test ${enable_tbb+y} +then : + enableval=$enable_tbb; case "${enableval}" in #( + yes) : + enabletbb=yes ;; #( + no) : + enabletbb=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-tbb" "$LINENO" 5 ;; +esac +else case e in #( + e) enabletbb=$enableoptional ;; +esac +fi + + + if test "x$enabletbb" = "xyes" +then : + + +# Check whether --with-tbb was given. +if test ${with_tbb+y} +then : + withval=$with_tbb; withtbb=$withval +else case e in #( + e) withtbb=$TBB_DIR ;; +esac +fi + + + +# Check whether --with-tbb-lib was given. +if test ${with_tbb_lib+y} +then : + withval=$with_tbb_lib; withtbblib=$withval +else case e in #( + e) withtbblib=$TBB_LIB_PATH ;; +esac +fi + + + if test "$withtbb" != no +then : + + if test "x$withtbb" = "x" +then : + withtbb=/usr +fi + + case $withtbb in + "~/"*) withtbb=$HOME${withtbb#"~"} ;; + esac + + tbb_is_onetbb=no + if test -r $withtbb/include/tbb/version.h +then : + TBB_INCLUDE_PATH=$withtbb/include + tbb_is_onetbb=yes +else case e in #( + e) if test -r $withtbb/include/tbb/tbb_stddef.h +then : + TBB_INCLUDE_PATH=$withtbb/include +fi ;; +esac +fi + + if test "x$withtbblib" != "x" +then : + TBB_LIBS=$withtbblib +else case e in #( + e) TBB_LIBS=$withtbb/lib ;; +esac +fi + +fi + + if test "x$TBB_INCLUDE_PATH" != "x" +then : + + TBB_LIBRARY="-L$TBB_LIBS -ltbb -ltbbmalloc" + TBB_INCLUDE=-I$TBB_INCLUDE_PATH + + if test "x$RPATHFLAG" != "x" && test -d $TBB_LIBS +then : + TBB_LIBRARY="${RPATHFLAG}${TBB_LIBS} $TBB_LIBRARY" +fi + + if test "x$tbb_is_onetbb" = "xyes" +then : + tbbverfile=$TBB_INCLUDE_PATH/tbb/version.h +else case e in #( + e) tbbverfile=$TBB_INCLUDE_PATH/tbb/tbb_stddef.h ;; +esac +fi + tbbmajor=`grep "define TBB_VERSION_MAJOR" $tbbverfile | sed -e "s/#define TBB_VERSION_MAJOR[ ]*//g"` + tbbminor=`grep "define TBB_VERSION_MINOR" $tbbverfile | sed -e "s/#define TBB_VERSION_MINOR[ ]*//g"` + +else case e in #( + e) enabletbb=no ;; +esac +fi + + if test "x$enabletbb" != "xno" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TBB support" >&5 +printf %s "checking for TBB support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + saveCXXFLAGS="$CXXFLAGS" + CXXFLAGS="$saveCXXFLAGS $TBB_INCLUDE" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main (void) +{ + + tbb::blocked_range r(0, 1); + (void)r.size(); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + enabletbb=yes + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + enabletbb=no + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + CXXFLAGS=$saveCXXFLAGS + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +fi + + if test "x$enabletbb" != "xno" +then : + + +printf "%s\n" "#define DETECTED_TBB_VERSION_MAJOR $tbbmajor" >>confdefs.h + + +printf "%s\n" "#define DETECTED_TBB_VERSION_MINOR $tbbminor" >>confdefs.h + + + if test "x$tbb_is_onetbb" = "xyes" +then : + +printf "%s\n" "#define HAVE_ONETBB 1" >>confdefs.h + +fi + + + + +printf "%s\n" "#define USING_THREADS 1" >>confdefs.h + + +printf "%s\n" "#define HAVE_TBB_API 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Intel TBB threading support >>>" >&5 +printf "%s\n" "<<< Configuring library with Intel TBB threading support >>>" >&6; } + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 +printf %s "checking for thread local storage (TLS) class... " >&6; } + if test ${ac_cv_tls+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do + case $ax_tls_keyword in #( + none) : + ac_cv_tls=none ; break ;; #( + *) : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +static $ax_tls_keyword int bar; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_tls=$ax_tls_keyword ; break +else case e in #( + e) ac_cv_tls=none + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; +esac + done + ;; +esac +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 +printf "%s\n" "$ac_cv_tls" >&6; } + + if test "$ac_cv_tls" != "none" +then : + +printf "%s\n" "#define TLS $ac_cv_tls" >>confdefs.h + + : +else case e in #( + e) : ;; +esac +fi + + +fi + +fi + + if test "x$enabletbb" = "xyes" +then : + + libmesh_optional_INCLUDES="$TBB_INCLUDE $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$TBB_LIBRARY $libmesh_optional_LIBS" + found_thread_model=tbb + +fi + + if test "x$enabletbb" = "xno" && test "x$requested_thread_model" = "xtbb" +then : + as_fn_error $? "requested threading model, TBB, could not be found." "$LINENO" 5 +fi + +fi + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Found thread model: $found_thread_model >>>" >&5 +printf "%s\n" "<<< Found thread model: $found_thread_model >>>" >&6; } + + + for method in ${METHODS}; do + case "${method}" in #( + optimized|opt) : + build_opt=yes ;; #( + debug|dbg) : + build_dbg=yes ;; #( + devel) : + build_devel=yes ;; #( + profiling|pro|prof) : + build_prof=yes ;; #( + oprofile|oprof) : + build_oprof=yes ;; #( + *) : + as_fn_error $? "bad value ${method} for --with-methods" "$LINENO" 5 ;; +esac + done + + if test x$build_opt = xyes; then + LIBMESH_OPT_MODE_TRUE= + LIBMESH_OPT_MODE_FALSE='#' +else + LIBMESH_OPT_MODE_TRUE='#' + LIBMESH_OPT_MODE_FALSE= +fi + + if test x$build_dbg = xyes; then + LIBMESH_DBG_MODE_TRUE= + LIBMESH_DBG_MODE_FALSE='#' +else + LIBMESH_DBG_MODE_TRUE='#' + LIBMESH_DBG_MODE_FALSE= +fi + + if test x$build_devel = xyes; then + LIBMESH_DEVEL_MODE_TRUE= + LIBMESH_DEVEL_MODE_FALSE='#' +else + LIBMESH_DEVEL_MODE_TRUE='#' + LIBMESH_DEVEL_MODE_FALSE= +fi + + if test x$build_prof = xyes; then + LIBMESH_PROF_MODE_TRUE= + LIBMESH_PROF_MODE_FALSE='#' +else + LIBMESH_PROF_MODE_TRUE='#' + LIBMESH_PROF_MODE_FALSE= +fi + + if test x$build_oprof = xyes; then + LIBMESH_OPROF_MODE_TRUE= + LIBMESH_OPROF_MODE_FALSE='#' +else + LIBMESH_OPROF_MODE_TRUE='#' + LIBMESH_OPROF_MODE_FALSE= +fi + + + LIBMESH_PC_IN="" + # set the configuration input file for libmesh.pc + if test x$build_opt = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-opt.pc.in" +elif test x$build_dbg = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-dbg.pc.in" +elif test x$build_devel = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-devel.pc.in" +elif test x$build_prof = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-prof.pc.in" +elif test x$build_oprof = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-oprof.pc.in" +fi + + + + + + + + + + + + + + + + + + + + + + + +ac_config_files="$ac_config_files contrib/utils/libmesh.pc:$LIBMESH_PC_IN" + + + + + + # By default we merely enable some warnings, but we can turn those + # into errors (for library code only, not contrib or external code) + # by configuring with --enable-werror + # Check whether --enable-werror was given. +if test ${enable_werror+y} +then : + enableval=$enable_werror; case "${enableval}" in #( + yes) : + acsm_enablewerror=yes ;; #( + no) : + acsm_enablewerror=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; +esac +else case e in #( + e) acsm_enablewerror=no ;; +esac +fi + + + ACSM_ANY_WERROR_FLAG=$WERROR_FLAGS + if test "x$acsm_enablewerror" != "xyes" +then : + ACSM_ANY_WERROR_FLAG='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are just warnings >>>" >&5 +printf "%s\n" "<<< Compiler warnings are just warnings >>>" >&6; } +else case e in #( + e) as_CACHEVAR=`printf "%s\n" "ax_cv_check_cxxflags__$WERROR_FLAGS" | sed "$as_sed_sh"` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $WERROR_FLAGS" >&5 +printf %s "checking whether C++ compiler accepts $WERROR_FLAGS... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $WERROR_FLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else case e in #( + e) eval "$as_CACHEVAR=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags ;; +esac +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are now errors >>>" >&5 +printf "%s\n" "<<< Compiler warnings are now errors >>>" >&6; } +else case e in #( + e) ACSM_ANY_WERROR_FLAG='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler does not support $WERROR_FLAGS >>>" >&5 +printf "%s\n" "<<< Compiler does not support $WERROR_FLAGS >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are just warnings >>>" >&5 +printf "%s\n" "<<< Compiler warnings are just warnings >>>" >&6; } ;; +esac +fi + ;; +esac +fi + + + + + + + # By default we merely enable some of the most common compiler + # warnings, but we can turn on as many warnings as we avoid triggering + # (for library code only, not contrib or external code) by configuring + # with --enable-paranoid-warnings + # Check whether --enable-paranoid-warnings was given. +if test ${enable_paranoid_warnings+y} +then : + enableval=$enable_paranoid_warnings; case "${enableval}" in #( + yes) : + acsm_enableparanoid=yes ;; #( + no) : + acsm_enableparanoid=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-paranoid-warnings" "$LINENO" 5 ;; +esac +else case e in #( + e) acsm_enableparanoid=no ;; +esac +fi + + + ACSM_ANY_PARANOID_FLAGS=$ACSM_PARANOID_FLAGS + if test "x$acsm_enableparanoid" != "xyes" +then : + ACSM_ANY_PARANOID_FLAGS='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling extra paranoid compiler warnings >>>" >&5 +printf "%s\n" "<<< Disabling extra paranoid compiler warnings >>>" >&6; } +else case e in #( + e) ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $WERROR_FLAGS $PARANOID_FLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Enabled extra paranoid compiler warnings >>>" >&5 +printf "%s\n" "<<< Enabled extra paranoid compiler warnings >>>" >&6; } +else case e in #( + e) ACSM_ANY_PARANOID_FLAGS='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler may not support all of $PARANOID_FLAGS >>>" >&5 +printf "%s\n" "<<< Compiler may not support all of $PARANOID_FLAGS >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling extra paranoid compiler warnings >>>" >&5 +printf "%s\n" "<<< Disabling extra paranoid compiler warnings >>>" >&6; } ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ;; +esac +fi + + + +# -------------------------------------------------------------- +# Test for optional modern C++ features, which libMesh offers shims +# for and/or which libMesh applications may want to selectively use. +# -------------------------------------------------------------- + + have_cxx14_make_unique=no + + # std::make_unique is actually part of the C++14 standard, but some + # compilers might (?) support it via the -std=c++11 flag, or eventually + # with no flag at all. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++14 std::make_unique support" >&5 +printf %s "checking for C++14 std::make_unique support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main (void) +{ + + { + // Normally, you would use "auto" on the LHS here to avoid + // repeating the type name, but we are not testing auto here. + std::unique_ptr up = std::make_unique(42); + } // Foo deleted when up goes out of scope + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_CXX14_MAKE_UNIQUE 1" >>confdefs.h + + have_cxx14_make_unique=yes + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + # Reset the flags + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + if test x$have_cxx14_make_unique == xyes; then + HAVE_CXX14_MAKE_UNIQUE_TRUE= + HAVE_CXX14_MAKE_UNIQUE_FALSE='#' +else + HAVE_CXX14_MAKE_UNIQUE_TRUE='#' + HAVE_CXX14_MAKE_UNIQUE_FALSE= +fi + + + + have_cxx11_regex=no + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::regex support" >&5 +printf %s "checking for C++11 std::regex support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + + if test "$cross_compiling" = yes +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main (void) +{ std::regex integer_regex("(\\\\+|-)?[[:digit:]]+"); std::regex_match("abc", integer_regex); @@ -42425,7 +43599,6 @@ func_stripname_cnf () - # Set options # Check whether --enable-static was given. if test ${enable_static+y} @@ -65875,534 +67048,320 @@ fi # ------------------------------------------------------------- -# Choose between TBB, OpenMP, and pthreads thread models. -# The user can control this by configuring with -# -# --with-thread-model={tbb,pthread,auto,none} -# -# where "auto" will try to automatically detect the best possible -# version (see threads.m4). +# LASPACK iterative solvers -- enabled unless +# --enable-strict-lgpl is specified # ------------------------------------------------------------- - - -# Check whether --with-thread-model was given. -if test ${with_thread_model+y} +if test $enablestrictlgpl = yes then : - withval=$with_thread_model; case "${withval}" in #( - tbb) : - requested_thread_model=tbb ;; #( - pthread) : - requested_thread_model=pthread ;; #( - pthreads) : - requested_thread_model=pthread ;; #( - openmp) : - requested_thread_model=openmp ;; #( - auto) : - requested_thread_model=auto ;; #( - none) : - requested_thread_model=none ;; #( - *) : - as_fn_error $? "bad value ${withval} for --with-thread-model" "$LINENO" 5 ;; -esac -else case e in #( - e) requested_thread_model=auto ;; -esac -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Laspack support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&5 +printf "%s\n" "<<< Laspack support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&6; } + enablelaspack=no; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< User requested thread model: $requested_thread_model >>>" >&5 -printf "%s\n" "<<< User requested thread model: $requested_thread_model >>>" >&6; } +else case e in #( + e) - # Check whether --enable-openmp was given. -if test ${enable_openmp+y} + # Check whether --enable-laspack was given. +if test ${enable_laspack+y} then : - enableval=$enable_openmp; case "${enableval}" in #( + enableval=$enable_laspack; case "${enableval}" in #( yes) : - enableopenmp=yes ;; #( + enablelaspack=yes ;; #( no) : - enableopenmp=no ;; #( + enablelaspack=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-openmp" "$LINENO" 5 ;; -esac -else case e in #( - e) enableopenmp=yes ;; + as_fn_error $? "bad value ${enableval} for --enable-laspack" "$LINENO" 5 ;; esac -fi - - - if test "x$enableopenmp" = "xyes" -then : - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C++ compiler" >&5 -printf %s "checking for OpenMP flag of C++ compiler... " >&6; } -if test ${ax_cv_cxx_openmp+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) saveCXXFLAGS=$CXXFLAGS -ax_cv_cxx_openmp=unknown -# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), -# -qopenmp (icc>=15), -openmp (icc), -# -xopenmp (Sun), -omp (Tru64), -# -qsmp=omp (AIX), -# none -ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" -if test "x$OPENMP_CXXFLAGS" != x; then - ax_openmp_flags="$OPENMP_CXXFLAGS $ax_openmp_flags" -fi -for ax_openmp_flag in $ax_openmp_flags; do - case $ax_openmp_flag in - none) CXXFLAGS=$saveCXX ;; - *) CXXFLAGS="$saveCXXFLAGS $ax_openmp_flag" ;; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -static void -parallel_fill(int * data, int n) -{ - int i; -#pragma omp parallel for - for (i = 0; i < n; ++i) - data[i] = i; -} - -int -main(void) -{ - int arr[100000]; - omp_set_num_threads(2); - parallel_fill(arr, 100000); - return 0; -} - -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - ax_cv_cxx_openmp=$ax_openmp_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -done -CXXFLAGS=$saveCXXFLAGS - ;; + e) enablelaspack=$enableoptional ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_openmp" >&5 -printf "%s\n" "$ax_cv_cxx_openmp" >&6; } -if test "x$ax_cv_cxx_openmp" = "xunknown"; then - enableopenmp=no -else - if test "x$ax_cv_cxx_openmp" != "xnone"; then - OPENMP_CXXFLAGS=$ax_cv_cxx_openmp - fi - -printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h - -fi - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C compiler" >&5 -printf %s "checking for OpenMP flag of C compiler... " >&6; } -if test ${ax_cv_c_openmp+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) saveCFLAGS=$CFLAGS -ax_cv_c_openmp=unknown -# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), -# -qopenmp (icc>=15), -openmp (icc), -# -xopenmp (Sun), -omp (Tru64), -# -qsmp=omp (AIX), -# none -ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" -if test "x$OPENMP_CFLAGS" != x; then - ax_openmp_flags="$OPENMP_CFLAGS $ax_openmp_flags" -fi -for ax_openmp_flag in $ax_openmp_flags; do - case $ax_openmp_flag in - none) CFLAGS=$saveC ;; - *) CFLAGS="$saveCFLAGS $ax_openmp_flag" ;; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -static void -parallel_fill(int * data, int n) -{ - int i; -#pragma omp parallel for - for (i = 0; i < n; ++i) - data[i] = i; -} - -int -main(void) -{ - int arr[100000]; - omp_set_num_threads(2); - parallel_fill(arr, 100000); - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ax_cv_c_openmp=$ax_openmp_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -done -CFLAGS=$saveCFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_openmp" >&5 -printf "%s\n" "$ax_cv_c_openmp" >&6; } -if test "x$ax_cv_c_openmp" = "xunknown"; then - : -else - if test "x$ax_cv_c_openmp" != "xnone"; then - OPENMP_CFLAGS=$ax_cv_c_openmp - fi -printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h + if test "x$enablelaspack" = "xyes" && + (test "x$enabletripleprecision" != "xno" || + test "x$enablequadrupleprecision" != "xno") +then : + enablelaspack=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling LASPACK support due to extended precision >>>" >&5 +printf "%s\n" "<<< Disabling LASPACK support due to extended precision >>>" >&6; } fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - if test "x$enablefortran" = "xyes" + if test "x$enablelaspack" = "xyes" then : - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu + LASPACK_INCLUDE="-I\$(top_srcdir)/contrib/laspack" + LASPACK_LIB="\$(EXTERNAL_LIBDIR)/liblaspack\$(libext)" +printf "%s\n" "#define HAVE_LASPACK 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Laspack support >>>" >&5 +printf "%s\n" "<<< Configuring library with Laspack support >>>" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of Fortran 77 compiler" >&5 -printf %s "checking for OpenMP flag of Fortran 77 compiler... " >&6; } -if test ${ax_cv_f77_openmp+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) saveFFLAGS=$FFLAGS -ax_cv_f77_openmp=unknown -# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), -# -qopenmp (icc>=15), -openmp (icc), -# -xopenmp (Sun), -omp (Tru64), -# -qsmp=omp (AIX), -# none -ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" -if test "x$OPENMP_FFLAGS" != x; then - ax_openmp_flags="$OPENMP_FFLAGS $ax_openmp_flags" + e) + LASPACK_INCLUDE="" + LASPACK_LIB="" + enablelaspack=no + ;; +esac fi -for ax_openmp_flag in $ax_openmp_flags; do - case $ax_openmp_flag in - none) FFLAGS=$saveF ;; - *) FFLAGS="$saveFFLAGS $ax_openmp_flag" ;; - esac - cat > conftest.$ac_ext <<_ACEOF -#include -static void -parallel_fill(int * data, int n) -{ - int i; -#pragma omp parallel for - for (i = 0; i < n; ++i) - data[i] = i; -} -int -main(void) -{ - int arr[100000]; - omp_set_num_threads(2); - parallel_fill(arr, 100000); - return 0; -} -_ACEOF -if ac_fn_f77_try_link "$LINENO" + if test $enablelaspack = yes then : - ax_cv_f77_openmp=$ax_openmp_flag; break + libmesh_contrib_INCLUDES="$LASPACK_INCLUDE $libmesh_contrib_INCLUDES" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -done -FFLAGS=$saveFFLAGS - ;; + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f77_openmp" >&5 -printf "%s\n" "$ax_cv_f77_openmp" >&6; } -if test "x$ax_cv_f77_openmp" = "xunknown"; then - : -else - if test "x$ax_cv_f77_openmp" != "xnone"; then - OPENMP_FFLAGS=$ax_cv_f77_openmp - fi - -printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h + if test x$enablelaspack = xyes; then + LIBMESH_ENABLE_LASPACK_TRUE= + LIBMESH_ENABLE_LASPACK_FALSE='#' +else + LIBMESH_ENABLE_LASPACK_TRUE='#' + LIBMESH_ENABLE_LASPACK_FALSE= fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +ac_config_files="$ac_config_files contrib/laspack/Makefile" +# ------------------------------------------------------------- -fi - if test "x$OPENMP_CFLAGS" != "x" + +# ------------------------------------------------------------- +# Space filling curves -- enabled unless +# --enable-strict-lgpl is specified +# ------------------------------------------------------------- +if test $enablestrictlgpl = yes then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with C OpenMP support >>>" >&5 -printf "%s\n" "<<< Configuring library with C OpenMP support >>>" >&6; } - CFLAGS_OPT="$CFLAGS_OPT $OPENMP_CFLAGS" - CFLAGS_DBG="$CFLAGS_DBG $OPENMP_CFLAGS" - CFLAGS_DEVEL="$CFLAGS_DEVEL $OPENMP_CFLAGS" - CFLAGS_PROF="$CFLAGS_PROF $OPENMP_CFLAGS" - CFLAGS_OPROF="$CFLAGS_OPROF $OPENMP_CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< The space filling curves partitioner is disabled, configure with --disable-strict-lgpl to enable it >>>" >&5 +printf "%s\n" "<<< The space filling curves partitioner is disabled, configure with --disable-strict-lgpl to enable it >>>" >&6; } + enablesfc=no; +else case e in #( + e) + # Check whether --enable-sfc was given. +if test ${enable_sfc+y} +then : + enableval=$enable_sfc; case "${enableval}" in #( + yes) : + enablesfc=yes ;; #( + no) : + enablesfc=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-sfc" "$LINENO" 5 ;; +esac +else case e in #( + e) enablesfc=$enableoptional ;; +esac fi - if test "x$OPENMP_FFLAGS" != "x" + + if test "x$enablesfc" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Fortran OpenMP support >>>" >&5 -printf "%s\n" "<<< Configuring library with Fortran OpenMP support >>>" >&6; } - FFLAGS="$FFLAGS $OPENMP_FFLAGS" + SFC_INCLUDE="-I\$(top_srcdir)/contrib/sfcurves" + SFC_LIB="\$(EXTERNAL_LIBDIR)/libsfcurves\$(libext)" + +printf "%s\n" "#define HAVE_SFCURVES 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with SFC support >>>" >&5 +printf "%s\n" "<<< Configuring library with SFC support >>>" >&6; } +else case e in #( + e) + SFC_INCLUDE="" + SFC_LIB="" + enablesfc=no + ;; +esac fi - if test "x$OPENMP_CXXFLAGS" != "x" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with OpenMP support >>>" >&5 -printf "%s\n" "<<< Configuring library with OpenMP support >>>" >&6; } - CXXFLAGS_OPT="$CXXFLAGS_OPT $OPENMP_CXXFLAGS" - CXXFLAGS_DBG="$CXXFLAGS_DBG $OPENMP_CXXFLAGS" - CXXFLAGS_DEVEL="$CXXFLAGS_DEVEL $OPENMP_CXXFLAGS" - CXXFLAGS_PROF="$CXXFLAGS_PROF $OPENMP_CXXFLAGS" - CXXFLAGS_OPROF="$CXXFLAGS_OPROF $OPENMP_CXXFLAGS" -else case e in #( - e) if test "x$requested_thread_model" = "xopenmp" + if test $enablesfc = yes then : - as_fn_error $? "requested openmp threading model, but C++ compiler does not support openmp." "$LINENO" 5 -fi ;; -esac + libmesh_contrib_INCLUDES="$SFC_INCLUDE $libmesh_contrib_INCLUDES" fi -else case e in #( - e) if test "x$requested_thread_model" = "xopenmp" -then : - as_fn_error $? "requested openmp threading model, but --disable-openmp has been specified." "$LINENO" 5 -fi ;; + ;; esac fi - found_thread_model=none + if test x$enablesfc = xyes; then + LIBMESH_ENABLE_SFC_TRUE= + LIBMESH_ENABLE_SFC_FALSE='#' +else + LIBMESH_ENABLE_SFC_TRUE='#' + LIBMESH_ENABLE_SFC_FALSE= +fi - if test "x$requested_thread_model" = "xpthread" || test "x$requested_thread_model" = "xauto" || test "x$requested_thread_model" = "xopenmp" -then : +ac_config_files="$ac_config_files contrib/sfcurves/Makefile" - # Check whether --enable-pthreads was given. -if test ${enable_pthreads+y} +# ------------------------------------------------------------- + + + +# ------------------------------------------------------------- +# Compressed Streams with gzstream -- enabled by default +# ------------------------------------------------------------- + + # Check whether --enable-gzstreams was given. +if test ${enable_gzstreams+y} then : - enableval=$enable_pthreads; case "${enableval}" in #( + enableval=$enable_gzstreams; case "${enableval}" in #( yes) : - enablepthreads=yes ;; #( + enablegz=yes ;; #( no) : - enablepthreads=no ;; #( + enablegz=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-pthreads" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-gz" "$LINENO" 5 ;; esac else case e in #( - e) enablepthreads=$enableoptional ;; + e) enablegz=$enableoptional ;; esac fi - if test "x$enablepthreads" = "xyes" + if test "x$enablegz" = "xyes" then : + for ac_header in zlib.h +do : + ac_fn_cxx_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = xyes +then : + printf "%s\n" "#define HAVE_ZLIB_H 1" >>confdefs.h + have_zlib_h=yes +fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -printf %s "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 +printf %s "checking for gzopen in -lz... " >&6; } +if test ${ac_cv_lib_z_gzopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (void); +namespace conftest { + extern "C" int gzopen (); +} int main (void) { -return pthread_join (); +return conftest::gzopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_cxx_try_link "$LINENO" then : - ax_pthread_ok=yes + ac_cv_lib_z_gzopen=yes +else case e in #( + e) ac_cv_lib_z_gzopen=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -printf "%s\n" "$ax_pthread_ok" >&6; } - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzopen" >&5 +printf "%s\n" "$ac_cv_lib_z_gzopen" >&6; } +if test "x$ac_cv_lib_z_gzopen" = xyes +then : + have_libz=yes fi -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" +fi -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: + if test "$have_zlib_h" != yes || test "$have_libz" != yes +then : + enablegz=no +fi -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) + if test "x$enablegz" = "xyes" +then : -case ${host_os} in - solaris*) + GZSTREAM_INCLUDE="-I\$(top_srcdir)/contrib/gzstream" + GZSTREAM_LIB="\$(EXTERNAL_LIBDIR)/libgzstream\$(libext) -lz" - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: +printf "%s\n" "#define HAVE_GZSTREAM 1" >>confdefs.h - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with gzstreams support >>>" >&5 +printf "%s\n" "<<< Configuring library with gzstreams support >>>" >&6; } - darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" - ;; +else case e in #( + e) + GZSTREAM_INCLUDE="" + GZSTREAM_LIB="" + ;; esac +fi -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - case $flag in - none) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -printf %s "checking whether pthreads work without any flags... " >&6; } - ;; - -*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 -printf %s "checking whether pthreads work with $flag... " >&6; } - PTHREAD_CFLAGS="$flag" - ;; - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 +if test "$enablegz" = yes +then : + + libmesh_contrib_INCLUDES="$GZSTREAM_INCLUDE $libmesh_contrib_INCLUDES" + libmesh_optional_LIBS="-lz $libmesh_optional_LIBS" + +fi + + if test x$enablegz = xyes; then + LIBMESH_ENABLE_GZSTREAMS_TRUE= + LIBMESH_ENABLE_GZSTREAMS_FALSE='#' +else + LIBMESH_ENABLE_GZSTREAMS_TRUE='#' + LIBMESH_ENABLE_GZSTREAMS_FALSE= +fi + +ac_config_files="$ac_config_files contrib/gzstream/Makefile" + +# ------------------------------------------------------------- + + + +# ------------------------------------------------------------- +# Compressed Files with bzip2 +# ------------------------------------------------------------- +# Check whether --enable-bzip2 was given. +if test ${enable_bzip2+y} +then : + enableval=$enable_bzip2; enablebz2=$enableval +else case e in #( + e) enablebz2=$enableoptional ;; +esac +fi + + +if test "$enablebz2" != no +then : + + # Extract the first word of "bzip2", so it can be a program name with args. +set dummy bzip2; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ax_pthread_config+y} +if test ${ac_cv_prog_BZIP2+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ax_pthread_config"; then - ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. + e) if test -n "$BZIP2"; then + ac_cv_prog_BZIP2="$BZIP2" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -66415,7 +67374,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ax_pthread_config="yes" + ac_cv_prog_BZIP2="bzip2" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -66423,212 +67382,110 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" + test -z "$ac_cv_prog_BZIP2" && ac_cv_prog_BZIP2="none" fi ;; esac fi -ax_pthread_config=$ac_cv_prog_ax_pthread_config -if test -n "$ax_pthread_config"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -printf "%s\n" "$ax_pthread_config" >&6; } +BZIP2=$ac_cv_prog_BZIP2 +if test -n "$BZIP2"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BZIP2" >&5 +printf "%s\n" "$BZIP2" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 -printf %s "checking for the pthreads library -l$flag... " >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; } -int -main (void) -{ -pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + if test "$BZIP2" = bzip2 then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -printf "%s\n" "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = xyes; then - break; - fi - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" + # Extract the first word of "bunzip2", so it can be a program name with args. +set dummy bunzip2; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_BUNZIP2+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$BUNZIP2"; then + ac_cv_prog_BUNZIP2="$BUNZIP2" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_BUNZIP2="bunzip2" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_BUNZIP2" && ac_cv_prog_BUNZIP2="none" +fi ;; +esac +fi +BUNZIP2=$ac_cv_prog_BUNZIP2 +if test -n "$BUNZIP2"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUNZIP2" >&5 +printf "%s\n" "$BUNZIP2" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -# Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -printf %s "checking for joinable pthread attribute... " >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -int attr = $attr; return attr /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + if test "$BUNZIP2" = bunzip2 then : - attr_name=$attr; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 -printf "%s\n" "$attr_name" >&6; } - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then -printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $attr_name" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using bzip2/bunzip2 for writing/reading compressed .bz2 files >>>" >&5 +printf "%s\n" "<<< Using bzip2/bunzip2 for writing/reading compressed .bz2 files >>>" >&6; } - fi +printf "%s\n" "#define HAVE_BZIP 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 -printf %s "checking if more special flags are required for pthreads... " >&6; } - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - flag="-mt -D_REENTRANT" - fi - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 -printf "%s\n" "${flag}" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 -printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } -if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi - #include -int -main (void) -{ -int i = PTHREAD_PRIO_INHERIT; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ax_cv_PTHREAD_PRIO_INHERIT=yes -else case e in #( - e) ax_cv_PTHREAD_PRIO_INHERIT=no ;; -esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 -printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } - if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" -then : +# ------------------------------------------------------------- -printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h +# ------------------------------------------------------------- +# Compressed Files with xz +# ------------------------------------------------------------- +# Check whether --enable-xz was given. +if test ${enable_xz+y} +then : + enableval=$enable_xz; enablexz=$enableval +else case e in #( + e) enablexz=$enableoptional ;; +esac fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then - case $host_os in - aix*) - case "x/$CC" in #( - x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : - #handle absolute path differently from PATH based program lookup - case "x$CC" in #( - x/*) : - if as_fn_executable_p ${CC}_r +if test "$enablexz" != no then : - PTHREAD_CC="${CC}_r" -fi ;; #( - *) : - for ac_prog in ${CC}_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + + # Extract the first word of "xz", so it can be a program name with args. +set dummy xz; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_PTHREAD_CC+y} +if test ${ac_cv_prog_XZ+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. + e) if test -n "$XZ"; then + ac_cv_prog_XZ="$XZ" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -66641,7 +67498,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CC="$ac_prog" + ac_cv_prog_XZ="xz" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -66649,280 +67506,499 @@ done done IFS=$as_save_IFS + test -z "$ac_cv_prog_XZ" && ac_cv_prog_XZ="none" fi ;; esac fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -printf "%s\n" "$PTHREAD_CC" >&6; } +XZ=$ac_cv_prog_XZ +if test -n "$XZ"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XZ" >&5 +printf "%s\n" "$XZ" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - ;; -esac ;; #( - *) : - ;; -esac - ;; - esac - fi -fi + if test "$XZ" = xz +then : -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using xz for writing/reading compressed .xz files >>>" >&5 +printf "%s\n" "<<< Using xz for writing/reading compressed .xz files >>>" >&6; } + +printf "%s\n" "#define HAVE_XZ 1" >>confdefs.h +fi +fi +# ------------------------------------------------------------- -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then -printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h +# ------------------------------------------------------------- +# Tecplot, from source -- enabled by default +# ------------------------------------------------------------- + + # Check whether --enable-tecio was given. +if test ${enable_tecio+y} +then : + enableval=$enable_tecio; case "${enableval}" in #( + yes) : + enabletecio=yes ;; #( + no) : + enabletecio=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-tecio" "$LINENO" 5 ;; +esac +else case e in #( + e) enabletecio=$enableoptional ;; +esac +fi - : -else - ax_pthread_ok=no + +# Check whether --with-tecio-x11-include was given. +if test ${with_tecio_x11_include+y} +then : + withval=$with_tecio_x11_include; withteciox11inc=$withval +else case e in #( + e) withteciox11inc=no ;; +esac fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "x$ax_pthread_ok" = "xyes" + TECIO_CPPFLAGS="" + + if test "x$enabletecio" = "xyes" +then : + + if test "x$withteciox11inc" != "xno" then : + TECIO_CPPFLAGS="-I$withteciox11inc" +fi + if test "x$TECIO_CPPFLAGS" != "x" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Testing X11 headers with $TECIO_CPPFLAGS >>>" >&5 +printf "%s\n" "<<< Testing X11 headers with $TECIO_CPPFLAGS >>>" >&6; } +fi -printf "%s\n" "#define USING_THREADS 1" >>confdefs.h + saved_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$TECIO_CPPFLAGS $CPPFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with pthread support >>>" >&5 -printf "%s\n" "<<< Configuring library with pthread support >>>" >&6; } - libmesh_optional_INCLUDES="$PTHREAD_CFLAGS $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$PTHREAD_LIBS $libmesh_optional_LIBS" - found_thread_model=pthread + ac_fn_cxx_check_header_compile "$LINENO" "X11/Intrinsic.h" "ac_cv_header_X11_Intrinsic_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_Intrinsic_h" = xyes +then : else case e in #( - e) enablepthreads=no ;; + e) enabletecio=no ;; esac fi + + CPPFLAGS=$saved_CPPFLAGS + fi - if test "x$enablepthreads" = "xno" && test "x$requested_thread_model" = "xpthread" + if test "x$enabletecio" = "xyes" then : - as_fn_error $? "requested threading model, pthreads, could not be found." "$LINENO" 5 -fi - if test "x$enablepthreads" = "xno" && test "x$requested_thread_model" = "xopenmp" + + case "${host_os}" in #( + *bsd*) : + TECIO_CPPFLAGS="-DUNIXX $TECIO_CPPFLAGS" + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +printf %s "checking size of void *... " >&6; } +if test ${ac_cv_sizeof_void_p+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" then : - as_fn_error $? "openmp threading model requested, but required pthread support unavailable." "$LINENO" 5 -fi +else case e in #( + e) if test "$ac_cv_type_void_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi ;; +esac +fi + ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } - if test "x$found_thread_model" = "xnone" -then : - if test "x$requested_thread_model" = "xtbb" || test "x$requested_thread_model" = "xauto" + +printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h + + + if test "x$ac_cv_sizeof_void_p" = "x8" +then : + TECIO_CPPFLAGS="-DLONGIS64 $TECIO_CPPFLAGS" +fi ;; #( + *linux*) : + TECIO_CPPFLAGS="-DLINUX $TECIO_CPPFLAGS" + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +printf %s "checking size of void *... " >&6; } +if test ${ac_cv_sizeof_void_p+y} then : + printf %s "(cached) " >&6 +else case e in #( + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_void_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } - # Check whether --enable-tbb was given. -if test ${enable_tbb+y} + +printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h + + + if test "x$ac_cv_sizeof_void_p" = "x8" then : - enableval=$enable_tbb; case "${enableval}" in #( - yes) : - enabletbb=yes ;; #( - no) : - enabletbb=no ;; #( + TECIO_CPPFLAGS="-DLINUX64 $TECIO_CPPFLAGS" +fi ;; #( + *darwin*) : + TECIO_CPPFLAGS="-DDARWIN -DLONGIS64 $TECIO_CPPFLAGS" ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-tbb" "$LINENO" 5 ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Unrecognized TecIO platform, see contrib/tecplot/tecio/Runmake for hints on how to extend <<<" >&5 +printf "%s\n" ">>> Unrecognized TecIO platform, see contrib/tecplot/tecio/Runmake for hints on how to extend <<<" >&6; } ;; esac + + TECIO_INCLUDE="-I\$(top_srcdir)/contrib/tecplot/tecio/include" + +printf "%s\n" "#define HAVE_TECPLOT_API 1" >>confdefs.h + + +printf "%s\n" "#define HAVE_TECPLOT_API_112 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Tecplot TecIO support >>>" >&5 +printf "%s\n" "<<< Configuring library with Tecplot TecIO support >>>" >&6; } + have_tecio=yes + else case e in #( - e) enabletbb=$enableoptional ;; + e) + TECIO_INCLUDE="" + enabletecio=no + have_tecio=no + ;; esac fi - if test "x$enabletbb" = "xyes" -then : -# Check whether --with-tbb was given. -if test ${with_tbb+y} +if test $enabletecio = yes then : - withval=$with_tbb; withtbb=$withval -else case e in #( - e) withtbb=$TBB_DIR ;; -esac + libmesh_contrib_INCLUDES="$TECIO_INCLUDE $libmesh_contrib_INCLUDES" +fi + if test x$enabletecio = xyes; then + LIBMESH_ENABLE_TECIO_TRUE= + LIBMESH_ENABLE_TECIO_FALSE='#' +else + LIBMESH_ENABLE_TECIO_TRUE='#' + LIBMESH_ENABLE_TECIO_FALSE= fi +ac_config_files="$ac_config_files contrib/tecplot/tecio/Makefile" + +# ------------------------------------------------------------- -# Check whether --with-tbb-lib was given. -if test ${with_tbb_lib+y} + +# ------------------------------------------------------------- +# Tecplot, vendor provided libraries -- disabled by default +# ------------------------------------------------------------- + + # Check whether --enable-tecplot was given. +if test ${enable_tecplot+y} then : - withval=$with_tbb_lib; withtbblib=$withval + enableval=$enable_tecplot; case "${enableval}" in #( + yes) : + enabletecplot=yes ;; #( + no) : + enabletecplot=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-tecplot" "$LINENO" 5 ;; +esac else case e in #( - e) withtbblib=$TBB_LIB_PATH ;; + e) enabletecplot=no ;; esac fi - if test "$withtbb" != no + if test "x$enabletecplot" = "xyes" && test "x$enabletecio" = "xyes" then : - if test "x$withtbb" = "x" -then : - withtbb=/usr + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Not using vendor provided tecio libraries, deferring to source build <<<" >&5 +printf "%s\n" ">>> Not using vendor provided tecio libraries, deferring to source build <<<" >&6; } + enabletecplot=no + fi - case $withtbb in - "~/"*) withtbb=$HOME${withtbb#"~"} ;; - esac + if test "x$enabletecplot" = "xyes" +then : - tbb_is_onetbb=no - if test -r $withtbb/include/tbb/version.h + TECPLOT_LIBRARY_PATH="" + if test -r $top_srcdir/contrib/tecplot/binary/lib/$host/tecio.a then : - TBB_INCLUDE_PATH=$withtbb/include - tbb_is_onetbb=yes + TECPLOT_LIBRARY_PATH=$top_srcdir/contrib/tecplot/binary/lib/$host else case e in #( - e) if test -r $withtbb/include/tbb/tbb_stddef.h -then : - TBB_INCLUDE_PATH=$withtbb/include -fi ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring Tecplot failed, no tecio exists for $host <<<" >&5 +printf "%s\n" ">>> Configuring Tecplot failed, no tecio exists for $host <<<" >&6; } + enabletecplot=no + ;; esac fi - if test "x$withtbblib" != "x" + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$top_srcdir/contrib/tecplot/binary/include" + + ac_fn_cxx_check_header_compile "$LINENO" "TECIO.h" "ac_cv_header_TECIO_h" "$ac_includes_default" +if test "x$ac_cv_header_TECIO_h" = xyes then : - TBB_LIBS=$withtbblib -else case e in #( - e) TBB_LIBS=$withtbb/lib ;; -esac + TECPLOT_INCLUDE_PATH=$top_srcdir/contrib/tecplot/binary/include + TECPLOT_INCLUDE="-I\$(top_srcdir)/contrib/tecplot/binary/include" fi + + CPPFLAGS="$old_CPPFLAGS" + + unset old_CPPFLAGS + fi - if test "x$TBB_INCLUDE_PATH" != "x" + if test "x$enabletecplot" = "xyes" then : - TBB_LIBRARY="-L$TBB_LIBS -ltbb -ltbbmalloc" - TBB_INCLUDE=-I$TBB_INCLUDE_PATH + if test -r $TECPLOT_LIBRARY_PATH/tecio.a && test -r $TECPLOT_INCLUDE_PATH/TECIO.h +then : - if test "x$RPATHFLAG" != "x" && test -d $TBB_LIBS + save_CPPFLAGS=$CPPFLAGS + save_LIBS=$LIBS + + CPPFLAGS="-I$TECPLOT_INCLUDE_PATH $CPPFLAGS" + LIBS="$TECPLOT_LIBRARY_PATH/tecio.a $LIBS" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main (void) +{ +int ierr = TECEND112 (); + ; + return 0; +} + +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - TBB_LIBRARY="${RPATHFLAG}${TBB_LIBS} $TBB_LIBRARY" -fi - if test "x$tbb_is_onetbb" = "xyes" + +printf "%s\n" "#define HAVE_TECPLOT_API 1" >>confdefs.h + + +printf "%s\n" "#define HAVE_TECPLOT_API_112 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Tecplot API support (v11.2) >>>" >&5 +printf "%s\n" "<<< Configuring library with Tecplot API support (v11.2) >>>" >&6; } + +else case e in #( + e) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main (void) +{ +int ierr = TECEND (); + ; + return 0; +} + +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - tbbverfile=$TBB_INCLUDE_PATH/tbb/version.h + + +printf "%s\n" "#define HAVE_TECPLOT_API 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with legacy Tecplot API support >>>" >&5 +printf "%s\n" "<<< Configuring library with legacy Tecplot API support >>>" >&6; } + else case e in #( - e) tbbverfile=$TBB_INCLUDE_PATH/tbb/tbb_stddef.h ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: WARNING: Found $TECPLOT_LIBRARY_PATH/tecio.a but cannot link with it! " >&5 +printf "%s\n" "WARNING: Found $TECPLOT_LIBRARY_PATH/tecio.a but cannot link with it! " >&6; } + enabletecplot=no + ;; esac fi - tbbmajor=`grep "define TBB_VERSION_MAJOR" $tbbverfile | sed -e "s/#define TBB_VERSION_MAJOR[ ]*//g"` - tbbminor=`grep "define TBB_VERSION_MINOR" $tbbverfile | sed -e "s/#define TBB_VERSION_MINOR[ ]*//g"` +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + LIBS=$save_LIBS + CPPFLAGS=$save_CPPFLAGS else case e in #( - e) enabletbb=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring Tecplot failed, could not find at least one of tecio.a or TECIO.h <<<" >&5 +printf "%s\n" ">>> Configuring Tecplot failed, could not find at least one of tecio.a or TECIO.h <<<" >&6; } + enabletecplot=no + ;; esac fi - if test "x$enabletbb" != "xno" +fi + +if test $enabletecplot = yes then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TBB support" >&5 -printf %s "checking for TBB support... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + libmesh_contrib_INCLUDES="$TECPLOT_INCLUDE $libmesh_contrib_INCLUDES" + libmesh_installed_LIBS="$libmesh_installed_LIBS -ltecio_vendor" +fi + if test x$enabletecplot = xyes; then + LIBMESH_ENABLE_TECPLOT_TRUE= + LIBMESH_ENABLE_TECPLOT_FALSE='#' +else + LIBMESH_ENABLE_TECPLOT_TRUE='#' + LIBMESH_ENABLE_TECPLOT_FALSE= +fi - saveCXXFLAGS="$CXXFLAGS" - CXXFLAGS="$saveCXXFLAGS $TBB_INCLUDE" +ac_config_files="$ac_config_files contrib/tecplot/binary/Makefile" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# ------------------------------------------------------------- - #include -int -main (void) -{ - tbb::blocked_range r(0, 1); - (void)r.size(); +# ------------------------------------------------------------- +# Metis Partitioning -- enabled by default +# ------------------------------------------------------------- - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + # Check whether --enable-metis was given. +if test ${enable_metis+y} then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - enabletbb=yes - + enableval=$enable_metis; case "${enableval}" in #( + yes) : + enablemetis=yes ;; #( + no) : + enablemetis=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-metis" "$LINENO" 5 ;; +esac else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - enabletbb=no - ;; + e) enablemetis=$enableoptional ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CXXFLAGS=$saveCXXFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +# Check whether --with-metis was given. +if test ${with_metis+y} +then : + withval=$with_metis; case "${withval}" in #( + internal) : + build_metis=yes ;; #( + PETSc) : + build_metis=petsc ;; #( + *) : + METIS_LIB="-L${withval} -lmetis" + build_metis=no ;; +esac + enablemetis=yes +else case e in #( + e) build_metis=yes ;; +esac fi - if test "x$enabletbb" != "xno" -then : -printf "%s\n" "#define DETECTED_TBB_VERSION_MAJOR $tbbmajor" >>confdefs.h +# Check whether --with-metis-include was given. +if test ${with_metis_include+y} +then : + withval=$with_metis_include; METIS_INCLUDE="-I${withval}" + enablemetis=yes + build_metis=no +fi -printf "%s\n" "#define DETECTED_TBB_VERSION_MINOR $tbbminor" >>confdefs.h + if test "x$enablepetsc" = "xno" && test "x$build_metis" = "xpetsc" +then : + as_fn_error $? "--with-metis=PETSc cannot be used without a working copy of PETSc." "$LINENO" 5 +fi - if test "x$tbb_is_onetbb" = "xyes" + if test "x$petsc_have_metis" != "x" && test $petsc_have_metis -gt 0 then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using PETSc Metis support to avoid PETSc conflict>>>" >&5 +printf "%s\n" "<<< Using PETSc Metis support to avoid PETSc conflict>>>" >&6; } + build_metis=petsc +fi -printf "%s\n" "#define HAVE_ONETBB 1" >>confdefs.h + if test "$enablemetis" = "yes" && test "$build_metis" = "petsc" +then : + if test "x$petsc_have_metis" = "x0" || test "$enablepetsc" = "no" +then : + build_metis=yes fi +fi + if test "$enablemetis" = "yes" +then : + if test "$build_metis" = "yes" +then : -printf "%s\n" "#define USING_THREADS 1" >>confdefs.h + METIS_INCLUDE="-I\$(top_srcdir)/contrib/metis/include" + METIS_LIB="" # contrib Metis gets lumped into libcontrib +fi -printf "%s\n" "#define HAVE_TBB_API 1" >>confdefs.h +printf "%s\n" "#define HAVE_METIS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Intel TBB threading support >>>" >&5 -printf "%s\n" "<<< Configuring library with Intel TBB threading support >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Metis support >>>" >&5 +printf "%s\n" "<<< Configuring library with Metis support >>>" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 @@ -66979,351 +68055,235 @@ esac fi +else case e in #( + e) + METIS_INCLUDE="" + METIS_LIB="" + enablemetis=no + ;; +esac fi - + if test x$build_metis = xyes; then + BUILD_METIS_TRUE= + BUILD_METIS_FALSE='#' +else + BUILD_METIS_TRUE='#' + BUILD_METIS_FALSE= fi - if test "x$enabletbb" = "xyes" -then : - libmesh_optional_INCLUDES="$TBB_INCLUDE $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$TBB_LIBRARY $libmesh_optional_LIBS" - found_thread_model=tbb -fi - if test "x$enabletbb" = "xno" && test "x$requested_thread_model" = "xtbb" -then : - as_fn_error $? "requested threading model, TBB, could not be found." "$LINENO" 5 -fi +if test $enablemetis = yes +then : + libmesh_contrib_INCLUDES="$METIS_INCLUDE $libmesh_contrib_INCLUDES" + libmesh_optional_LIBS="$METIS_LIB $libmesh_optional_LIBS" fi - + if test x$enablemetis = xyes; then + LIBMESH_ENABLE_METIS_TRUE= + LIBMESH_ENABLE_METIS_FALSE='#' +else + LIBMESH_ENABLE_METIS_TRUE='#' + LIBMESH_ENABLE_METIS_FALSE= fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Found thread model: $found_thread_model >>>" >&5 -printf "%s\n" "<<< Found thread model: $found_thread_model >>>" >&6; } +ac_config_files="$ac_config_files contrib/metis/Makefile" +# ------------------------------------------------------------- # ------------------------------------------------------------- -# LASPACK iterative solvers -- enabled unless -# --enable-strict-lgpl is specified +# Parmetis Partitioning -- enabled by default # ------------------------------------------------------------- -if test $enablestrictlgpl = yes -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Laspack support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&5 -printf "%s\n" "<<< Laspack support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&6; } - enablelaspack=no; - -else case e in #( - e) - # Check whether --enable-laspack was given. -if test ${enable_laspack+y} + # Check whether --enable-parmetis was given. +if test ${enable_parmetis+y} then : - enableval=$enable_laspack; case "${enableval}" in #( + enableval=$enable_parmetis; case "${enableval}" in #( yes) : - enablelaspack=yes ;; #( + enableparmetis=yes ;; #( no) : - enablelaspack=no ;; #( + enableparmetis=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-laspack" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-parmetis" "$LINENO" 5 ;; esac else case e in #( - e) enablelaspack=$enableoptional ;; + e) enableparmetis=$enableoptional ;; esac fi - if test "x$enablelaspack" = "xyes" && - (test "x$enabletripleprecision" != "xno" || - test "x$enablequadrupleprecision" != "xno") -then : - enablelaspack=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling LASPACK support due to extended precision >>>" >&5 -printf "%s\n" "<<< Disabling LASPACK support due to extended precision >>>" >&6; } - -fi - if test "x$enablelaspack" = "xyes" +# Check whether --with-parmetis was given. +if test ${with_parmetis+y} then : - - LASPACK_INCLUDE="-I\$(top_srcdir)/contrib/laspack" - LASPACK_LIB="\$(EXTERNAL_LIBDIR)/liblaspack\$(libext)" - -printf "%s\n" "#define HAVE_LASPACK 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Laspack support >>>" >&5 -printf "%s\n" "<<< Configuring library with Laspack support >>>" >&6; } - + withval=$with_parmetis; case "${withval}" in #( + internal) : + build_parmetis=yes ;; #( + PETSc) : + build_parmetis=petsc ;; #( + *) : + PARMETIS_LIB="-L${withval} -lparmetis" + build_parmetis=no ;; +esac + enableparmetis=yes else case e in #( - e) - LASPACK_INCLUDE="" - LASPACK_LIB="" - enablelaspack=no - ;; + e) build_parmetis=yes ;; esac fi - - if test $enablelaspack = yes +# Check whether --with-parmetis-include was given. +if test ${with_parmetis_include+y} then : - libmesh_contrib_INCLUDES="$LASPACK_INCLUDE $libmesh_contrib_INCLUDES" -fi - ;; -esac -fi - - if test x$enablelaspack = xyes; then - LIBMESH_ENABLE_LASPACK_TRUE= - LIBMESH_ENABLE_LASPACK_FALSE='#' -else - LIBMESH_ENABLE_LASPACK_TRUE='#' - LIBMESH_ENABLE_LASPACK_FALSE= + withval=$with_parmetis_include; PARMETIS_INCLUDE="-I${withval}" + enableparmetis=yes + build_parmetis=no fi -ac_config_files="$ac_config_files contrib/laspack/Makefile" - -# ------------------------------------------------------------- - - -# ------------------------------------------------------------- -# Space filling curves -- enabled unless -# --enable-strict-lgpl is specified -# ------------------------------------------------------------- -if test $enablestrictlgpl = yes + if test "x$enablepetsc" = "xno" && test "x$build_parmetis" = "xpetsc" then : + as_fn_error $? "--with-parmetis=PETSc cannot be used without a working copy of PETSc." "$LINENO" 5 +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< The space filling curves partitioner is disabled, configure with --disable-strict-lgpl to enable it >>>" >&5 -printf "%s\n" "<<< The space filling curves partitioner is disabled, configure with --disable-strict-lgpl to enable it >>>" >&6; } - enablesfc=no; - -else case e in #( - e) - - # Check whether --enable-sfc was given. -if test ${enable_sfc+y} + if test "x$petsc_have_metis" = "x" then : - enableval=$enable_sfc; case "${enableval}" in #( - yes) : - enablesfc=yes ;; #( - no) : - enablesfc=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-sfc" "$LINENO" 5 ;; -esac -else case e in #( - e) enablesfc=$enableoptional ;; -esac + petsc_have_metis=0 fi - - - if test "x$enablesfc" = "xyes" + if test "x$petsc_have_parmetis" = "x" then : + petsc_have_parmetis=0 +fi - SFC_INCLUDE="-I\$(top_srcdir)/contrib/sfcurves" - SFC_LIB="\$(EXTERNAL_LIBDIR)/libsfcurves\$(libext)" - -printf "%s\n" "#define HAVE_SFCURVES 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with SFC support >>>" >&5 -printf "%s\n" "<<< Configuring library with SFC support >>>" >&6; } + if test $petsc_have_metis -gt 0 +then : + if test $petsc_have_parmetis -gt 0 +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using PETSc ParMETIS support to avoid PETSc conflict>>>" >&5 +printf "%s\n" "<<< Using PETSc ParMETIS support to avoid PETSc conflict>>>" >&6; } + build_parmetis=petsc else case e in #( - e) - SFC_INCLUDE="" - SFC_LIB="" - enablesfc=no - ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling ParMETIS support to avoid PETSc conflict>>>" >&5 +printf "%s\n" "<<< Disabling ParMETIS support to avoid PETSc conflict>>>" >&6; } + enableparmetis=no ;; esac fi +fi + if test "$enableparmetis" = "yes" && test "$build_parmetis" = "petsc" +then : - - if test $enablesfc = yes + if test "x$petsc_have_metis" = "x0" && + test "x$petsc_have_parmetis" = "x0" then : - libmesh_contrib_INCLUDES="$SFC_INCLUDE $libmesh_contrib_INCLUDES" + build_parmetis=yes fi - ;; -esac + if test "$enablepetsc" = "no" +then : + build_parmetis=yes fi - if test x$enablesfc = xyes; then - LIBMESH_ENABLE_SFC_TRUE= - LIBMESH_ENABLE_SFC_FALSE='#' -else - LIBMESH_ENABLE_SFC_TRUE='#' - LIBMESH_ENABLE_SFC_FALSE= fi -ac_config_files="$ac_config_files contrib/sfcurves/Makefile" + if test "x$enablempi" = "xno" +then : + enableparmetis=no +fi -# ------------------------------------------------------------- + if test "x$enableparmetis" = "xyes" +then : +printf "%s\n" "#define HAVE_PARMETIS 1" >>confdefs.h -# ------------------------------------------------------------- -# Compressed Streams with gzstream -- enabled by default -# ------------------------------------------------------------- - # Check whether --enable-gzstreams was given. -if test ${enable_gzstreams+y} + if test "$build_parmetis" = "yes" then : - enableval=$enable_gzstreams; case "${enableval}" in #( - yes) : - enablegz=yes ;; #( - no) : - enablegz=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-gz" "$LINENO" 5 ;; -esac -else case e in #( - e) enablegz=$enableoptional ;; -esac -fi + PARMETIS_INCLUDE="-I\$(top_srcdir)/contrib/parmetis/include" + PARMETIS_LIB="" # contrib Parmetis gets lumped into libcontrib + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with internal Parmetis support >>>" >&5 +printf "%s\n" "<<< Configuring library with internal Parmetis support >>>" >&6; } - if test "x$enablegz" = "xyes" -then : - - for ac_header in zlib.h -do : - ac_fn_cxx_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes +elif test "$build_parmetis" = "petsc" then : - printf "%s\n" "#define HAVE_ZLIB_H 1" >>confdefs.h - have_zlib_h=yes -fi -done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 -printf %s "checking for gzopen in -lz... " >&6; } -if test ${ac_cv_lib_z_gzopen+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + PARMETIS_INCLUDE="" + PARMETIS_LIB="" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with PETSc Parmetis support >>>" >&5 +printf "%s\n" "<<< Configuring library with PETSc Parmetis support >>>" >&6; } -namespace conftest { - extern "C" int gzopen (); -} -int -main (void) -{ -return conftest::gzopen (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - ac_cv_lib_z_gzopen=yes else case e in #( - e) ac_cv_lib_z_gzopen=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with external Parmetis support >>>" >&5 +printf "%s\n" "<<< Configuring library with external Parmetis support >>>" >&6; } + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzopen" >&5 -printf "%s\n" "$ac_cv_lib_z_gzopen" >&6; } -if test "x$ac_cv_lib_z_gzopen" = xyes -then : - have_libz=yes -fi - - -fi - - if test "$have_zlib_h" != yes || test "$have_libz" != yes -then : - enablegz=no -fi - - if test "x$enablegz" = "xyes" -then : - - GZSTREAM_INCLUDE="-I\$(top_srcdir)/contrib/gzstream" - GZSTREAM_LIB="\$(EXTERNAL_LIBDIR)/libgzstream\$(libext) -lz" - -printf "%s\n" "#define HAVE_GZSTREAM 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with gzstreams support >>>" >&5 -printf "%s\n" "<<< Configuring library with gzstreams support >>>" >&6; } else case e in #( e) - GZSTREAM_INCLUDE="" - GZSTREAM_LIB="" + PARMETIS_INCLUDE="" + PARMETIS_LIB="" + enableparmetis=no + build_parmetis=no ;; esac fi + if test x$build_parmetis = xyes; then + BUILD_PARMETIS_TRUE= + BUILD_PARMETIS_FALSE='#' +else + BUILD_PARMETIS_TRUE='#' + BUILD_PARMETIS_FALSE= +fi -if test "$enablegz" = yes -then : - - libmesh_contrib_INCLUDES="$GZSTREAM_INCLUDE $libmesh_contrib_INCLUDES" - libmesh_optional_LIBS="-lz $libmesh_optional_LIBS" +if test $enableparmetis = yes +then : + libmesh_contrib_INCLUDES="$PARMETIS_INCLUDE $libmesh_contrib_INCLUDES" + libmesh_optional_LIBS="$PARMETIS_LIB $libmesh_optional_LIBS" fi - - if test x$enablegz = xyes; then - LIBMESH_ENABLE_GZSTREAMS_TRUE= - LIBMESH_ENABLE_GZSTREAMS_FALSE='#' + if test x$enableparmetis = xyes; then + LIBMESH_ENABLE_PARMETIS_TRUE= + LIBMESH_ENABLE_PARMETIS_FALSE='#' else - LIBMESH_ENABLE_GZSTREAMS_TRUE='#' - LIBMESH_ENABLE_GZSTREAMS_FALSE= + LIBMESH_ENABLE_PARMETIS_TRUE='#' + LIBMESH_ENABLE_PARMETIS_FALSE= fi -ac_config_files="$ac_config_files contrib/gzstream/Makefile" - -# ------------------------------------------------------------- - - +ac_config_files="$ac_config_files contrib/parmetis/Makefile" # ------------------------------------------------------------- -# Compressed Files with bzip2 -# ------------------------------------------------------------- -# Check whether --enable-bzip2 was given. -if test ${enable_bzip2+y} -then : - enableval=$enable_bzip2; enablebz2=$enableval -else case e in #( - e) enablebz2=$enableoptional ;; -esac -fi -if test "$enablebz2" != no -then : - # Extract the first word of "bzip2", so it can be a program name with args. -set dummy bzip2; ac_word=$2 +# ------------------------------------------------------------- +# Doxygen - look for doxygen (a documentation tool) +# ------------------------------------------------------------- +# Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_BZIP2+y} +if test ${ac_cv_path_DOXYGEN+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$BZIP2"; then - ac_cv_prog_BZIP2="$BZIP2" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + e) case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -67334,7 +68294,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_BZIP2="bzip2" + ac_cv_path_DOXYGEN="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -67342,35 +68302,38 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_BZIP2" && ac_cv_prog_BZIP2="none" -fi ;; + ;; +esac ;; esac fi -BZIP2=$ac_cv_prog_BZIP2 -if test -n "$BZIP2"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BZIP2" >&5 -printf "%s\n" "$BZIP2" >&6; } +DOXYGEN=$ac_cv_path_DOXYGEN +if test -n "$DOXYGEN"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +printf "%s\n" "$DOXYGEN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test "$BZIP2" = bzip2 + +if test "x$DOXYGEN" != x then : - # Extract the first word of "bunzip2", so it can be a program name with args. -set dummy bunzip2; ac_word=$2 + # Extract the first word of "dot", so it can be a program name with args. +set dummy dot; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_BUNZIP2+y} +if test ${ac_cv_path_DOT+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$BUNZIP2"; then - ac_cv_prog_BUNZIP2="$BUNZIP2" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + e) case $DOT in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOT="$DOT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -67381,7 +68344,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_BUNZIP2="bunzip2" + ac_cv_path_DOT="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -67389,287 +68352,550 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_BUNZIP2" && ac_cv_prog_BUNZIP2="none" -fi ;; + ;; +esac ;; esac fi -BUNZIP2=$ac_cv_prog_BUNZIP2 -if test -n "$BUNZIP2"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUNZIP2" >&5 -printf "%s\n" "$BUNZIP2" >&6; } +DOT=$ac_cv_path_DOT +if test -n "$DOT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5 +printf "%s\n" "$DOT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test "$BUNZIP2" = bunzip2 + HAVE_DOT=NO + if test "x$DOT" != x then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using bzip2/bunzip2 for writing/reading compressed .bz2 files >>>" >&5 -printf "%s\n" "<<< Using bzip2/bunzip2 for writing/reading compressed .bz2 files >>>" >&6; } + HAVE_DOT=YES + DOTPATH=$PWD/doc -printf "%s\n" "#define HAVE_BZIP 1" >>confdefs.h fi -fi fi # ------------------------------------------------------------- + # ------------------------------------------------------------- -# Compressed Files with xz +# poly2tri -- enabled by default # ------------------------------------------------------------- -# Check whether --enable-xz was given. -if test ${enable_xz+y} + + # Check whether --enable-poly2tri was given. +if test ${enable_poly2tri+y} then : - enableval=$enable_xz; enablexz=$enableval + enableval=$enable_poly2tri; case "${enableval}" in #( + yes) : + enablepoly2tri=yes ;; #( + no) : + enablepoly2tri=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-poly2tri" "$LINENO" 5 ;; +esac else case e in #( - e) enablexz=$enableoptional ;; + e) enablepoly2tri=$enableoptional ;; esac fi + # if unspecified, depend on enableoptional + POLY2TRI_INCLUDE="" -if test "$enablexz" != no + if test "x$enablepoly2tri" = "xyes" then : - # Extract the first word of "xz", so it can be a program name with args. -set dummy xz; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_XZ+y} + POLY2TRI_INCLUDE="-I\$(top_builddir)/contrib/poly2tri/modified" + +printf "%s\n" "#define HAVE_POLY2TRI 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with poly2tri support >>>" >&5 +printf "%s\n" "<<< Configuring library with poly2tri support >>>" >&6; } + +fi + +if test $enablepoly2tri = yes then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$XZ"; then - ac_cv_prog_XZ="$XZ" # Let the user override the test. + libmesh_contrib_INCLUDES="$POLY2TRI_INCLUDE $libmesh_contrib_INCLUDES" +fi + if test x$enablepoly2tri = xyes; then + LIBMESH_ENABLE_POLY2TRI_TRUE= + LIBMESH_ENABLE_POLY2TRI_FALSE='#' else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_XZ="xz" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + LIBMESH_ENABLE_POLY2TRI_TRUE='#' + LIBMESH_ENABLE_POLY2TRI_FALSE= +fi - test -z "$ac_cv_prog_XZ" && ac_cv_prog_XZ="none" -fi ;; +ac_config_files="$ac_config_files contrib/poly2tri/modified/Makefile" + +# ------------------------------------------------------------- + + + +# ------------------------------------------------------------- +# NetGen -- disabled unless --enable-netgen is specified +# +# The license is fine, but our interface is still experimental +# ------------------------------------------------------------- + + # Check whether --enable-netgen was given. +if test ${enable_netgen+y} +then : + enableval=$enable_netgen; case "${enableval}" in #( + yes) : + enablenetgen=yes ;; #( + no) : + enablenetgen=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-netgen" "$LINENO" 5 ;; +esac +else case e in #( + e) enablenetgen=$enableoptional ;; esac fi -XZ=$ac_cv_prog_XZ -if test -n "$XZ"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XZ" >&5 -printf "%s\n" "$XZ" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + + + # Check whether --enable-netgen-required was given. +if test ${enable_netgen_required+y} +then : + enableval=$enable_netgen_required; case "${enableval}" in #( + yes) : + enablenetgenrequired=yes + enablenetgen=yes ;; #( + no) : + enablenetgenrequired=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-netgen-required" "$LINENO" 5 ;; +esac +else case e in #( + e) enablenetgenrequired=no ;; +esac fi - if test "$XZ" = xz + NETGEN_INCLUDE="" + NETGEN_LIBS="" + NETGEN_BUILD_LDFLAGS="" + if test "x$enablenetgen" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using xz for writing/reading compressed .xz files >>>" >&5 -printf "%s\n" "<<< Using xz for writing/reading compressed .xz files >>>" >&6; } + if test "x$acsm_enableglibcxxdebugging" = "xyes" +then : + if test "x$METHODS" != "xdbg" +then : + as_fn_error $? "If enabling glibcxx debugging and using netgen, only a single method 'dbg' method can be used in 'METHODS', but instead $METHODS was used" "$LINENO" 5 +fi + NETGEN_CXXFLAGS="$NETGEN_CXXFLAGS -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC" +fi + my_top_srcdir="$(cd $srcdir && pwd)" + + my_top_builddir="$(pwd)" + + rm -f contrib/netgen/.buildstamp + rm -rf contrib/netgen/build + mkdir -p contrib/netgen/build + + mkdir -p contrib/netgen/install + + if (cd contrib/netgen/build && \ + cmake -DUSE_NATIVE_ARCH=OFF -DUSE_PYTHON=OFF -DUSE_GUI=OFF -DUSE_OCC=OFF -DCMAKE_CXX_FLAGS="$NETGEN_CXXFLAGS" -DCMAKE_INSTALL_PREFIX:PATH=$my_top_builddir/contrib/netgen/install \ + $my_top_srcdir/contrib/netgen/netgen) +then : + + NETGEN_INCLUDE="-I\$(top_srcdir)/contrib/netgen/ -I\$(top_builddir)/contrib/netgen/build/" + NETGEN_LIBS="-lnglib -lngcore" + if test "x$GCC" = "xyes" +then : + if test "$($CC -dumpversion | cut -d'.' -f1)" = "8" +then : + NETGEN_LIBS="$NETGEN_LIBS -lstdc++fs" +fi +fi + NETGEN_BUILD_LDFLAGS="-L\$(abs_top_builddir)/contrib/netgen/build/netgen/ -L\$(abs_top_builddir)/contrib/netgen/build/netgen/libsrc/core/" + if test "x$RPATHFLAG" != "x" +then : + NETGEN_BUILD_LDFLAGS="$NETGEN_BUILD_LDFLAGS ${RPATHFLAG}\$(abs_top_builddir)/contrib/netgen/build/netgen/ ${RPATHFLAG}\$(abs_top_builddir)/contrib/netgen/build/netgen/libsrc/core/" +fi; + +printf "%s\n" "#define HAVE_NETGEN 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Netgen support >>>" >&5 +printf "%s\n" "<<< Configuring library with Netgen support >>>" >&6; } + +else case e in #( + e) + if test "x$enablenetgenrequired" = "xyes" +then : + as_fn_error $? "<<< Failed cmake configuration of user-required Netgen submodule >>>" "$LINENO" 5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Failed cmake configuration of Netgen submodule >>>" >&5 +printf "%s\n" "<<< Failed cmake configuration of Netgen submodule >>>" >&6; } ;; +esac +fi + + enablenetgen=no + ;; +esac +fi + +else case e in #( + e) + enablenetgen=no + ;; +esac +fi + -printf "%s\n" "#define HAVE_XZ 1" >>confdefs.h + +if test $enablenetgen = yes +then : + libmesh_contrib_INCLUDES="$NETGEN_INCLUDE $libmesh_contrib_INCLUDES" + libmesh_contrib_LDFLAGS="$NETGEN_BUILD_LDFLAGS $libmesh_contrib_LDFLAGS" + libmesh_optional_LIBS="$NETGEN_LIBS $libmesh_optional_LIBS" + fi + if test x$enablenetgen = xyes; then + LIBMESH_ENABLE_NETGEN_TRUE= + LIBMESH_ENABLE_NETGEN_FALSE='#' +else + LIBMESH_ENABLE_NETGEN_TRUE='#' + LIBMESH_ENABLE_NETGEN_FALSE= fi + +ac_config_files="$ac_config_files contrib/netgen/Makefile" + # ------------------------------------------------------------- + + + # ------------------------------------------------------------- -# Tecplot, from source -- enabled by default +# TetGen -- enabled unless --enable-strict-lgpl is specified # ------------------------------------------------------------- +if test $enablestrictlgpl = yes +then : - # Check whether --enable-tecio was given. -if test ${enable_tecio+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Tetgen support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&5 +printf "%s\n" "<<< Tetgen support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&6; } + enabletetgen=no; + +else case e in #( + e) + + # Check whether --enable-tetgen was given. +if test ${enable_tetgen+y} then : - enableval=$enable_tecio; case "${enableval}" in #( + enableval=$enable_tetgen; case "${enableval}" in #( yes) : - enabletecio=yes ;; #( + enabletetgen=yes ;; #( no) : - enabletecio=no ;; #( + enabletetgen=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-tecio" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-tetgen" "$LINENO" 5 ;; esac else case e in #( - e) enabletecio=$enableoptional ;; + e) enabletetgen=$enableoptional ;; esac fi - -# Check whether --with-tecio-x11-include was given. -if test ${with_tecio_x11_include+y} + if test "x$enabletetgen" = "xyes" then : - withval=$with_tecio_x11_include; withteciox11inc=$withval + + TETGEN_INCLUDE="-I\$(top_srcdir)/contrib/tetgen" + TETGEN_LIBRARY="\$(EXTERNAL_LIBDIR)/libtetgen\$(libext)" + +printf "%s\n" "#define HAVE_TETGEN 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Tetgen support >>>" >&5 +printf "%s\n" "<<< Configuring library with Tetgen support >>>" >&6; } + else case e in #( - e) withteciox11inc=no ;; + e) + TETGEN_INCLUDE="" + TETGEN_LIBRARY="" + enabletetgen=no + ;; esac fi - TECIO_CPPFLAGS="" - if test "x$enabletecio" = "xyes" -then : - if test "x$withteciox11inc" != "xno" + if test $enabletetgen = yes then : - TECIO_CPPFLAGS="-I$withteciox11inc" + libmesh_contrib_INCLUDES="$TETGEN_INCLUDE $libmesh_contrib_INCLUDES" +fi + ;; +esac fi - if test "x$TECIO_CPPFLAGS" != "x" + if test x$enabletetgen = xyes; then + LIBMESH_ENABLE_TETGEN_TRUE= + LIBMESH_ENABLE_TETGEN_FALSE='#' +else + LIBMESH_ENABLE_TETGEN_TRUE='#' + LIBMESH_ENABLE_TETGEN_FALSE= +fi + +ac_config_files="$ac_config_files contrib/tetgen/Makefile" + +# ------------------------------------------------------------- + + + +# ------------------------------------------------------------- +# Triangle -- enabled unless --enable-strict-lgpl is specified +# ------------------------------------------------------------- +if test $enablestrictlgpl = yes then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Testing X11 headers with $TECIO_CPPFLAGS >>>" >&5 -printf "%s\n" "<<< Testing X11 headers with $TECIO_CPPFLAGS >>>" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Triangle meshing support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&5 +printf "%s\n" "<<< Triangle meshing support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&6; } + enabletriangle=no; + +else case e in #( + e) + + # Check whether --enable-triangle was given. +if test ${enable_triangle+y} +then : + enableval=$enable_triangle; case "${enableval}" in #( + yes) : + enabletriangle=yes ;; #( + no) : + enabletriangle=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-triangle" "$LINENO" 5 ;; +esac +else case e in #( + e) enabletriangle=$enableoptional ;; +esac fi - saved_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$TECIO_CPPFLAGS $CPPFLAGS" - ac_fn_cxx_check_header_compile "$LINENO" "X11/Intrinsic.h" "ac_cv_header_X11_Intrinsic_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Intrinsic_h" = xyes + if test "x$enabletriangle" = "xyes" && + (test "x$enabletripleprecision" != "xno" || + test "x$enablequadrupleprecision" != "xno") +then : + enabletriangle=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling Triangle support due to extended precision >>>" >&5 +printf "%s\n" "<<< Disabling Triangle support due to extended precision >>>" >&6; } + +fi + + if test "x$enabletriangle" = "xyes" then : + TRIANGLE_INCLUDE="-I\$(top_srcdir)/contrib/triangle" + TRIANGLE_LIBRARY="\$(EXTERNAL_LIBDIR)/libtriangle\$(libext)" + +printf "%s\n" "#define HAVE_TRIANGLE 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Triangle support >>>" >&5 +printf "%s\n" "<<< Configuring library with Triangle support >>>" >&6; } + else case e in #( - e) enabletecio=no ;; + e) + TRIANGLE_INCLUDE="" + TRIANGLE_LIBRARY="" + enabletriangle=no + ;; esac fi - CPPFLAGS=$saved_CPPFLAGS + + if test $enabletriangle = yes +then : + libmesh_contrib_INCLUDES="$TRIANGLE_INCLUDE $libmesh_contrib_INCLUDES" +fi + ;; +esac fi - if test "x$enabletecio" = "xyes" + if test x$enabletriangle = xyes; then + LIBMESH_ENABLE_TRIANGLE_TRUE= + LIBMESH_ENABLE_TRIANGLE_FALSE='#' +else + LIBMESH_ENABLE_TRIANGLE_TRUE='#' + LIBMESH_ENABLE_TRIANGLE_FALSE= +fi + +ac_config_files="$ac_config_files contrib/triangle/Makefile" + +# ------------------------------------------------------------- + + + +# ------------------------------------------------------------- +# Qhull -- enabled by default +# ------------------------------------------------------------- + + # Check whether --enable-qhull was given. +if test ${enable_qhull+y} +then : + enableval=$enable_qhull; case "${enableval}" in #( + yes) : + enableqhull=yes ;; #( + no) : + enableqhull=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-qhull" "$LINENO" 5 ;; +esac +else case e in #( + e) enableqhull=$enableoptional ;; +esac +fi + # if unspecified, depend on enableoptional + + # Check whether --enable-qhull-required was given. +if test ${enable_qhull_required+y} then : + enableval=$enable_qhull_required; case "${enableval}" in #( + yes) : + enableqhullrequired=yes + enableqhull=yes ;; #( + no) : + enableqhullrequired=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-qhull-required" "$LINENO" 5 ;; +esac +else case e in #( + e) enableqhullrequired=no ;; +esac +fi - case "${host_os}" in #( - *bsd*) : - TECIO_CPPFLAGS="-DUNIXX $TECIO_CPPFLAGS" - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -printf %s "checking size of void *... " >&6; } -if test ${ac_cv_sizeof_void_p+y} + + QHULL_INCLUDE="" + QHULL_LIBS="" + QHULL_BUILD_LDFLAGS="" + if test "x$enableqhull" = "xyes" then : - printf %s "(cached) " >&6 + + my_top_srcdir="$(cd $srcdir && pwd)" + + my_top_builddir="$(pwd)" + + rm -f contrib/qhull/.buildstamp + rm -rf contrib/qhull/build + mkdir -p contrib/qhull/build + + mkdir -p contrib/qhull/install + + if (cd contrib/qhull/build && \ + cmake -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DQHULL_ENABLE_TESTING=OFF \ + -DBUILD_APPLICATIONS=OFF \ + -DCMAKE_INSTALL_PREFIX:PATH=$my_top_builddir/contrib/qhull/install \ + $my_top_srcdir/contrib/qhull/qhull) +then : + + QHULL_INCLUDE="-I\$(top_srcdir)/contrib/qhull/qhull/src" + QHULL_LIBS="-lqhullcpp -lqhullstatic_r" + QHULL_BUILD_LDFLAGS="-L\$(abs_top_builddir)/contrib/qhull/build/" + +printf "%s\n" "#define HAVE_QHULL_API 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Qhull support >>>" >&5 +printf "%s\n" "<<< Configuring library with Qhull support >>>" >&6; } + else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" + e) + if test "x$enableqhullrequired" = "xyes" then : - + as_fn_error $? "<<< Failed cmake configuration of user-required Qhull submodule >>>" "$LINENO" 5 else case e in #( - e) if test "$ac_cv_type_void_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Failed cmake configuration of Qhull submodule >>>" >&5 +printf "%s\n" "<<< Failed cmake configuration of Qhull submodule >>>" >&6; } ;; esac fi - ;; + + enableqhull=no + ;; +esac +fi + +else case e in #( + e) + enableqhull=no + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } -printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h - if test "x$ac_cv_sizeof_void_p" = "x8" -then : - TECIO_CPPFLAGS="-DLONGIS64 $TECIO_CPPFLAGS" -fi ;; #( - *linux*) : - TECIO_CPPFLAGS="-DLINUX $TECIO_CPPFLAGS" - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -printf %s "checking size of void *... " >&6; } -if test ${ac_cv_sizeof_void_p+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" +if test $enableqhull = yes then : + libmesh_contrib_INCLUDES="$QHULL_INCLUDE $libmesh_contrib_INCLUDES" + libmesh_contrib_LDFLAGS="$QHULL_BUILD_LDFLAGS $libmesh_contrib_LDFLAGS" + libmesh_optional_LIBS="$QHULL_LIBS $libmesh_optional_LIBS" -else case e in #( - e) if test "$ac_cv_type_void_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi ;; -esac fi - ;; -esac + if test x$enableqhull = xyes; then + LIBMESH_ENABLE_QHULL_TRUE= + LIBMESH_ENABLE_QHULL_FALSE='#' +else + LIBMESH_ENABLE_QHULL_TRUE='#' + LIBMESH_ENABLE_QHULL_FALSE= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } +ac_config_files="$ac_config_files contrib/qhull/Makefile" +# ------------------------------------------------------------- -printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h - if test "x$ac_cv_sizeof_void_p" = "x8" +# ------------------------------------------------------------- +# GMV -- file I/O API is enabled by default (it is distributed in contrib) +# ------------------------------------------------------------- + + # Check whether --enable-gmv was given. +if test ${enable_gmv+y} then : - TECIO_CPPFLAGS="-DLINUX64 $TECIO_CPPFLAGS" -fi ;; #( - *darwin*) : - TECIO_CPPFLAGS="-DDARWIN -DLONGIS64 $TECIO_CPPFLAGS" ;; #( + enableval=$enable_gmv; case "${enableval}" in #( + yes) : + enablegmv=yes ;; #( + no) : + enablegmv=no ;; #( *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Unrecognized TecIO platform, see contrib/tecplot/tecio/Runmake for hints on how to extend <<<" >&5 -printf "%s\n" ">>> Unrecognized TecIO platform, see contrib/tecplot/tecio/Runmake for hints on how to extend <<<" >&6; } ;; + as_fn_error $? "bad value ${enableval} for --enable-gmv" "$LINENO" 5 ;; +esac +else case e in #( + e) enablegmv=$enableoptional ;; esac +fi - TECIO_INCLUDE="-I\$(top_srcdir)/contrib/tecplot/tecio/include" -printf "%s\n" "#define HAVE_TECPLOT_API 1" >>confdefs.h + if test "x$enablegmv" = "xyes" +then : + GMV_INCLUDE="-I\$(top_srcdir)/contrib/gmv" + GMV_LIBRARY="\$(EXTERNAL_LIBDIR)/libgmv\$(libext)" -printf "%s\n" "#define HAVE_TECPLOT_API_112 1" >>confdefs.h +printf "%s\n" "#define HAVE_GMV 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Tecplot TecIO support >>>" >&5 -printf "%s\n" "<<< Configuring library with Tecplot TecIO support >>>" >&6; } - have_tecio=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with GMV support >>>" >&5 +printf "%s\n" "<<< Configuring library with GMV support >>>" >&6; } else case e in #( e) - TECIO_INCLUDE="" - enabletecio=no - have_tecio=no + GMV_INCLUDE="" + GMV_LIBRARY="" + enablegmv=no ;; esac fi @@ -67677,1660 +68903,1729 @@ fi -if test $enabletecio = yes +if test x$enablegmv = xyes then : - libmesh_contrib_INCLUDES="$TECIO_INCLUDE $libmesh_contrib_INCLUDES" + libmesh_contrib_INCLUDES="$GMV_INCLUDE $libmesh_contrib_INCLUDES" fi - if test x$enabletecio = xyes; then - LIBMESH_ENABLE_TECIO_TRUE= - LIBMESH_ENABLE_TECIO_FALSE='#' + if test x$enablegmv = xyes; then + LIBMESH_ENABLE_GMV_TRUE= + LIBMESH_ENABLE_GMV_FALSE='#' else - LIBMESH_ENABLE_TECIO_TRUE='#' - LIBMESH_ENABLE_TECIO_FALSE= + LIBMESH_ENABLE_GMV_TRUE='#' + LIBMESH_ENABLE_GMV_FALSE= fi -ac_config_files="$ac_config_files contrib/tecplot/tecio/Makefile" +ac_config_files="$ac_config_files contrib/gmv/Makefile" # ------------------------------------------------------------- # ------------------------------------------------------------- -# Tecplot, vendor provided libraries -- disabled by default +# VTK -- Mesh I/O API is enabled by default # ------------------------------------------------------------- - # Check whether --enable-tecplot was given. -if test ${enable_tecplot+y} + + + + # Check whether --enable-vtk was given. +if test ${enable_vtk+y} then : - enableval=$enable_tecplot; case "${enableval}" in #( + enableval=$enable_vtk; case "${enableval}" in #( yes) : - enabletecplot=yes ;; #( + enablevtk=yes ;; #( no) : - enabletecplot=no ;; #( + enablevtk=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-tecplot" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-vtk" "$LINENO" 5 ;; esac else case e in #( - e) enabletecplot=no ;; + e) enablevtk=$enableoptional ;; esac fi - if test "x$enabletecplot" = "xyes" && test "x$enabletecio" = "xyes" + # Check whether --enable-vtk-required was given. +if test ${enable_vtk_required+y} then : + enableval=$enable_vtk_required; case "${enableval}" in #( + yes) : + vtkrequired=yes ;; #( + no) : + vtkrequired=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-vtk-required" "$LINENO" 5 ;; +esac +else case e in #( + e) vtkrequired=no ;; +esac +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Not using vendor provided tecio libraries, deferring to source build <<<" >&5 -printf "%s\n" ">>> Not using vendor provided tecio libraries, deferring to source build <<<" >&6; } - enabletecplot=no + if test "$enablevtk" = "yes" +then : + + if test "x$VTK_DIR" = "x" +then : + VTK_DIR=/usr fi - if test "x$enabletecplot" = "xyes" + VTK_LS_CHECK=$(dirname $(ls -d $VTK_DIR/include/vtk*/vtkConfigure.h $VTK_DIR/include/vtk*/vtkVersionMacros.h 2>/dev/null | tail -n 1) 2>/dev/null) + if test "x$VTK_INC" = "x" then : - TECPLOT_LIBRARY_PATH="" - if test -r $top_srcdir/contrib/tecplot/binary/lib/$host/tecio.a + if test "x$VTK_INCLUDE" != "x" then : - TECPLOT_LIBRARY_PATH=$top_srcdir/contrib/tecplot/binary/lib/$host + if test -d $VTK_INCLUDE +then : + VTK_INC=$VTK_INCLUDE +fi +elif test -d $VTK_LS_CHECK +then : + VTK_INC=$VTK_LS_CHECK +elif test "x$VTK_DIR" != "x" +then : + VTK_INC=$VTK_DIR/include else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring Tecplot failed, no tecio exists for $host <<<" >&5 -printf "%s\n" ">>> Configuring Tecplot failed, no tecio exists for $host <<<" >&6; } - enabletecplot=no - ;; + e) VTK_INC="/usr/include/vtk" ;; esac fi - old_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$top_srcdir/contrib/tecplot/binary/include" +fi - ac_fn_cxx_check_header_compile "$LINENO" "TECIO.h" "ac_cv_header_TECIO_h" "$ac_includes_default" -if test "x$ac_cv_header_TECIO_h" = xyes + if test "x$VTK_LIB" = "x" then : - TECPLOT_INCLUDE_PATH=$top_srcdir/contrib/tecplot/binary/include - TECPLOT_INCLUDE="-I\$(top_srcdir)/contrib/tecplot/binary/include" -fi + if test "x$VTK_DIR" != x +then : + VTK_LIB=$VTK_DIR/lib +else case e in #( + e) VTK_LIB="/usr/lib" ;; +esac +fi - CPPFLAGS="$old_CPPFLAGS" +fi - unset old_CPPFLAGS +# Check whether --with-vtk-include was given. +if test ${with_vtk_include+y} +then : + withval=$with_vtk_include; withvtkinc=$withval +else case e in #( + e) withvtkinc=no ;; +esac fi - if test "x$enabletecplot" = "xyes" -then : - if test -r $TECPLOT_LIBRARY_PATH/tecio.a && test -r $TECPLOT_INCLUDE_PATH/TECIO.h + +# Check whether --with-vtk-lib was given. +if test ${with_vtk_lib+y} then : + withval=$with_vtk_lib; withvtklib=$withval +else case e in #( + e) withvtklib=no ;; +esac +fi - save_CPPFLAGS=$CPPFLAGS - save_LIBS=$LIBS - CPPFLAGS="-I$TECPLOT_INCLUDE_PATH $CPPFLAGS" - LIBS="$TECPLOT_LIBRARY_PATH/tecio.a $LIBS" + if test "$withvtkinc" != "no" +then : + VTK_INC="$withvtkinc" +fi + if test "$withvtklib" != "no" +then : + VTK_LIB="$withvtklib" +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + VTK_INCLUDE="" + VTK_LIBRARY="" - #include -int -main (void) -{ -int ierr = TECEND112 (); - ; - return 0; -} + if test "$enablevtk" = "yes" +then : -_ACEOF -if ac_fn_cxx_try_link "$LINENO" + vtkincFound=no; + ac_vtk_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I${VTK_INC} ${CPPFLAGS}" + for ac_header in vtkConfigure.h +do : + ac_fn_cxx_check_header_compile "$LINENO" "vtkConfigure.h" "ac_cv_header_vtkConfigure_h" "$ac_includes_default" +if test "x$ac_cv_header_vtkConfigure_h" = xyes then : + printf "%s\n" "#define HAVE_VTKCONFIGURE_H 1" >>confdefs.h + vtkincFound=yes +fi +done + for ac_header in vtkVersionMacros.h +do : + ac_fn_cxx_check_header_compile "$LINENO" "vtkVersionMacros.h" "ac_cv_header_vtkVersionMacros_h" "$ac_includes_default" +if test "x$ac_cv_header_vtkVersionMacros_h" = xyes +then : + printf "%s\n" "#define HAVE_VTKVERSIONMACROS_H 1" >>confdefs.h + vtkincFound=yes +fi -printf "%s\n" "#define HAVE_TECPLOT_API 1" >>confdefs.h +done + CPPFLAGS="${ac_vtk_save_CPPFLAGS}" + if test "$vtkincFound" = "no" +then : -printf "%s\n" "#define HAVE_TECPLOT_API_112 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: VTK header files not found!" >&5 +printf "%s\n" "VTK header files not found!" >&6; } + enablevtk=no; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Tecplot API support (v11.2) >>>" >&5 -printf "%s\n" "<<< Configuring library with Tecplot API support (v11.2) >>>" >&6; } +fi -else case e in #( - e) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + if test "x$enablevtk" = "xyes" +then : - #include -int -main (void) -{ -int ierr = TECEND (); - ; - return 0; -} + if test -r $VTK_INC/vtkVersionQuick.h +then : -_ACEOF -if ac_fn_cxx_try_link "$LINENO" + vtkmajor=`grep "define VTK_MAJOR_VERSION" $VTK_INC/vtkVersionQuick.h | sed -e "s/.*#define VTK_MAJOR_VERSION[ ]*//g"` + vtkminor=`grep "define VTK_MINOR_VERSION" $VTK_INC/vtkVersionQuick.h | sed -e "s/.*#define VTK_MINOR_VERSION[ ]*//g"` + vtkbuild=`grep "define VTK_EPOCH_VERSION" $VTK_INC/vtkVersionQuick.h | sed -e "s/.*#define VTK_EPOCH_VERSION[ ]*//g"` + +elif test "x$vtkmajor" = "x" && test -r $VTK_INC/vtkVersionMacros.h then : + vtkmajor=`grep "define VTK_MAJOR_VERSION" $VTK_INC/vtkVersionMacros.h | sed -e "s/.*#define VTK_MAJOR_VERSION[ ]*//g"` + vtkminor=`grep "define VTK_MINOR_VERSION" $VTK_INC/vtkVersionMacros.h | sed -e "s/.*#define VTK_MINOR_VERSION[ ]*//g"` + vtkbuild=`grep "define VTK_BUILD_VERSION" $VTK_INC/vtkVersionMacros.h | sed -e "s/.*#define VTK_BUILD_VERSION[ ]*//g"` -printf "%s\n" "#define HAVE_TECPLOT_API 1" >>confdefs.h +elif test "x$vtkmajor" = "x" && test -r $VTK_INC/vtkConfigure.h +then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with legacy Tecplot API support >>>" >&5 -printf "%s\n" "<<< Configuring library with legacy Tecplot API support >>>" >&6; } + vtkmajor=`grep "define VTK_MAJOR_VERSION" $VTK_INC/vtkConfigure.h | sed -e "s/.*#define VTK_MAJOR_VERSION[ ]*//g"` + vtkminor=`grep "define VTK_MINOR_VERSION" $VTK_INC/vtkConfigure.h | sed -e "s/.*#define VTK_MINOR_VERSION[ ]*//g"` + vtkbuild=`grep "define VTK_BUILD_VERSION" $VTK_INC/vtkConfigure.h | sed -e "s/.*#define VTK_BUILD_VERSION[ ]*//g"` -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: WARNING: Found $TECPLOT_LIBRARY_PATH/tecio.a but cannot link with it! " >&5 -printf "%s\n" "WARNING: Found $TECPLOT_LIBRARY_PATH/tecio.a but cannot link with it! " >&6; } - enabletecplot=no - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - ;; -esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + vtkversion=$vtkmajor.$vtkminor.$vtkbuild + vtkmajorminor=$vtkmajor.$vtkminor - LIBS=$save_LIBS - CPPFLAGS=$save_CPPFLAGS + if test "x$vtkmajor" = "x" || test "x$vtkminor" = "x" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Cannot parse version macro from VTK header files!" >&5 +printf "%s\n" "Cannot parse version macro from VTK header files!" >&6; } + enablevtk=no; -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring Tecplot failed, could not find at least one of tecio.a or TECIO.h <<<" >&5 -printf "%s\n" ">>> Configuring Tecplot failed, could not find at least one of tecio.a or TECIO.h <<<" >&6; } - enabletecplot=no - ;; -esac fi fi -if test $enabletecplot = yes + if test "x$enablevtk" = "xyes" then : - libmesh_contrib_INCLUDES="$TECPLOT_INCLUDE $libmesh_contrib_INCLUDES" - libmesh_installed_LIBS="$libmesh_installed_LIBS -ltecio_vendor" + old_LIBS="$LIBS" + old_CPPFLAGS="$CPPFLAGS" + # If this compiler supports -rpath commands, create a + # variable for them now that can be used in $LIBS below. We + # ran across an issue where GCC's linker actually needed + # -rpath flags in order to *link* a test program. From the + # man page for GNU ld: + # The -rpath option is also used when locating shared objects + # which are needed by shared objects explicitly included in + # the link; see the description of the -rpath-link option. + if test "x$RPATHFLAG" != "x" && test -d $VTK_LIB +then : + VTK_RPATH_FLAGS="${RPATHFLAG}${VTK_LIB}" fi - if test x$enabletecplot = xyes; then - LIBMESH_ENABLE_TECPLOT_TRUE= - LIBMESH_ENABLE_TECPLOT_FALSE='#' -else - LIBMESH_ENABLE_TECPLOT_TRUE='#' - LIBMESH_ENABLE_TECPLOT_FALSE= -fi - -ac_config_files="$ac_config_files contrib/tecplot/binary/Makefile" - -# ------------------------------------------------------------- + if test $vtkmajor -eq 5 +then : + VTK_LIBRARY="-L$VTK_LIB -lvtkIO -lvtkCommon -lvtkFiltering -lvtkImaging -lvtkParallel" +elif test $vtkmajor -eq 6 && test $vtkminor -le 1 +then : + VTK_LIBRARY_WITH_VERSION="-L$VTK_LIB -lvtkIOCore-$vtkmajorminor -lvtkCommonCore-$vtkmajorminor -lvtkCommonDataModel-$vtkmajorminor \ + -lvtkFiltersCore-$vtkmajorminor -lvtkIOXML-$vtkmajorminor -lvtkImagingCore-$vtkmajorminor \ + -lvtkIOImage-$vtkmajorminor -lvtkImagingMath-$vtkmajorminor \ + -lvtkParallelMPI-$vtkmajorminor -lvtkParallelCore-$vtkmajorminor" -# ------------------------------------------------------------- -# Metis Partitioning -- enabled by default -# ------------------------------------------------------------- + VTK_LIBRARY_NO_VERSION="-L$VTK_LIB -lvtkIOCore -lvtkCommonCore -lvtkCommonDataModel \ + -lvtkFiltersCore -lvtkIOXML -lvtkImagingCore \ + -lvtkIOImage -lvtkImagingMath \ + -lvtkParallelMPI -lvtkParallelCore" - # Check whether --enable-metis was given. -if test ${enable_metis+y} -then : - enableval=$enable_metis; case "${enableval}" in #( - yes) : - enablemetis=yes ;; #( - no) : - enablemetis=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-metis" "$LINENO" 5 ;; -esac else case e in #( - e) enablemetis=$enableoptional ;; + e) + VTK_LIBRARY_WITH_VERSION="-L$VTK_LIB -lvtkIOCore-$vtkmajorminor -lvtkCommonCore-$vtkmajorminor -lvtkCommonDataModel-$vtkmajorminor \ + -lvtkFiltersCore-$vtkmajorminor -lvtkIOXML-$vtkmajorminor -lvtkImagingCore-$vtkmajorminor \ + -lvtkIOImage-$vtkmajorminor -lvtkImagingMath-$vtkmajorminor -lvtkIOParallelXML-$vtkmajorminor \ + -lvtkParallelMPI-$vtkmajorminor -lvtkParallelCore-$vtkmajorminor \ + -lvtkCommonExecutionModel-$vtkmajorminor -lvtksys-$vtkmajorminor" + + VTK_LIBRARY_NO_VERSION="-L$VTK_LIB -lvtkIOCore -lvtkCommonCore -lvtkCommonDataModel \ + -lvtkFiltersCore -lvtkIOXML -lvtkImagingCore \ + -lvtkIOImage -lvtkImagingMath -lvtkIOParallelXML \ + -lvtkParallelMPI -lvtkParallelCore \ + -lvtkCommonExecutionModel -lvtksys" + ;; esac fi - - -# Check whether --with-metis was given. -if test ${with_metis+y} + if test $vtkmajor -gt 5 then : - withval=$with_metis; case "${withval}" in #( - internal) : - build_metis=yes ;; #( - PETSc) : - build_metis=petsc ;; #( - *) : - METIS_LIB="-L${withval} -lmetis" - build_metis=no ;; -esac - enablemetis=yes -else case e in #( - e) build_metis=yes ;; -esac -fi + CPPFLAGS="$CPPFLAGS -I$VTK_INC" + LIBS="$old_LIBS $VTK_RPATH_FLAGS $VTK_LIBRARY_NO_VERSION" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include "vtkSmartPointer.h" + #include "vtkCellArray.h" + #include "vtkUnstructuredGrid.h" + #include "vtkPoints.h" + #include "vtkDoubleArray.h" + #include "vtkXMLPUnstructuredGridWriter.h" + #include "vtkImageThreshold.h" + #include "vtkMPIController.h" -# Check whether --with-metis-include was given. -if test ${with_metis_include+y} -then : - withval=$with_metis_include; METIS_INCLUDE="-I${withval}" - enablemetis=yes - build_metis=no -fi +int +main (void) +{ + vtkSmartPointer cells = vtkSmartPointer::New(); + vtkSmartPointer grid = vtkSmartPointer::New(); + vtkSmartPointer points = vtkSmartPointer::New(); + vtkSmartPointer pcoords = vtkSmartPointer::New(); + vtkSmartPointer writer = vtkSmartPointer::New(); + vtkSmartPointer threshold = vtkSmartPointer::New(); + vtkSmartPointer controller = vtkSmartPointer::New(); - if test "x$enablepetsc" = "xno" && test "x$build_metis" = "xpetsc" + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - as_fn_error $? "--with-metis=PETSc cannot be used without a working copy of PETSc." "$LINENO" 5 + enablevtk=yes + VTK_LIBRARY=$VTK_LIBRARY_NO_VERSION +else case e in #( + e) enablevtk=no ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext - if test "x$petsc_have_metis" != "x" && test $petsc_have_metis -gt 0 + if test "x$enablevtk" = "xno" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using PETSc Metis support to avoid PETSc conflict>>>" >&5 -printf "%s\n" "<<< Using PETSc Metis support to avoid PETSc conflict>>>" >&6; } - build_metis=petsc -fi - if test "$enablemetis" = "yes" && test "$build_metis" = "petsc" -then : + LIBS="$old_LIBS $VTK_RPATH_FLAGS $VTK_LIBRARY_WITH_VERSION" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include "vtkSmartPointer.h" + #include "vtkCellArray.h" + #include "vtkUnstructuredGrid.h" + #include "vtkPoints.h" + #include "vtkDoubleArray.h" + #include "vtkXMLPUnstructuredGridWriter.h" + #include "vtkImageThreshold.h" + #include "vtkMPIController.h" + +int +main (void) +{ - if test "x$petsc_have_metis" = "x0" || test "$enablepetsc" = "no" + vtkSmartPointer cells = vtkSmartPointer::New(); + vtkSmartPointer grid = vtkSmartPointer::New(); + vtkSmartPointer points = vtkSmartPointer::New(); + vtkSmartPointer pcoords = vtkSmartPointer::New(); + vtkSmartPointer writer = vtkSmartPointer::New(); + vtkSmartPointer threshold = vtkSmartPointer::New(); + vtkSmartPointer controller = vtkSmartPointer::New(); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - build_metis=yes + enablevtk=yes + VTK_LIBRARY=$VTK_LIBRARY_WITH_VERSION +else case e in #( + e) enablevtk=no ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext fi - if test "$enablemetis" = "yes" -then : - - if test "$build_metis" = "yes" + if test "x$enablevtk" = "xno" then : - METIS_INCLUDE="-I\$(top_srcdir)/contrib/metis/include" - METIS_LIB="" # contrib Metis gets lumped into libcontrib + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Linking a test program against the VTK libraries failed >>>" >&5 +printf "%s\n" "<<< Linking a test program against the VTK libraries failed >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< libMesh requires VTK to be configured with -DVTK_Group_MPI:BOOL=ON >>>" >&5 +printf "%s\n" "<<< libMesh requires VTK to be configured with -DVTK_Group_MPI:BOOL=ON >>>" >&6; } fi -printf "%s\n" "#define HAVE_METIS 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Metis support >>>" >&5 -printf "%s\n" "<<< Configuring library with Metis support >>>" >&6; } - + LIBS="$old_LIBS" + CPPFLAGS="$old_CPPFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 -printf %s "checking for thread local storage (TLS) class... " >&6; } - if test ${ac_cv_tls+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do - case $ax_tls_keyword in #( - none) : - ac_cv_tls=none ; break ;; #( - *) : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + e) + LIBS="$old_LIBS $VTK_RPATH_FLAGS $VTK_LIBRARY" + CPPFLAGS="$CPPFLAGS -I$VTK_INC" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include "vtkSmartPointer.h" + #include "vtkCellArray.h" + #include "vtkUnstructuredGrid.h" + #include "vtkPoints.h" + #include "vtkDoubleArray.h" + #include "vtkXMLPUnstructuredGridWriter.h" + #include "vtkImageThreshold.h" + #include "vtkMPIController.h" + int main (void) { -static $ax_tls_keyword int bar; + + vtkSmartPointer cells = vtkSmartPointer::New(); + vtkSmartPointer grid = vtkSmartPointer::New(); + vtkSmartPointer points = vtkSmartPointer::New(); + vtkSmartPointer pcoords = vtkSmartPointer::New(); + vtkSmartPointer writer = vtkSmartPointer::New(); + vtkSmartPointer threshold = vtkSmartPointer::New(); + vtkSmartPointer controller = vtkSmartPointer::New(); ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_cxx_try_link "$LINENO" then : - ac_cv_tls=$ax_tls_keyword ; break + enablevtk=yes else case e in #( - e) ac_cv_tls=none - ;; + e) enablevtk=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; -esac - done - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$enablevtk" = "xno" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Linking a test program against the VTK libraries failed >>>" >&5 +printf "%s\n" "<<< Linking a test program against the VTK libraries failed >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< libMesh requires VTK to be configured with -DVTK_USE_PARALLEL:BOOL=ON -DVTK_USE_MPI:BOOL=ON >>>" >&5 +printf "%s\n" "<<< libMesh requires VTK to be configured with -DVTK_USE_PARALLEL:BOOL=ON -DVTK_USE_MPI:BOOL=ON >>>" >&6; } + +fi + + LIBS="$old_LIBS" + CPPFLAGS="$old_CPPFLAGS" + ;; esac fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 -printf "%s\n" "$ac_cv_tls" >&6; } +fi - if test "$ac_cv_tls" != "none" + if test "x$enablevtk" = "xyes" then : -printf "%s\n" "#define TLS $ac_cv_tls" >>confdefs.h + VTK_INCLUDE="-I$VTK_INC" - : -else case e in #( - e) : ;; -esac + if test "x$RPATHFLAG" != "x" && test -d $VTK_LIB +then : + VTK_LIBRARY="${RPATHFLAG}${VTK_LIB} $VTK_LIBRARY" fi + + + + +printf "%s\n" "#define DETECTED_VTK_VERSION_MAJOR $vtkmajor" >>confdefs.h + + + +printf "%s\n" "#define DETECTED_VTK_VERSION_MINOR $vtkminor" >>confdefs.h + + + +printf "%s\n" "#define DETECTED_VTK_VERSION_SUBMINOR $vtkbuild" >>confdefs.h + + + +printf "%s\n" "#define HAVE_VTK 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with VTK version $vtkversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with VTK version $vtkversion support >>>" >&6; } + else case e in #( e) - METIS_INCLUDE="" - METIS_LIB="" - enablemetis=no - ;; + VTK_LIBRARY='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library without VTK support >>>" >&5 +printf "%s\n" "<<< Configuring library without VTK support >>>" >&6; } + ;; esac fi - if test x$build_metis = xyes; then - BUILD_METIS_TRUE= - BUILD_METIS_FALSE='#' -else - BUILD_METIS_TRUE='#' - BUILD_METIS_FALSE= + fi +fi -if test $enablemetis = yes + if test "$enablevtk" = "no" && test "$vtkrequired" = "yes" then : - libmesh_contrib_INCLUDES="$METIS_INCLUDE $libmesh_contrib_INCLUDES" - libmesh_optional_LIBS="$METIS_LIB $libmesh_optional_LIBS" + as_fn_error 4 "*** VTK was not found, but --enable-vtk-required was specified." "$LINENO" 5 fi - if test x$enablemetis = xyes; then - LIBMESH_ENABLE_METIS_TRUE= - LIBMESH_ENABLE_METIS_FALSE='#' + +if test x$enablevtk = xyes +then : + + libmesh_optional_INCLUDES="$VTK_INCLUDE $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$VTK_LIBRARY $libmesh_optional_LIBS" + +fi + if test x$enablevtk = xyes; then + LIBMESH_ENABLE_VTK_TRUE= + LIBMESH_ENABLE_VTK_FALSE='#' else - LIBMESH_ENABLE_METIS_TRUE='#' - LIBMESH_ENABLE_METIS_FALSE= + LIBMESH_ENABLE_VTK_TRUE='#' + LIBMESH_ENABLE_VTK_FALSE= fi -ac_config_files="$ac_config_files contrib/metis/Makefile" - # ------------------------------------------------------------- # ------------------------------------------------------------- -# Parmetis Partitioning -- enabled by default +# Eigen -- Optimized linear algebra routines, enabled by default # ------------------------------------------------------------- - # Check whether --enable-parmetis was given. -if test ${enable_parmetis+y} +# we require Eigen/Sparse support if we're going to enable Eigen +enableeigensparse=yes +# we test with Eigen 3.1.2, so if the user has their own Eigen it +# should be at least that new. + + # Check whether --enable-eigen was given. +if test ${enable_eigen+y} then : - enableval=$enable_parmetis; case "${enableval}" in #( + enableval=$enable_eigen; case "${enableval}" in #( yes) : - enableparmetis=yes ;; #( + enableeigen=yes ;; #( no) : - enableparmetis=no ;; #( + enableeigen=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-parmetis" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-eigen" "$LINENO" 5 ;; esac else case e in #( - e) enableparmetis=$enableoptional ;; + e) enableeigen=$enableoptional ;; esac fi + is_package_required=no -# Check whether --with-parmetis was given. -if test ${with_parmetis+y} + install_internal_eigen=no + if test "x$enableeigen" = "xyes" then : - withval=$with_parmetis; case "${withval}" in #( - internal) : - build_parmetis=yes ;; #( - PETSc) : - build_parmetis=petsc ;; #( - *) : - PARMETIS_LIB="-L${withval} -lparmetis" - build_parmetis=no ;; -esac - enableparmetis=yes -else case e in #( - e) build_parmetis=yes ;; -esac -fi - -# Check whether --with-parmetis-include was given. -if test ${with_parmetis_include+y} +# Check whether --with-eigen-include was given. +if test ${with_eigen_include+y} then : - withval=$with_parmetis_include; PARMETIS_INCLUDE="-I${withval}" - enableparmetis=yes - build_parmetis=no + withval=$with_eigen_include; witheigeninc=$withval +else case e in #( + e) witheigeninc=no ;; +esac fi - if test "x$enablepetsc" = "xno" && test "x$build_parmetis" = "xpetsc" + if test "x$witheigeninc" != "xno" then : - as_fn_error $? "--with-parmetis=PETSc cannot be used without a working copy of PETSc." "$LINENO" 5 -fi - - if test "x$petsc_have_metis" = "x" + EIGEN_INC="$witheigeninc" +elif test "x$EIGEN_INC" != "x" && test -f $EIGEN_INC/Eigen/Eigen then : - petsc_have_metis=0 -fi - if test "x$petsc_have_parmetis" = "x" + printf "%s\n" "Environment EIGEN_INC=$EIGEN_INC" +elif test "x$EIGEN3_INCLUDE" != "x" && test -f $EIGEN3_INCLUDE/Eigen/Eigen then : - petsc_have_parmetis=0 -fi - - if test $petsc_have_metis -gt 0 + EIGEN_INC=$EIGEN3_INCLUDE + printf "%s\n" "Environment EIGEN3_INCLUDE=$EIGEN_INC" +elif test "x$EIGEN_INCLUDE" != "x" && test -f $EIGEN_INCLUDE/Eigen/Eigen then : - - if test $petsc_have_parmetis -gt 0 + EIGEN_INC=$EIGEN_INCLUDE + printf "%s\n" "Environment EIGEN_INCLUDE=$EIGEN_INC" +elif test -f /usr/include/eigen3/Eigen/Eigen then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using PETSc ParMETIS support to avoid PETSc conflict>>>" >&5 -printf "%s\n" "<<< Using PETSc ParMETIS support to avoid PETSc conflict>>>" >&6; } - build_parmetis=petsc + EIGEN_INC="/usr/include/eigen3" + printf "%s\n" "System EIGEN_INC=$EIGEN_INC" else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling ParMETIS support to avoid PETSc conflict>>>" >&5 -printf "%s\n" "<<< Disabling ParMETIS support to avoid PETSc conflict>>>" >&6; } - enableparmetis=no ;; + e) EIGEN_INC="/usr/include" + printf "%s\n" "Testing EIGEN_INC=$EIGEN_INC" ;; esac fi -fi + EIGEN_INCLUDE="" - if test "$enableparmetis" = "yes" && test "$build_parmetis" = "petsc" -then : - if test "x$petsc_have_metis" = "x0" && - test "x$petsc_have_parmetis" = "x0" -then : - build_parmetis=yes -fi - if test "$enablepetsc" = "no" -then : - build_parmetis=yes -fi + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -fi - if test "x$enablempi" = "xno" + externaleigenincFound=no; + ac_eigen_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I${EIGEN_INC} ${CPPFLAGS}" + for ac_header in Eigen/Eigen +do : + ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Eigen" "ac_cv_header_Eigen_Eigen" "$ac_includes_default" +if test "x$ac_cv_header_Eigen_Eigen" = xyes then : - enableparmetis=no + printf "%s\n" "#define HAVE_EIGEN_EIGEN 1" >>confdefs.h + externaleigenincFound=yes fi - if test "x$enableparmetis" = "xyes" -then : - - -printf "%s\n" "#define HAVE_PARMETIS 1" >>confdefs.h - +done + CPPFLAGS="${ac_eigen_save_CPPFLAGS}" - if test "$build_parmetis" = "yes" + if test "x$externaleigenincFound" = "xyes" then : - PARMETIS_INCLUDE="-I\$(top_srcdir)/contrib/parmetis/include" - PARMETIS_LIB="" # contrib Parmetis gets lumped into libcontrib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with internal Parmetis support >>>" >&5 -printf "%s\n" "<<< Configuring library with internal Parmetis support >>>" >&6; } - -elif test "$build_parmetis" = "petsc" + enableeigenincFound=yes + ac_eigen_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I${EIGEN_INC} ${CPPFLAGS}" + for ac_header in Eigen/Dense +do : + ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Dense" "ac_cv_header_Eigen_Dense" "$ac_includes_default" +if test "x$ac_cv_header_Eigen_Dense" = xyes then : - - PARMETIS_INCLUDE="" - PARMETIS_LIB="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with PETSc Parmetis support >>>" >&5 -printf "%s\n" "<<< Configuring library with PETSc Parmetis support >>>" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with external Parmetis support >>>" >&5 -printf "%s\n" "<<< Configuring library with external Parmetis support >>>" >&6; } - ;; -esac -fi + printf "%s\n" "#define HAVE_EIGEN_DENSE 1" >>confdefs.h else case e in #( - e) - PARMETIS_INCLUDE="" - PARMETIS_LIB="" - enableparmetis=no - build_parmetis=no - ;; + e) enableeigenincFound=no ;; esac fi - if test x$build_parmetis = xyes; then - BUILD_PARMETIS_TRUE= - BUILD_PARMETIS_FALSE='#' -else - BUILD_PARMETIS_TRUE='#' - BUILD_PARMETIS_FALSE= -fi - - - - -if test $enableparmetis = yes +done + if test "x$enableeigensparse" = "xyes" then : - libmesh_contrib_INCLUDES="$PARMETIS_INCLUDE $libmesh_contrib_INCLUDES" - libmesh_optional_LIBS="$PARMETIS_LIB $libmesh_optional_LIBS" -fi - if test x$enableparmetis = xyes; then - LIBMESH_ENABLE_PARMETIS_TRUE= - LIBMESH_ENABLE_PARMETIS_FALSE='#' -else - LIBMESH_ENABLE_PARMETIS_TRUE='#' - LIBMESH_ENABLE_PARMETIS_FALSE= -fi - -ac_config_files="$ac_config_files contrib/parmetis/Makefile" - -# ------------------------------------------------------------- - - - -# ------------------------------------------------------------- -# Doxygen - look for doxygen (a documentation tool) -# ------------------------------------------------------------- -# Extract the first word of "doxygen", so it can be a program name with args. -set dummy doxygen; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DOXYGEN+y} + for ac_header in Eigen/Sparse +do : + ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default" +if test "x$ac_cv_header_Eigen_Sparse" = xyes then : - printf %s "(cached) " >&6 -else case e in #( - e) case $DOXYGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DOXYGEN="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + printf "%s\n" "#define HAVE_EIGEN_SPARSE 1" >>confdefs.h - ;; -esac ;; +else case e in #( + e) enableeigenincFound=no ;; esac fi -DOXYGEN=$ac_cv_path_DOXYGEN -if test -n "$DOXYGEN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 -printf "%s\n" "$DOXYGEN" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi +done +fi + CPPFLAGS="${ac_eigen_save_CPPFLAGS}" +fi -if test "x$DOXYGEN" != x + if test "x$enableeigenincFound" = "xyes" then : - - # Extract the first word of "dot", so it can be a program name with args. -set dummy dot; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DOT+y} + EIGEN_INCLUDE="-I$EIGEN_INC" +elif test -d $top_srcdir/contrib/eigen/eigen then : - printf %s "(cached) " >&6 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< external Eigen header files not found, using Eigen from ./contrib >>>" >&5 +printf "%s\n" "<<< external Eigen header files not found, using Eigen from ./contrib >>>" >&6; } + EIGEN_INC=$top_srcdir/contrib/eigen/eigen + EIGEN_INCLUDE="-I\$(top_srcdir)/contrib/eigen/eigen" + install_internal_eigen=yes else case e in #( - e) case $DOT in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOT="$DOT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DOT="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac ;; + e) enableeigen=no ;; esac -fi -DOT=$ac_cv_path_DOT -if test -n "$DOT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5 -printf "%s\n" "$DOT" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } fi - - HAVE_DOT=NO - if test "x$DOT" != x + if test "x$enableeigen" = "xyes" then : - HAVE_DOT=YES - DOTPATH=$PWD/doc - - - -fi - - -fi -# ------------------------------------------------------------- - - + ac_eigen_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I${EIGEN_INC} ${CPPFLAGS}" -# ------------------------------------------------------------- -# poly2tri -- enabled by default -# ------------------------------------------------------------- + { ac_cv_header_Eigen_Dense=; unset ac_cv_header_Eigen_Dense;} + { ac_cv_header_Eigen_Sparse=; unset ac_cv_header_Eigen_Sparse;} - # Check whether --enable-poly2tri was given. -if test ${enable_poly2tri+y} + for ac_header in Eigen/Dense +do : + ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Dense" "ac_cv_header_Eigen_Dense" "$ac_includes_default" +if test "x$ac_cv_header_Eigen_Dense" = xyes then : - enableval=$enable_poly2tri; case "${enableval}" in #( - yes) : - enablepoly2tri=yes ;; #( - no) : - enablepoly2tri=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-poly2tri" "$LINENO" 5 ;; -esac + printf "%s\n" "#define HAVE_EIGEN_DENSE 1" >>confdefs.h + else case e in #( - e) enablepoly2tri=$enableoptional ;; + e) enableeigen=no ;; esac fi - # if unspecified, depend on enableoptional - POLY2TRI_INCLUDE="" +done - if test "x$enablepoly2tri" = "xyes" + if test "x$enableeigensparse" = "xyes" +then : + for ac_header in Eigen/Sparse +do : + ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default" +if test "x$ac_cv_header_Eigen_Sparse" = xyes then : + printf "%s\n" "#define HAVE_EIGEN_SPARSE 1" >>confdefs.h - POLY2TRI_INCLUDE="-I\$(top_builddir)/contrib/poly2tri/modified" +else case e in #( + e) enableeigen=no ;; +esac +fi -printf "%s\n" "#define HAVE_POLY2TRI 1" >>confdefs.h +done +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with poly2tri support >>>" >&5 -printf "%s\n" "<<< Configuring library with poly2tri support >>>" >&6; } + min_eigen_version=3.1.2 + + MAJOR_VER=`echo $min_eigen_version | sed 's/^\([0-9]*\).*/\1/'` + if test "x${MAJOR_VER}" = "x" +then : + MAJOR_VER=0 fi -if test $enablepoly2tri = yes + MINOR_VER=`echo $min_eigen_version | sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\2/'` + if test "x${MINOR_VER}" = "x" then : - libmesh_contrib_INCLUDES="$POLY2TRI_INCLUDE $libmesh_contrib_INCLUDES" + MINOR_VER=0 fi - if test x$enablepoly2tri = xyes; then - LIBMESH_ENABLE_POLY2TRI_TRUE= - LIBMESH_ENABLE_POLY2TRI_FALSE='#' -else - LIBMESH_ENABLE_POLY2TRI_TRUE='#' - LIBMESH_ENABLE_POLY2TRI_FALSE= + + MICRO_VER=`echo $min_eigen_version | sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\3/'` + if test "x${MICRO_VER}" = "x" +then : + MICRO_VER=0 fi -ac_config_files="$ac_config_files contrib/poly2tri/modified/Makefile" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for eigen - version >= $min_eigen_version" >&5 +printf %s "checking for eigen - version >= $min_eigen_version... " >&6; } -# ------------------------------------------------------------- + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include "Eigen/Core" -# ------------------------------------------------------------- -# NetGen -- disabled unless --enable-netgen is specified -# -# The license is fine, but our interface is still experimental -# ------------------------------------------------------------- +int +main (void) +{ - # Check whether --enable-netgen was given. -if test ${enable_netgen+y} + #if EIGEN_WORLD_VERSION > $MAJOR_VER + #elif (EIGEN_WORLD_VERSION >= $MAJOR_VER) && (EIGEN_MAJOR_VERSION > $MINOR_VER) + #elif (EIGEN_WORLD_VERSION >= $MAJOR_VER) && (EIGEN_MAJOR_VERSION >= $MINOR_VER) && (EIGEN_MINOR_VERSION >= $MICRO_VER) + #else + # error version is too old + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableval=$enable_netgen; case "${enableval}" in #( - yes) : - enablenetgen=yes ;; #( - no) : - enablenetgen=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-netgen" "$LINENO" 5 ;; -esac -else case e in #( - e) enablenetgen=$enableoptional ;; -esac -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - # Check whether --enable-netgen-required was given. -if test ${enable_netgen_required+y} -then : - enableval=$enable_netgen_required; case "${enableval}" in #( - yes) : - enablenetgenrequired=yes - enablenetgen=yes ;; #( - no) : - enablenetgenrequired=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-netgen-required" "$LINENO" 5 ;; -esac else case e in #( - e) enablenetgenrequired=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + enableeigen=no + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - NETGEN_INCLUDE="" - NETGEN_LIBS="" - NETGEN_BUILD_LDFLAGS="" - if test "x$enablenetgen" = "xyes" -then : + CPPFLAGS="${ac_eigen_save_CPPFLAGS}" - if test "x$acsm_enableglibcxxdebugging" = "xyes" -then : - if test "x$METHODS" != "xdbg" + if test "x$enableeigen" = "xyes" then : - as_fn_error $? "If enabling glibcxx debugging and using netgen, only a single method 'dbg' method can be used in 'METHODS', but instead $METHODS was used" "$LINENO" 5 -fi - NETGEN_CXXFLAGS="$NETGEN_CXXFLAGS -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC" -fi - my_top_srcdir="$(cd $srcdir && pwd)" - - my_top_builddir="$(pwd)" - - rm -f contrib/netgen/.buildstamp - rm -rf contrib/netgen/build - mkdir -p contrib/netgen/build - - mkdir -p contrib/netgen/install + HAVE_EIGEN=1 - if (cd contrib/netgen/build && \ - cmake -DUSE_NATIVE_ARCH=OFF -DUSE_PYTHON=OFF -DUSE_GUI=OFF -DUSE_OCC=OFF -DCMAKE_CXX_FLAGS="$NETGEN_CXXFLAGS" -DCMAKE_INSTALL_PREFIX:PATH=$my_top_builddir/contrib/netgen/install \ - $my_top_srcdir/contrib/netgen/netgen) -then : +printf "%s\n" "#define HAVE_EIGEN 1" >>confdefs.h - NETGEN_INCLUDE="-I\$(top_srcdir)/contrib/netgen/ -I\$(top_builddir)/contrib/netgen/build/" - NETGEN_LIBS="-lnglib -lngcore" - if test "x$GCC" = "xyes" -then : - if test "$($CC -dumpversion | cut -d'.' -f1)" = "8" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Eigen support >>>" >&5 +printf "%s\n" "<<< Configuring library with Eigen support >>>" >&6; } +elif test "x$is_package_required" = "xyes" then : - NETGEN_LIBS="$NETGEN_LIBS -lstdc++fs" -fi + as_fn_error $? "Your EIGEN version ($EIGEN_INC) does not meet the minimum versioning + requirements ($min_eigen_version). Please use --with-eigen-include to + specify the location of an updated installation." "$LINENO" 5 fi - NETGEN_BUILD_LDFLAGS="-L\$(abs_top_builddir)/contrib/netgen/build/netgen/ -L\$(abs_top_builddir)/contrib/netgen/build/netgen/libsrc/core/" - if test "x$RPATHFLAG" != "x" -then : - NETGEN_BUILD_LDFLAGS="$NETGEN_BUILD_LDFLAGS ${RPATHFLAG}\$(abs_top_builddir)/contrib/netgen/build/netgen/ ${RPATHFLAG}\$(abs_top_builddir)/contrib/netgen/build/netgen/libsrc/core/" -fi; - -printf "%s\n" "#define HAVE_NETGEN 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Netgen support >>>" >&5 -printf "%s\n" "<<< Configuring library with Netgen support >>>" >&6; } -else case e in #( - e) - if test "x$enablenetgenrequired" = "xyes" -then : - as_fn_error $? "<<< Failed cmake configuration of user-required Netgen submodule >>>" "$LINENO" 5 -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Failed cmake configuration of Netgen submodule >>>" >&5 -printf "%s\n" "<<< Failed cmake configuration of Netgen submodule >>>" >&6; } ;; -esac fi + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - enablenetgen=no - ;; -esac -fi -else case e in #( - e) - enablenetgen=no - ;; -esac fi +if test "x$enableeigen" = xyes +then : -if test $enablenetgen = yes + if test "x$install_internal_eigen" = xyes then : - libmesh_contrib_INCLUDES="$NETGEN_INCLUDE $libmesh_contrib_INCLUDES" - libmesh_contrib_LDFLAGS="$NETGEN_BUILD_LDFLAGS $libmesh_contrib_LDFLAGS" - libmesh_optional_LIBS="$NETGEN_LIBS $libmesh_optional_LIBS" + libmesh_contrib_INCLUDES="$EIGEN_INCLUDE $libmesh_contrib_INCLUDES" +else case e in #( + e) libmesh_optional_INCLUDES="$EIGEN_INCLUDE $libmesh_optional_INCLUDES" ;; +esac +fi fi +ac_config_files="$ac_config_files contrib/eigen/eigen/Makefile" - if test x$enablenetgen = xyes; then - LIBMESH_ENABLE_NETGEN_TRUE= - LIBMESH_ENABLE_NETGEN_FALSE='#' + if test x$enableeigen = xyes; then + LIBMESH_ENABLE_EIGEN_TRUE= + LIBMESH_ENABLE_EIGEN_FALSE='#' else - LIBMESH_ENABLE_NETGEN_TRUE='#' - LIBMESH_ENABLE_NETGEN_FALSE= + LIBMESH_ENABLE_EIGEN_TRUE='#' + LIBMESH_ENABLE_EIGEN_FALSE= fi -ac_config_files="$ac_config_files contrib/netgen/Makefile" - -# ------------------------------------------------------------- - - + if test x$install_internal_eigen = xyes; then + LIBMESH_INSTALL_INTERNAL_EIGEN_TRUE= + LIBMESH_INSTALL_INTERNAL_EIGEN_FALSE='#' +else + LIBMESH_INSTALL_INTERNAL_EIGEN_TRUE='#' + LIBMESH_INSTALL_INTERNAL_EIGEN_FALSE= +fi +#-------------------------------------------------------------- # ------------------------------------------------------------- -# TetGen -- enabled unless --enable-strict-lgpl is specified +# GLPK -- Needed by the SCM routine of rbOOmit. +# Enabled by default. # ------------------------------------------------------------- -if test $enablestrictlgpl = yes -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Tetgen support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&5 -printf "%s\n" "<<< Tetgen support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&6; } - enabletetgen=no; -else case e in #( - e) - - # Check whether --enable-tetgen was given. -if test ${enable_tetgen+y} + # Check whether --enable-glpk was given. +if test ${enable_glpk+y} then : - enableval=$enable_tetgen; case "${enableval}" in #( + enableval=$enable_glpk; case "${enableval}" in #( yes) : - enabletetgen=yes ;; #( + enableglpk=yes ;; #( no) : - enabletetgen=no ;; #( + enableglpk=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-tetgen" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-glpk" "$LINENO" 5 ;; esac else case e in #( - e) enabletetgen=$enableoptional ;; + e) enableglpk=$enableoptional ;; esac fi - if test "x$enabletetgen" = "xyes" + if test "x$enableglpk" = "xyes" then : - TETGEN_INCLUDE="-I\$(top_srcdir)/contrib/tetgen" - TETGEN_LIBRARY="\$(EXTERNAL_LIBDIR)/libtetgen\$(libext)" -printf "%s\n" "#define HAVE_TETGEN 1" >>confdefs.h +# Check whether --with-glpk-include was given. +if test ${with_glpk_include+y} +then : + withval=$with_glpk_include; withglpkinc=$withval +else case e in #( + e) withglpkinc=no ;; +esac +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Tetgen support >>>" >&5 -printf "%s\n" "<<< Configuring library with Tetgen support >>>" >&6; } + +# Check whether --with-glpk-lib was given. +if test ${with_glpk_lib+y} +then : + withval=$with_glpk_lib; withglpklib=$withval else case e in #( - e) - TETGEN_INCLUDE="" - TETGEN_LIBRARY="" - enabletetgen=no - ;; + e) withglpklib=no ;; esac fi + if test "x$withglpkinc" != "xno" +then : + GLPK_INC="$withglpkinc" +elif test "x$GLPK_INC" != "x" && test -f $GLPK_INC/glpk.h +then : + printf "%s\n" "Environment GLPK_INC=$GLPK_INC" +elif test "x$GLPK_DIR" != "x" && test -f $GLPK_DIR/include/glpk.h +then : + GLPK_INC="$GLPK_DIR/include" +elif test -f /usr/include/glpk/glpk.h +then : + GLPK_INC="/usr/include/glpk" +elif test -f /usr/local/include/glpk.h +then : + GLPK_INC="/usr/local/include" +else case e in #( + e) GLPK_INC="/usr/include" ;; +esac +fi - - if test $enabletetgen = yes + if test "x$withglpklib" != "xno" then : - libmesh_contrib_INCLUDES="$TETGEN_INCLUDE $libmesh_contrib_INCLUDES" + GLPK_LIB="$withglpklib" +elif test "x$GLPK_LIB" != "x" +then : + printf "%s\n" "Environment GLPK_LIB=$GLPK_INC" +elif test "x$GLPK_DIR" != "x" +then : + GLPK_LIB="$GLPK_DIR/lib" +elif test -f /usr/include/glpk/glpk.h +then : + if test -f /usr/lib64/libglpk.so || test -f /usr/lib64/libglpk.a +then : + GLPK_LIB="/usr/lib64" +elif test -f /usr/lib/libglpk.so || test -f /usr/lib/libglpk.a +then : + GLPK_LIB="/usr/lib" fi - ;; +elif test -f /usr/local/include/glpk.h +then : + GLPK_LIB="/usr/local/lib" +else case e in #( + e) GLPK_LIB="/usr/lib" ;; esac fi - if test x$enabletetgen = xyes; then - LIBMESH_ENABLE_TETGEN_TRUE= - LIBMESH_ENABLE_TETGEN_FALSE='#' -else - LIBMESH_ENABLE_TETGEN_TRUE='#' - LIBMESH_ENABLE_TETGEN_FALSE= + GLPK_INCLUDE="" + GLPK_LIBRARY="" + + if test "x$enableglpk" = "xyes" +then : + + glpkincFound=no; + ac_glpk_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I${GLPK_INC} ${CPPFLAGS}" + for ac_header in glpk.h +do : + ac_fn_cxx_check_header_compile "$LINENO" "glpk.h" "ac_cv_header_glpk_h" "$ac_includes_default" +if test "x$ac_cv_header_glpk_h" = xyes +then : + printf "%s\n" "#define HAVE_GLPK_H 1" >>confdefs.h + glpkincFound=yes fi -ac_config_files="$ac_config_files contrib/tetgen/Makefile" +done + CPPFLAGS="${ac_glpk_save_CPPFLAGS}" -# ------------------------------------------------------------- + if test "x$glpkincFound" = "xno" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GLPK header files not found!" >&5 +printf "%s\n" "GLPK header files not found!" >&6; } + enableglpk=no +fi -# ------------------------------------------------------------- -# Triangle -- enabled unless --enable-strict-lgpl is specified -# ------------------------------------------------------------- -if test $enablestrictlgpl = yes + if test "x$enableglpk" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Triangle meshing support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&5 -printf "%s\n" "<<< Triangle meshing support is disabled, configure with --disable-strict-lgpl to enable it >>>" >&6; } - enabletriangle=no; + glpkmajor=`grep "define GLP_MAJOR_VERSION" $GLPK_INC/glpk.h | sed -e "s/#define GLP_MAJOR_VERSION[ ]*//g"` + glpkminor=`grep "define GLP_MINOR_VERSION" $GLPK_INC/glpk.h | sed -e "s/#define GLP_MINOR_VERSION[ ]*//g"` + glpkversion=$glpkmajor.$glpkminor + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with GLPK version $glpkversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with GLPK version $glpkversion support >>>" >&6; } + +fi + + if test "x$enableglpk" = "xyes" +then : + + old_LIBS="$LIBS" + LIBS="$old_LIBS -L$GLPK_LIB" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lglpk" >&5 +printf %s "checking for main in -lglpk... " >&6; } +if test ${ac_cv_lib_glpk_main+y} +then : + printf %s "(cached) " >&6 else case e in #( - e) + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lglpk $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Check whether --enable-triangle was given. -if test ${enable_triangle+y} +namespace conftest { + extern "C" int main (); +} +int +main (void) +{ +return conftest::main (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - enableval=$enable_triangle; case "${enableval}" in #( - yes) : - enabletriangle=yes ;; #( - no) : - enabletriangle=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-triangle" "$LINENO" 5 ;; + ac_cv_lib_glpk_main=yes +else case e in #( + e) ac_cv_lib_glpk_main=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glpk_main" >&5 +printf "%s\n" "$ac_cv_lib_glpk_main" >&6; } +if test "x$ac_cv_lib_glpk_main" = xyes +then : + enableglpk=yes else case e in #( - e) enabletriangle=$enableoptional ;; + e) enableglpk=no ;; esac fi - if test "x$enabletriangle" = "xyes" && - (test "x$enabletripleprecision" != "xno" || - test "x$enablequadrupleprecision" != "xno") -then : - enabletriangle=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling Triangle support due to extended precision >>>" >&5 -printf "%s\n" "<<< Disabling Triangle support due to extended precision >>>" >&6; } + LIBS="$old_LIBS" fi - if test "x$enabletriangle" = "xyes" + if test "x$enableglpk" = "xyes" then : - TRIANGLE_INCLUDE="-I\$(top_srcdir)/contrib/triangle" - TRIANGLE_LIBRARY="\$(EXTERNAL_LIBDIR)/libtriangle\$(libext)" - -printf "%s\n" "#define HAVE_TRIANGLE 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Triangle support >>>" >&5 -printf "%s\n" "<<< Configuring library with Triangle support >>>" >&6; } + GLPK_INCLUDE="-I$GLPK_INC" + GLPK_LIBRARY="-L$GLPK_LIB -lglpk" + if test "x$RPATHFLAG" != "x" && test -d $GLPK_LIB +then : -else case e in #( - e) - TRIANGLE_INCLUDE="" - TRIANGLE_LIBRARY="" - enabletriangle=no - ;; -esac + if test "$GLPK_LIB" != "/usr/lib" && test "$GLPK_LIB" != "/usr/lib64" +then : + GLPK_LIBRARY="${RPATHFLAG}${GLPK_LIB} $GLPK_LIBRARY" fi +fi +printf "%s\n" "#define HAVE_GLPK 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with GLPK support >>>" >&5 +printf "%s\n" "<<< Configuring library with GLPK support >>>" >&6; } - if test $enabletriangle = yes -then : - libmesh_contrib_INCLUDES="$TRIANGLE_INCLUDE $libmesh_contrib_INCLUDES" fi - ;; -esac + fi - if test x$enabletriangle = xyes; then - LIBMESH_ENABLE_TRIANGLE_TRUE= - LIBMESH_ENABLE_TRIANGLE_FALSE='#' -else - LIBMESH_ENABLE_TRIANGLE_TRUE='#' - LIBMESH_ENABLE_TRIANGLE_FALSE= fi -ac_config_files="$ac_config_files contrib/triangle/Makefile" -# ------------------------------------------------------------- +if test x$enableglpk = xyes +then : -# ------------------------------------------------------------- -# Qhull -- enabled by default -# ------------------------------------------------------------- + libmesh_optional_INCLUDES="$GLPK_INCLUDE $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$GLPK_LIBRARY $libmesh_optional_LIBS" - # Check whether --enable-qhull was given. -if test ${enable_qhull+y} -then : - enableval=$enable_qhull; case "${enableval}" in #( - yes) : - enableqhull=yes ;; #( - no) : - enableqhull=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-qhull" "$LINENO" 5 ;; -esac -else case e in #( - e) enableqhull=$enableoptional ;; -esac fi - # if unspecified, depend on enableoptional + if test x$enableglpk = xyes; then + LIBMESH_ENABLE_GLPK_TRUE= + LIBMESH_ENABLE_GLPK_FALSE='#' +else + LIBMESH_ENABLE_GLPK_TRUE='#' + LIBMESH_ENABLE_GLPK_FALSE= +fi - # Check whether --enable-qhull-required was given. -if test ${enable_qhull_required+y} +# ------------------------------------------------------------- + + +# ------------------------------------------------------------- +# NLOPT -- A library of nonlinear optimization routines. +# ------------------------------------------------------------- + + # Check whether --enable-nlopt was given. +if test ${enable_nlopt+y} then : - enableval=$enable_qhull_required; case "${enableval}" in #( + enableval=$enable_nlopt; case "${enableval}" in #( yes) : - enableqhullrequired=yes - enableqhull=yes ;; #( + enablenlopt=yes ;; #( no) : - enableqhullrequired=no ;; #( + enablenlopt=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-qhull-required" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-nlopt" "$LINENO" 5 ;; esac else case e in #( - e) enableqhullrequired=no ;; + e) enablenlopt=$enableoptional ;; esac fi - QHULL_INCLUDE="" - QHULL_LIBS="" - QHULL_BUILD_LDFLAGS="" - if test "x$enableqhull" = "xyes" + if test "x$enablenlopt" = "xyes" && test "$dof_bytes" != "4" then : - my_top_srcdir="$(cd $srcdir && pwd)" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< nlopt can only be enabled if libmesh is configured with --with-dof-id-bytes=4. >>>" >&5 +printf "%s\n" "<<< nlopt can only be enabled if libmesh is configured with --with-dof-id-bytes=4. >>>" >&6; } + enablenlopt=no - my_top_builddir="$(pwd)" +fi - rm -f contrib/qhull/.buildstamp - rm -rf contrib/qhull/build - mkdir -p contrib/qhull/build + if test "x$enablenlopt" = "xyes" +then : - mkdir -p contrib/qhull/install + # User-specific include path - if (cd contrib/qhull/build && \ - cmake -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DQHULL_ENABLE_TESTING=OFF \ - -DBUILD_APPLICATIONS=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$my_top_builddir/contrib/qhull/install \ - $my_top_srcdir/contrib/qhull/qhull) +# Check whether --with-nlopt-include was given. +if test ${with_nlopt_include+y} then : + withval=$with_nlopt_include; withnloptinc=$withval +else case e in #( + e) withnloptinc=no ;; +esac +fi - QHULL_INCLUDE="-I\$(top_srcdir)/contrib/qhull/qhull/src" - QHULL_LIBS="-lqhullcpp -lqhullstatic_r" - QHULL_BUILD_LDFLAGS="-L\$(abs_top_builddir)/contrib/qhull/build/" - -printf "%s\n" "#define HAVE_QHULL_API 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Qhull support >>>" >&5 -printf "%s\n" "<<< Configuring library with Qhull support >>>" >&6; } + # User-specific library path -else case e in #( - e) - if test "x$enableqhullrequired" = "xyes" +# Check whether --with-nlopt-lib was given. +if test ${with_nlopt_lib+y} then : - as_fn_error $? "<<< Failed cmake configuration of user-required Qhull submodule >>>" "$LINENO" 5 + withval=$with_nlopt_lib; withnloptlib=$withval else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Failed cmake configuration of Qhull submodule >>>" >&5 -printf "%s\n" "<<< Failed cmake configuration of Qhull submodule >>>" >&6; } ;; + e) withnloptlib=no ;; esac fi - enableqhull=no - ;; + + # Use NLOPT_DIR/include if it exists. + if test $withnloptinc != no +then : + NLOPT_INC="$withnloptinc" +elif test "x$NLOPT_DIR" != "x" && test -f $NLOPT_DIR/include/nlopt.h +then : + NLOPT_INC="$NLOPT_DIR/include" +else case e in #( + e) NLOPT_INC="" ;; esac fi + # Use NLOPT_DIR/lib if it exists. + if test "x$withnloptlib" != "xno" +then : + NLOPT_LIB="$withnloptlib" +elif test "x$NLOPT_DIR" != "x" +then : + NLOPT_LIB="$NLOPT_DIR/lib" else case e in #( - e) - enableqhull=no - ;; + e) NLOPT_LIB="" ;; esac fi + # Initialize Makefile/config.h substitution variables + NLOPT_INCLUDE="" + NLOPT_LIBRARY="" + if test "x$enablenlopt" = "xyes" +then : + NLOPT_INCLUDE="-I$NLOPT_INC" + NLOPT_LIBRARY="-L$NLOPT_LIB -lnlopt" + # Try to compile and link a trivial nlopt test code. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for valid nlopt installation" >&5 +printf %s "checking for valid nlopt installation... " >&6; } + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test $enableqhull = yes -then : - libmesh_contrib_INCLUDES="$QHULL_INCLUDE $libmesh_contrib_INCLUDES" - libmesh_contrib_LDFLAGS="$QHULL_BUILD_LDFLAGS $libmesh_contrib_LDFLAGS" - libmesh_optional_LIBS="$QHULL_LIBS $libmesh_optional_LIBS" -fi - if test x$enableqhull = xyes; then - LIBMESH_ENABLE_QHULL_TRUE= - LIBMESH_ENABLE_QHULL_FALSE='#' -else - LIBMESH_ENABLE_QHULL_TRUE='#' - LIBMESH_ENABLE_QHULL_FALSE= -fi + # Save the original CFLAGS and LIBS contents + saveCFLAGS="$CFLAGS" + saveLIBS="$LIBS" -ac_config_files="$ac_config_files contrib/qhull/Makefile" + # Append nlopt include paths to the CFLAGS variables + CFLAGS="$saveCFLAGS $NLOPT_INCLUDE" + LIBS="$saveLIBS $NLOPT_LIBRARY -lm" -# ------------------------------------------------------------- + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include -# ------------------------------------------------------------- -# GMV -- file I/O API is enabled by default (it is distributed in contrib) -# ------------------------------------------------------------- +double myfunc(unsigned n, const double *x, double *grad, void *my_func_data) +{ +if (grad) { + grad[0] = 0.0; + grad[1] = 0.5 / sqrt(x[1]); + } + return sqrt(x[1]); +} - # Check whether --enable-gmv was given. -if test ${enable_gmv+y} +typedef struct +{ + double a, b; +} my_constraint_data; + +double myconstraint(unsigned n, const double *x, double *grad, void *data) +{ + my_constraint_data *d = (my_constraint_data *) data; + double a = d->a, b = d->b; + if (grad) { + grad[0] = 3 * a * (a*x[0] + b) * (a*x[0] + b); + grad[1] = -1.0; + } + return ((a*x[0] + b) * (a*x[0] + b) * (a*x[0] + b) - x[1]); +} + +int +main (void) +{ + +double lb[2] = { -HUGE_VAL, 0 }; /* lower bounds */ +nlopt_opt opt; + +opt = nlopt_create(NLOPT_LD_MMA, 2); /* algorithm and dimensionality */ +nlopt_set_lower_bounds(opt, lb); +nlopt_set_min_objective(opt, myfunc, NULL); + +my_constraint_data data[2] = { {2,0}, {-1,1} }; +nlopt_add_inequality_constraint(opt, myconstraint, &data[0], 1e-8); +nlopt_add_inequality_constraint(opt, myconstraint, &data[1], 1e-8); +nlopt_set_xtol_rel(opt, 1e-4); +double x[2] = { 1.234, 5.678 }; /* some initial guess */ +double minf; /* the minimum objective value, upon return */ + +if (nlopt_optimize(opt, x, &minf) < 0) { + printf("nlopt failed!\n"); +} +else { + printf("found minimum at f(%g,%g) = %0.10g\n", x[0], x[1], minf); +} +nlopt_destroy(opt); +return 0; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO" then : - enableval=$enable_gmv; case "${enableval}" in #( - yes) : - enablegmv=yes ;; #( - no) : - enablegmv=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-gmv" "$LINENO" 5 ;; -esac + + enablenlopt=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else case e in #( - e) enablegmv=$enableoptional ;; + e) + enablenlopt=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + # Return CFLAGS and LIBS to their original states. + CFLAGS="$saveCFLAGS" + LIBS="$saveLIBS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "x$enablegmv" = "xyes" + if test "x$enablenlopt" = "xyes" then : - GMV_INCLUDE="-I\$(top_srcdir)/contrib/gmv" - GMV_LIBRARY="\$(EXTERNAL_LIBDIR)/libgmv\$(libext)" + if test "x$RPATHFLAG" != "x" && test -d $NLOPT_LIB +then : + NLOPT_LIBRARY="${RPATHFLAG}${NLOPT_LIB} $NLOPT_LIBRARY" +fi -printf "%s\n" "#define HAVE_GMV 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with GMV support >>>" >&5 -printf "%s\n" "<<< Configuring library with GMV support >>>" >&6; } +printf "%s\n" "#define HAVE_NLOPT 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NLOPT support >>>" >&5 +printf "%s\n" "<<< Configuring library with NLOPT support >>>" >&6; } + +fi -else case e in #( - e) - GMV_INCLUDE="" - GMV_LIBRARY="" - enablegmv=no - ;; -esac fi +fi + # Substitute the substitution variables -if test x$enablegmv = xyes + +if test x$enablenlopt = xyes then : - libmesh_contrib_INCLUDES="$GMV_INCLUDE $libmesh_contrib_INCLUDES" + + libmesh_optional_INCLUDES="$NLOPT_INCLUDE $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$NLOPT_LIBRARY $libmesh_optional_LIBS" + fi - if test x$enablegmv = xyes; then - LIBMESH_ENABLE_GMV_TRUE= - LIBMESH_ENABLE_GMV_FALSE='#' + if test x$enablenlopt = xyes; then + LIBMESH_ENABLE_NLOPT_TRUE= + LIBMESH_ENABLE_NLOPT_FALSE='#' else - LIBMESH_ENABLE_GMV_TRUE='#' - LIBMESH_ENABLE_GMV_FALSE= + LIBMESH_ENABLE_NLOPT_TRUE='#' + LIBMESH_ENABLE_NLOPT_FALSE= fi -ac_config_files="$ac_config_files contrib/gmv/Makefile" - # ------------------------------------------------------------- - # ------------------------------------------------------------- -# VTK -- Mesh I/O API is enabled by default +# CAPNPROTO -- Serialization library. # ------------------------------------------------------------- - - - - # Check whether --enable-vtk was given. -if test ${enable_vtk+y} + # Check whether --enable-capnproto was given. +if test ${enable_capnproto+y} then : - enableval=$enable_vtk; case "${enableval}" in #( + enableval=$enable_capnproto; case "${enableval}" in #( yes) : - enablevtk=yes ;; #( + enablecapnproto=yes ;; #( no) : - enablevtk=no ;; #( + enablecapnproto=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-vtk" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-capnproto" "$LINENO" 5 ;; esac else case e in #( - e) enablevtk=$enableoptional ;; + e) enablecapnproto=$enableoptional ;; esac fi - # Check whether --enable-vtk-required was given. -if test ${enable_vtk_required+y} + # Check whether --enable-capnp-required was given. +if test ${enable_capnp_required+y} then : - enableval=$enable_vtk_required; case "${enableval}" in #( + enableval=$enable_capnp_required; case "${enableval}" in #( yes) : - vtkrequired=yes ;; #( + capnprequired=yes ;; #( no) : - vtkrequired=no ;; #( + capnprequired=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-vtk-required" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-capnp-required" "$LINENO" 5 ;; esac else case e in #( - e) vtkrequired=no ;; + e) capnprequired=no ;; esac fi - if test "$enablevtk" = "yes" + if test "x$HAVE_CXX11" = "x" || test "x$HAVE_CXX11" = "x0" then : - if test "x$VTK_DIR" = "x" -then : - VTK_DIR=/usr + enablecapnproto=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Cap'n Proto disabled -- C++11 support (auto keyword) is required. >>>" >&5 +printf "%s\n" "<<< Cap'n Proto disabled -- C++11 support (auto keyword) is required. >>>" >&6; } + fi - VTK_LS_CHECK=$(dirname $(ls -d $VTK_DIR/include/vtk*/vtkConfigure.h $VTK_DIR/include/vtk*/vtkVersionMacros.h 2>/dev/null | tail -n 1) 2>/dev/null) - if test "x$VTK_INC" = "x" + if test "x$enablecapnproto" = "xyes" then : - if test "x$VTK_INCLUDE" != "x" -then : - if test -d $VTK_INCLUDE -then : - VTK_INC=$VTK_INCLUDE -fi -elif test -d $VTK_LS_CHECK -then : - VTK_INC=$VTK_LS_CHECK -elif test "x$VTK_DIR" != "x" + CAPNPROTO_INC="" + CAPNPROTO_LIB="" + + +# Check whether --with-capnproto was given. +if test ${with_capnproto+y} then : - VTK_INC=$VTK_DIR/include -else case e in #( - e) VTK_INC="/usr/include/vtk" ;; -esac -fi + withval=$with_capnproto; + CAPNPROTO_INC="$withval/include" + CAPNPROTO_LIB="$withval/lib" fi - if test "x$VTK_LIB" = "x" -then : - if test "x$VTK_DIR" != x + if test "x$CAPNPROTO_DIR" != x then : - VTK_LIB=$VTK_DIR/lib -else case e in #( - e) VTK_LIB="/usr/lib" ;; -esac -fi + + CAPNPROTO_INC="$CAPNPROTO_DIR/include" + CAPNPROTO_LIB="$CAPNPROTO_DIR/lib" fi + CAPNPROTO_INCLUDE="" + CAPNPROTO_LIBRARY="" -# Check whether --with-vtk-include was given. -if test ${with_vtk_include+y} + if test -r $CAPNPROTO_INC/capnp/common.h then : - withval=$with_vtk_include; withvtkinc=$withval + enablecapnproto=yes else case e in #( - e) withvtkinc=no ;; + e) + enablecapnproto=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Required header files not found, Cap'n Proto support disabled. >>>" >&5 +printf "%s\n" "<<< Required header files not found, Cap'n Proto support disabled. >>>" >&6; } + ;; esac fi + if test "x$enablecapnproto" = "xyes" +then : - -# Check whether --with-vtk-lib was given. -if test ${with_vtk_lib+y} + # Extract the first word of "capnp", so it can be a program name with args. +set dummy capnp; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CAPNP_BINARY+y} then : - withval=$with_vtk_lib; withvtklib=$withval + printf %s "(cached) " >&6 else case e in #( - e) withvtklib=no ;; -esac -fi - + e) if test -n "$CAPNP_BINARY"; then + ac_cv_prog_CAPNP_BINARY="$CAPNP_BINARY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CAPNP_BINARY="capnp" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - if test "$withvtkinc" != "no" -then : - VTK_INC="$withvtkinc" + test -z "$ac_cv_prog_CAPNP_BINARY" && ac_cv_prog_CAPNP_BINARY="none" +fi ;; +esac fi - if test "$withvtklib" != "no" -then : - VTK_LIB="$withvtklib" +CAPNP_BINARY=$ac_cv_prog_CAPNP_BINARY +if test -n "$CAPNP_BINARY"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CAPNP_BINARY" >&5 +printf "%s\n" "$CAPNP_BINARY" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - VTK_INCLUDE="" - VTK_LIBRARY="" - - if test "$enablevtk" = "yes" -then : - vtkincFound=no; - ac_vtk_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-I${VTK_INC} ${CPPFLAGS}" - for ac_header in vtkConfigure.h -do : - ac_fn_cxx_check_header_compile "$LINENO" "vtkConfigure.h" "ac_cv_header_vtkConfigure_h" "$ac_includes_default" -if test "x$ac_cv_header_vtkConfigure_h" = xyes + if test "x$CAPNP_BINARY" = "xcapnp" then : - printf "%s\n" "#define HAVE_VTKCONFIGURE_H 1" >>confdefs.h - vtkincFound=yes + enablecapnproto=yes +else case e in #( + e) + enablecapnproto=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< The 'capnp' utility is not in your PATH, Cap'n Proto support disabled. >>>" >&5 +printf "%s\n" "<<< The 'capnp' utility is not in your PATH, Cap'n Proto support disabled. >>>" >&6; } + ;; +esac fi -done - for ac_header in vtkVersionMacros.h -do : - ac_fn_cxx_check_header_compile "$LINENO" "vtkVersionMacros.h" "ac_cv_header_vtkVersionMacros_h" "$ac_includes_default" -if test "x$ac_cv_header_vtkVersionMacros_h" = xyes -then : - printf "%s\n" "#define HAVE_VTKVERSIONMACROS_H 1" >>confdefs.h - vtkincFound=yes fi -done - CPPFLAGS="${ac_vtk_save_CPPFLAGS}" - - if test "$vtkincFound" = "no" + # If the required programs were found in $PATH, continue. + if test "x$enablecapnproto" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: VTK header files not found!" >&5 -printf "%s\n" "VTK header files not found!" >&6; } - enablevtk=no; - -fi + printf '%s\n' "@0xdbb9ad1f14bf0b36;" > example.capnp + printf '%s\n' "struct Person {" >> example.capnp + printf '%s\n' "name @0 :Text;" >> example.capnp + printf '%s\n' "birthdate @3 :Date;" >> example.capnp + printf '%s\n' "email @1 :Text;" >> example.capnp + printf '%s\n' "phones @2 :List(PhoneNumber);" >> example.capnp + printf '%s\n' "struct PhoneNumber {" >> example.capnp + printf '%s\n' "number @0 :Text;" >> example.capnp + printf '%s\n' "type @1 :Type;" >> example.capnp + printf '%s\n' "enum Type {" >> example.capnp + printf '%s\n' "mobile @0;" >> example.capnp + printf '%s\n' "home @1;" >> example.capnp + printf '%s\n' "work @2;" >> example.capnp + printf '%s\n' "} } }" >> example.capnp + printf '%s\n' "struct Date {" >> example.capnp + printf '%s\n' "year @0 :Int16;" >> example.capnp + printf '%s\n' "month @1 :UInt8;" >> example.capnp + printf '%s\n' "day @2 :UInt8;" >> example.capnp + printf '%s\n' "}" >> example.capnp - if test "x$enablevtk" = "xyes" -then : + # Call the capnp utility + capnp compile -oc++ example.capnp - if test -r $VTK_INC/vtkVersionQuick.h + if test "x$?" = "x0" then : + enablecapnproto=yes +else case e in #( + e) + enablecapnproto=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< The 'capnp' utility function failed, Cap'n Proto support disabled. >>>" >&5 +printf "%s\n" "<<< The 'capnp' utility function failed, Cap'n Proto support disabled. >>>" >&6; } + ;; +esac +fi - vtkmajor=`grep "define VTK_MAJOR_VERSION" $VTK_INC/vtkVersionQuick.h | sed -e "s/.*#define VTK_MAJOR_VERSION[ ]*//g"` - vtkminor=`grep "define VTK_MINOR_VERSION" $VTK_INC/vtkVersionQuick.h | sed -e "s/.*#define VTK_MINOR_VERSION[ ]*//g"` - vtkbuild=`grep "define VTK_EPOCH_VERSION" $VTK_INC/vtkVersionQuick.h | sed -e "s/.*#define VTK_EPOCH_VERSION[ ]*//g"` - -elif test "x$vtkmajor" = "x" && test -r $VTK_INC/vtkVersionMacros.h -then : + rm -f example.capnp example.capnp.h example.capnp.c++ - vtkmajor=`grep "define VTK_MAJOR_VERSION" $VTK_INC/vtkVersionMacros.h | sed -e "s/.*#define VTK_MAJOR_VERSION[ ]*//g"` - vtkminor=`grep "define VTK_MINOR_VERSION" $VTK_INC/vtkVersionMacros.h | sed -e "s/.*#define VTK_MINOR_VERSION[ ]*//g"` - vtkbuild=`grep "define VTK_BUILD_VERSION" $VTK_INC/vtkVersionMacros.h | sed -e "s/.*#define VTK_BUILD_VERSION[ ]*//g"` +fi -elif test "x$vtkmajor" = "x" && test -r $VTK_INC/vtkConfigure.h + if test "x$enablecapnproto" = "xyes" then : - vtkmajor=`grep "define VTK_MAJOR_VERSION" $VTK_INC/vtkConfigure.h | sed -e "s/.*#define VTK_MAJOR_VERSION[ ]*//g"` - vtkminor=`grep "define VTK_MINOR_VERSION" $VTK_INC/vtkConfigure.h | sed -e "s/.*#define VTK_MINOR_VERSION[ ]*//g"` - vtkbuild=`grep "define VTK_BUILD_VERSION" $VTK_INC/vtkConfigure.h | sed -e "s/.*#define VTK_BUILD_VERSION[ ]*//g"` + CAPNPROTO_INCLUDE="-I$CAPNPROTO_INC" + CAPNPROTO_LIBRARY="-L$CAPNPROTO_LIB -lcapnp -lkj" + if test "x$RPATHFLAG" != "x" && test -d $CAPNPROTO_LIB +then : + CAPNPROTO_LIBRARY="${RPATHFLAG}${CAPNPROTO_LIB} $CAPNPROTO_LIBRARY" fi - vtkversion=$vtkmajor.$vtkminor.$vtkbuild - vtkmajorminor=$vtkmajor.$vtkminor - if test "x$vtkmajor" = "x" || test "x$vtkminor" = "x" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Cannot parse version macro from VTK header files!" >&5 -printf "%s\n" "Cannot parse version macro from VTK header files!" >&6; } - enablevtk=no; +printf "%s\n" "#define HAVE_CAPNPROTO 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with CAPNPROTO support >>>" >&5 +printf "%s\n" "<<< Configuring library with CAPNPROTO support >>>" >&6; } fi fi - if test "x$enablevtk" = "xyes" + if test "x$enablecapnproto" != "xyes" && test "x$capnprequired" = "xyes" then : + as_fn_error 6 "*** Cap'n Proto was not found, but --enable-capnp-required was specified. Make sure the capnp executable is in your PATH" "$LINENO" 5 +fi - old_LIBS="$LIBS" - old_CPPFLAGS="$CPPFLAGS" - # If this compiler supports -rpath commands, create a - # variable for them now that can be used in $LIBS below. We - # ran across an issue where GCC's linker actually needed - # -rpath flags in order to *link* a test program. From the - # man page for GNU ld: - # The -rpath option is also used when locating shared objects - # which are needed by shared objects explicitly included in - # the link; see the description of the -rpath-link option. - if test "x$RPATHFLAG" != "x" && test -d $VTK_LIB + + +if test x$enablecapnproto = xyes then : - VTK_RPATH_FLAGS="${RPATHFLAG}${VTK_LIB}" + + libmesh_optional_INCLUDES="$CAPNPROTO_INCLUDE $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$CAPNPROTO_LIBRARY $libmesh_optional_LIBS" + +fi + if test x$enablecapnproto = xyes; then + LIBMESH_ENABLE_CAPNPROTO_TRUE= + LIBMESH_ENABLE_CAPNPROTO_FALSE='#' +else + LIBMESH_ENABLE_CAPNPROTO_TRUE='#' + LIBMESH_ENABLE_CAPNPROTO_FALSE= fi - if test $vtkmajor -eq 5 -then : - VTK_LIBRARY="-L$VTK_LIB -lvtkIO -lvtkCommon -lvtkFiltering -lvtkImaging -lvtkParallel" -elif test $vtkmajor -eq 6 && test $vtkminor -le 1 -then : +ac_config_files="$ac_config_files contrib/capnproto/Makefile" - VTK_LIBRARY_WITH_VERSION="-L$VTK_LIB -lvtkIOCore-$vtkmajorminor -lvtkCommonCore-$vtkmajorminor -lvtkCommonDataModel-$vtkmajorminor \ - -lvtkFiltersCore-$vtkmajorminor -lvtkIOXML-$vtkmajorminor -lvtkImagingCore-$vtkmajorminor \ - -lvtkIOImage-$vtkmajorminor -lvtkImagingMath-$vtkmajorminor \ - -lvtkParallelMPI-$vtkmajorminor -lvtkParallelCore-$vtkmajorminor" +# ------------------------------------------------------------- - VTK_LIBRARY_NO_VERSION="-L$VTK_LIB -lvtkIOCore -lvtkCommonCore -lvtkCommonDataModel \ - -lvtkFiltersCore -lvtkIOXML -lvtkImagingCore \ - -lvtkIOImage -lvtkImagingMath \ - -lvtkParallelMPI -lvtkParallelCore" +# ------------------------------------------------------------- +# libcurl -- enabled by default +# Note: I tried to use the m4 files ax_lib_curl.m4 and +# ax_path_generic.m4 from the autoconf-archive for this, but they +# would not work (bootstrap failed!) on either Linux or OSX. +# ------------------------------------------------------------- + # Check whether --enable-curl was given. +if test ${enable_curl+y} +then : + enableval=$enable_curl; case "${enableval}" in #( + yes) : + enablecurl=yes ;; #( + no) : + enablecurl=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-curl" "$LINENO" 5 ;; +esac else case e in #( - e) - VTK_LIBRARY_WITH_VERSION="-L$VTK_LIB -lvtkIOCore-$vtkmajorminor -lvtkCommonCore-$vtkmajorminor -lvtkCommonDataModel-$vtkmajorminor \ - -lvtkFiltersCore-$vtkmajorminor -lvtkIOXML-$vtkmajorminor -lvtkImagingCore-$vtkmajorminor \ - -lvtkIOImage-$vtkmajorminor -lvtkImagingMath-$vtkmajorminor -lvtkIOParallelXML-$vtkmajorminor \ - -lvtkParallelMPI-$vtkmajorminor -lvtkParallelCore-$vtkmajorminor \ - -lvtkCommonExecutionModel-$vtkmajorminor -lvtksys-$vtkmajorminor" - - VTK_LIBRARY_NO_VERSION="-L$VTK_LIB -lvtkIOCore -lvtkCommonCore -lvtkCommonDataModel \ - -lvtkFiltersCore -lvtkIOXML -lvtkImagingCore \ - -lvtkIOImage -lvtkImagingMath -lvtkIOParallelXML \ - -lvtkParallelMPI -lvtkParallelCore \ - -lvtkCommonExecutionModel -lvtksys" - ;; + e) enablecurl=no ;; esac fi - if test $vtkmajor -gt 5 -then : - CPPFLAGS="$CPPFLAGS -I$VTK_INC" + if test "x$enablecurl" = "xyes" +then : - LIBS="$old_LIBS $VTK_RPATH_FLAGS $VTK_LIBRARY_NO_VERSION" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include "vtkSmartPointer.h" - #include "vtkCellArray.h" - #include "vtkUnstructuredGrid.h" - #include "vtkPoints.h" - #include "vtkDoubleArray.h" - #include "vtkXMLPUnstructuredGridWriter.h" - #include "vtkImageThreshold.h" - #include "vtkMPIController.h" +# Check whether --with-curl-include was given. +if test ${with_curl_include+y} +then : + withval=$with_curl_include; withcurlinc=$withval +else case e in #( + e) withcurlinc=no ;; +esac +fi -int -main (void) -{ - vtkSmartPointer cells = vtkSmartPointer::New(); - vtkSmartPointer grid = vtkSmartPointer::New(); - vtkSmartPointer points = vtkSmartPointer::New(); - vtkSmartPointer pcoords = vtkSmartPointer::New(); - vtkSmartPointer writer = vtkSmartPointer::New(); - vtkSmartPointer threshold = vtkSmartPointer::New(); - vtkSmartPointer controller = vtkSmartPointer::New(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" +# Check whether --with-curl-lib was given. +if test ${with_curl_lib+y} then : - enablevtk=yes - VTK_LIBRARY=$VTK_LIBRARY_NO_VERSION + withval=$with_curl_lib; withcurllib=$withval else case e in #( - e) enablevtk=no ;; + e) withcurllib=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test "x$enablevtk" = "xno" -then : - LIBS="$old_LIBS $VTK_RPATH_FLAGS $VTK_LIBRARY_WITH_VERSION" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + CURL_INC="/usr/include/curl" + CURL_LIB="/usr/lib" - #include "vtkSmartPointer.h" - #include "vtkCellArray.h" - #include "vtkUnstructuredGrid.h" - #include "vtkPoints.h" - #include "vtkDoubleArray.h" - #include "vtkXMLPUnstructuredGridWriter.h" - #include "vtkImageThreshold.h" - #include "vtkMPIController.h" + if test "x$withcurlinc" != "xno" +then : + CURL_INC="$withcurlinc" +fi -int -main (void) -{ + if test "x$withcurllib" != "xno" +then : + CURL_LIB="$withcurllib" +fi - vtkSmartPointer cells = vtkSmartPointer::New(); - vtkSmartPointer grid = vtkSmartPointer::New(); - vtkSmartPointer points = vtkSmartPointer::New(); - vtkSmartPointer pcoords = vtkSmartPointer::New(); - vtkSmartPointer writer = vtkSmartPointer::New(); - vtkSmartPointer threshold = vtkSmartPointer::New(); - vtkSmartPointer controller = vtkSmartPointer::New(); + # Initialize eventual Makefile/config.h substitution variables + CURL_INCLUDE="" + CURL_LIBRARY="" - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" + # Actually test for the existence of headers and libs. + if test "x$enablecurl" = "xyes" then : - enablevtk=yes - VTK_LIBRARY=$VTK_LIBRARY_WITH_VERSION -else case e in #( - e) enablevtk=no ;; -esac + + curlincFound=no; + ac_curl_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I${CURL_INC} ${CPPFLAGS}" + for ac_header in curl.h +do : + ac_fn_cxx_check_header_compile "$LINENO" "curl.h" "ac_cv_header_curl_h" "$ac_includes_default" +if test "x$ac_cv_header_curl_h" = xyes +then : + printf "%s\n" "#define HAVE_CURL_H 1" >>confdefs.h + curlincFound=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + +done + CPPFLAGS="${ac_curl_save_CPPFLAGS}" + + if test "x$curlincFound" = "xno" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: CURL header files not found!" >&5 +printf "%s\n" "CURL header files not found!" >&6; } + enablecurl=no fi - if test "x$enablevtk" = "xno" + #define LIBCURL_VERSION_MAJOR 7 + #define LIBCURL_VERSION_MINOR 37 + #define LIBCURL_VERSION_PATCH 1 + if test "x$enablecurl" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Linking a test program against the VTK libraries failed >>>" >&5 -printf "%s\n" "<<< Linking a test program against the VTK libraries failed >>>" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< libMesh requires VTK to be configured with -DVTK_Group_MPI:BOOL=ON >>>" >&5 -printf "%s\n" "<<< libMesh requires VTK to be configured with -DVTK_Group_MPI:BOOL=ON >>>" >&6; } + curlmajor=`grep "define LIBCURL_VERSION_MAJOR" $CURL_INC/curlver.h | sed -e "s/#define LIBCURL_VERSION_MAJOR[ ]*//g"` + curlminor=`grep "define LIBCURL_VERSION_MINOR" $CURL_INC/curlver.h | sed -e "s/#define LIBCURL_VERSION_MINOR[ ]*//g"` + curlversion=$curlmajor.$curlminor + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with CURL version $curlversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with CURL version $curlversion support >>>" >&6; } fi - LIBS="$old_LIBS" - CPPFLAGS="$old_CPPFLAGS" + if test "x$enablecurl" = "xyes" +then : -else case e in #( - e) - LIBS="$old_LIBS $VTK_RPATH_FLAGS $VTK_LIBRARY" - CPPFLAGS="$CPPFLAGS -I$VTK_INC" + old_LIBS="$LIBS" + LIBS="$old_LIBS -L$CURL_LIB" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5 +printf %s "checking for main in -lcurl... " >&6; } +if test ${ac_cv_lib_curl_main+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include "vtkSmartPointer.h" - #include "vtkCellArray.h" - #include "vtkUnstructuredGrid.h" - #include "vtkPoints.h" - #include "vtkDoubleArray.h" - #include "vtkXMLPUnstructuredGridWriter.h" - #include "vtkImageThreshold.h" - #include "vtkMPIController.h" - +namespace conftest { + extern "C" int main (); +} int main (void) { - - vtkSmartPointer cells = vtkSmartPointer::New(); - vtkSmartPointer grid = vtkSmartPointer::New(); - vtkSmartPointer points = vtkSmartPointer::New(); - vtkSmartPointer pcoords = vtkSmartPointer::New(); - vtkSmartPointer writer = vtkSmartPointer::New(); - vtkSmartPointer threshold = vtkSmartPointer::New(); - vtkSmartPointer controller = vtkSmartPointer::New(); - +return conftest::main (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : - enablevtk=yes + ac_cv_lib_curl_main=yes else case e in #( - e) enablevtk=no ;; + e) ac_cv_lib_curl_main=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - - if test "x$enablevtk" = "xno" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Linking a test program against the VTK libraries failed >>>" >&5 -printf "%s\n" "<<< Linking a test program against the VTK libraries failed >>>" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< libMesh requires VTK to be configured with -DVTK_USE_PARALLEL:BOOL=ON -DVTK_USE_MPI:BOOL=ON >>>" >&5 -printf "%s\n" "<<< libMesh requires VTK to be configured with -DVTK_USE_PARALLEL:BOOL=ON -DVTK_USE_MPI:BOOL=ON >>>" >&6; } - +LIBS=$ac_check_lib_save_LIBS ;; +esac fi - - LIBS="$old_LIBS" - CPPFLAGS="$old_CPPFLAGS" - ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_main" >&5 +printf "%s\n" "$ac_cv_lib_curl_main" >&6; } +if test "x$ac_cv_lib_curl_main" = xyes +then : + enablecurl=yes +else case e in #( + e) enablecurl=no ;; esac fi + + LIBS="$old_LIBS" + fi - if test "x$enablevtk" = "xyes" + if test "x$enablecurl" = "xyes" then : - VTK_INCLUDE="-I$VTK_INC" - - if test "x$RPATHFLAG" != "x" && test -d $VTK_LIB + CURL_INCLUDE="-I$CURL_INC" + CURL_LIBRARY="-L$CURL_LIB -lcurl" + if test "x$RPATHFLAG" != "x" && test -d $CURL_LIB then : - VTK_LIBRARY="${RPATHFLAG}${VTK_LIB} $VTK_LIBRARY" + if test "$CURL_LIB" != "/usr/lib" && test "$CURL_LIB" != "/usr/lib64" +then : + CURL_LIBRARY="${RPATHFLAG}${CURL_LIB} $CURL_LIBRARY" +fi fi +printf "%s\n" "#define HAVE_CURL 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with CURL support >>>" >&5 +printf "%s\n" "<<< Configuring library with CURL support >>>" >&6; } - - - -printf "%s\n" "#define DETECTED_VTK_VERSION_MAJOR $vtkmajor" >>confdefs.h - - - -printf "%s\n" "#define DETECTED_VTK_VERSION_MINOR $vtkminor" >>confdefs.h - - - -printf "%s\n" "#define DETECTED_VTK_VERSION_SUBMINOR $vtkbuild" >>confdefs.h - - - -printf "%s\n" "#define HAVE_VTK 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with VTK version $vtkversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with VTK version $vtkversion support >>>" >&6; } - -else case e in #( - e) - VTK_LIBRARY='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library without VTK support >>>" >&5 -printf "%s\n" "<<< Configuring library without VTK support >>>" >&6; } - ;; -esac fi fi @@ -69340,1530 +70635,1764 @@ fi - if test "$enablevtk" = "no" && test "$vtkrequired" = "yes" -then : - as_fn_error 4 "*** VTK was not found, but --enable-vtk-required was specified." "$LINENO" 5 -fi - -if test x$enablevtk = xyes +if test x$enablecurl = xyes then : - libmesh_optional_INCLUDES="$VTK_INCLUDE $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$VTK_LIBRARY $libmesh_optional_LIBS" + libmesh_optional_INCLUDES="$CURL_INCLUDE $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$CURL_LIBRARY $libmesh_optional_LIBS" fi - if test x$enablevtk = xyes; then - LIBMESH_ENABLE_VTK_TRUE= - LIBMESH_ENABLE_VTK_FALSE='#' + if test x$enablecurl = xyes; then + LIBMESH_ENABLE_CURL_TRUE= + LIBMESH_ENABLE_CURL_FALSE='#' else - LIBMESH_ENABLE_VTK_TRUE='#' - LIBMESH_ENABLE_VTK_FALSE= + LIBMESH_ENABLE_CURL_TRUE='#' + LIBMESH_ENABLE_CURL_FALSE= fi # ------------------------------------------------------------- -# ------------------------------------------------------------- -# Eigen -- Optimized linear algebra routines, enabled by default -# ------------------------------------------------------------- +# -------------------------------------------------------------- +# HDF5 -- disabled by default +# -------------------------------------------------------------- -# we require Eigen/Sparse support if we're going to enable Eigen -enableeigensparse=yes -# we test with Eigen 3.1.2, so if the user has their own Eigen it -# should be at least that new. +# PETSc configure can --download-hdf5, and that's a really convenient +# feature for users ... but libMesh --enable-hdf5 will only detect it +# if we add PETSc include and lib directory flags *here*; if we wait +# until build time it's too late. - # Check whether --enable-eigen was given. -if test ${enable_eigen+y} +ac_PETSCHDF5_save_CPPFLAGS="$CPPFLAGS" +ac_PETSCHDF5_save_LDFLAGS="$LDFLAGS" + +if test "x$enablepetsc" != "xno" then : - enableval=$enable_eigen; case "${enableval}" in #( + + CPPFLAGS="$PETSCINCLUDEDIRS $CPPFLAGS" + LDFLAGS="$PETSCLINKLIBS $LDFLAGS" + +fi + + + # Check whether --enable-hdf5 was given. +if test ${enable_hdf5+y} +then : + enableval=$enable_hdf5; case "${enableval}" in #( yes) : - enableeigen=yes ;; #( + enablehdf5=yes ;; #( no) : - enableeigen=no ;; #( + enablehdf5=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-eigen" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-hdf5" "$LINENO" 5 ;; esac else case e in #( - e) enableeigen=$enableoptional ;; + e) enablehdf5=no ;; esac fi - is_package_required=no - - install_internal_eigen=no - if test "x$enableeigen" = "xyes" -then : - - -# Check whether --with-eigen-include was given. -if test ${with_eigen_include+y} + # Check whether --enable-hdf5-required was given. +if test ${enable_hdf5_required+y} then : - withval=$with_eigen_include; witheigeninc=$withval + enableval=$enable_hdf5_required; case "${enableval}" in #( + yes) : + hdf5required=yes + enablehdf5=yes ;; #( + no) : + hdf5required=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-hdf5-required" "$LINENO" 5 ;; +esac else case e in #( - e) witheigeninc=no ;; + e) hdf5required=no ;; esac fi - if test "x$witheigeninc" != "xno" -then : - EIGEN_INC="$witheigeninc" -elif test "x$EIGEN_INC" != "x" && test -f $EIGEN_INC/Eigen/Eigen -then : - printf "%s\n" "Environment EIGEN_INC=$EIGEN_INC" -elif test "x$EIGEN3_INCLUDE" != "x" && test -f $EIGEN3_INCLUDE/Eigen/Eigen -then : - EIGEN_INC=$EIGEN3_INCLUDE - printf "%s\n" "Environment EIGEN3_INCLUDE=$EIGEN_INC" -elif test "x$EIGEN_INCLUDE" != "x" && test -f $EIGEN_INCLUDE/Eigen/Eigen -then : - EIGEN_INC=$EIGEN_INCLUDE - printf "%s\n" "Environment EIGEN_INCLUDE=$EIGEN_INC" -elif test -f /usr/include/eigen3/Eigen/Eigen + if test "x$enablehdf5" = "xyes" then : - EIGEN_INC="/usr/include/eigen3" - printf "%s\n" "System EIGEN_INC=$EIGEN_INC" -else case e in #( - e) EIGEN_INC="/usr/include" - printf "%s\n" "Testing EIGEN_INC=$EIGEN_INC" ;; -esac -fi - EIGEN_INCLUDE="" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +HAVE_HDF5=0 - externaleigenincFound=no; - ac_eigen_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-I${EIGEN_INC} ${CPPFLAGS}" - for ac_header in Eigen/Eigen -do : - ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Eigen" "ac_cv_header_Eigen_Eigen" "$ac_includes_default" -if test "x$ac_cv_header_Eigen_Eigen" = xyes -then : - printf "%s\n" "#define HAVE_EIGEN_EIGEN 1" >>confdefs.h - externaleigenincFound=yes -fi -done - CPPFLAGS="${ac_eigen_save_CPPFLAGS}" - if test "x$externaleigenincFound" = "xyes" +# Check whether --with-hdf5 was given. +if test ${with_hdf5+y} then : - - enableeigenincFound=yes - ac_eigen_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-I${EIGEN_INC} ${CPPFLAGS}" - for ac_header in Eigen/Dense -do : - ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Dense" "ac_cv_header_Eigen_Dense" "$ac_includes_default" -if test "x$ac_cv_header_Eigen_Dense" = xyes + withval=$with_hdf5; + with_hdf5=$withval + if test "x${with_hdf5}" != "xyes" then : - printf "%s\n" "#define HAVE_EIGEN_DENSE 1" >>confdefs.h + HDF5_PREFIX=$withval +fi else case e in #( - e) enableeigenincFound=no ;; -esac -fi + e) + with_hdf5=$withval -done - if test "x$enableeigensparse" = "xyes" -then : - for ac_header in Eigen/Sparse -do : - ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default" -if test "x$ac_cv_header_Eigen_Sparse" = xyes + if test "x${HDF5_DIR}" != "x" then : - printf "%s\n" "#define HAVE_EIGEN_SPARSE 1" >>confdefs.h -else case e in #( - e) enableeigenincFound=no ;; + HDF5_PREFIX=${HDF5_DIR} + with_hdf5=yes + +fi + ;; esac fi -done -fi - CPPFLAGS="${ac_eigen_save_CPPFLAGS}" + +is_package_required=$hdf5required + +if test "x$is_package_required" = "xyes" +then : + with_hdf5=yes fi - if test "x$enableeigenincFound" = "xyes" +if test "x${with_hdf5}" != "xno" then : - EIGEN_INCLUDE="-I$EIGEN_INC" -elif test -d $top_srcdir/contrib/eigen/eigen + + if test -d "${HDF5_PREFIX}/lib" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< external Eigen header files not found, using Eigen from ./contrib >>>" >&5 -printf "%s\n" "<<< external Eigen header files not found, using Eigen from ./contrib >>>" >&6; } - EIGEN_INC=$top_srcdir/contrib/eigen/eigen - EIGEN_INCLUDE="-I\$(top_srcdir)/contrib/eigen/eigen" - install_internal_eigen=yes -else case e in #( - e) enableeigen=no ;; -esac + + HDF5_LDFLAGS="-L${HDF5_PREFIX}/lib" + HDF5_LIBS="-lhdf5" + fi - if test "x$enableeigen" = "xyes" + if test "x$RPATHFLAG" != "x" && test -d "${HDF5_PREFIX}/lib" then : - ac_eigen_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-I${EIGEN_INC} ${CPPFLAGS}" + HDF5_LDFLAGS="${HDF5_LDFLAGS} ${RPATHFLAG}${HDF5_PREFIX}/lib" - { ac_cv_header_Eigen_Dense=; unset ac_cv_header_Eigen_Dense;} - { ac_cv_header_Eigen_Sparse=; unset ac_cv_header_Eigen_Sparse;} +fi - for ac_header in Eigen/Dense -do : - ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Dense" "ac_cv_header_Eigen_Dense" "$ac_includes_default" -if test "x$ac_cv_header_Eigen_Dense" = xyes + if test -d "${HDF5_PREFIX}/include" then : - printf "%s\n" "#define HAVE_EIGEN_DENSE 1" >>confdefs.h - -else case e in #( - e) enableeigen=no ;; -esac + HDF5_CPPFLAGS="-I${HDF5_PREFIX}/include" fi -done + ac_HDF5_save_CFLAGS="$CFLAGS" + ac_HDF5_save_CPPFLAGS="$CPPFLAGS" + ac_HDF5_save_LDFLAGS="$LDFLAGS" + ac_HDF5_save_LIBS="$LIBS" - if test "x$enableeigensparse" = "xyes" -then : - for ac_header in Eigen/Sparse -do : - ac_fn_cxx_check_header_compile "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default" -if test "x$ac_cv_header_Eigen_Sparse" = xyes -then : - printf "%s\n" "#define HAVE_EIGEN_SPARSE 1" >>confdefs.h + CFLAGS="${HDF5_CPPFLAGS} ${CFLAGS}" + CPPFLAGS="${HDF5_CPPFLAGS} ${CPPFLAGS}" + LDFLAGS="${HDF5_LDFLAGS} ${LDFLAGS}" + LIBS="${HDF5_LIBS} ${LIBS}" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_fn_c_check_header_compile "$LINENO" "hdf5.h" "ac_cv_header_hdf5_h" "$ac_includes_default" +if test "x$ac_cv_header_hdf5_h" = xyes +then : + found_header=yes else case e in #( - e) enableeigen=no ;; + e) found_header=no ;; esac fi -done -fi - min_eigen_version=3.1.2 + min_hdf5_version=1.8.0 - MAJOR_VER=`echo $min_eigen_version | sed 's/^\([0-9]*\).*/\1/'` - if test "x${MAJOR_VER}" = "x" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 version >= $min_hdf5_version" >&5 +printf %s "checking for HDF5 version >= $min_hdf5_version... " >&6; } + + MAJOR_VER=`echo $min_hdf5_version | sed 's/^\([0-9]*\).*/\1/'` + if test "x${MAJOR_VER}" = "x" then : MAJOR_VER=0 fi - MINOR_VER=`echo $min_eigen_version | sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\2/'` - if test "x${MINOR_VER}" = "x" + MINOR_VER=`echo $min_hdf5_version | sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\2/'` + if test "x${MINOR_VER}" = "x" then : MINOR_VER=0 fi - MICRO_VER=`echo $min_eigen_version | sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\3/'` - if test "x${MICRO_VER}" = "x" + MICRO_VER=`echo $min_hdf5_version | sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\3/'` + if test "x${MICRO_VER}" = "x" then : MICRO_VER=0 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for eigen - version >= $min_eigen_version" >&5 -printf %s "checking for eigen - version >= $min_eigen_version... " >&6; } + succeeded=no + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x${found_header}" = "xyes" +then : + + min_version_succeeded=no + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include "Eigen/Core" + #include int main (void) { - #if EIGEN_WORLD_VERSION > $MAJOR_VER - #elif (EIGEN_WORLD_VERSION >= $MAJOR_VER) && (EIGEN_MAJOR_VERSION > $MINOR_VER) - #elif (EIGEN_WORLD_VERSION >= $MAJOR_VER) && (EIGEN_MAJOR_VERSION >= $MINOR_VER) && (EIGEN_MINOR_VERSION >= $MICRO_VER) - #else - # error version is too old - #endif + #if H5_VERS_MAJOR > $MAJOR_VER + /* Sweet nibblets */ + #elif (H5_VERS_MAJOR >= $MAJOR_VER) && (H5_VERS_MINOR >= $MINOR_VER) && (H5_VERS_RELEASE >= $MICRO_VER) + /* Winner winner, chicken dinner */ + #else + # error HDF5 version is too old + #endif ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + min_version_succeeded=yes else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - enableeigen=no - ;; + min_version_succeeded=no + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - CPPFLAGS="${ac_eigen_save_CPPFLAGS}" - if test "x$enableeigen" = "xyes" + if test "x$min_version_succeeded" = "xno" then : - HAVE_EIGEN=1 -printf "%s\n" "#define HAVE_EIGEN 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Eigen support >>>" >&5 -printf "%s\n" "<<< Configuring library with Eigen support >>>" >&6; } -elif test "x$is_package_required" = "xyes" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + if test "x$is_package_required" = "xyes" then : - as_fn_error $? "Your EIGEN version ($EIGEN_INC) does not meet the minimum versioning - requirements ($min_eigen_version). Please use --with-eigen-include to - specify the location of an updated installation." "$LINENO" 5 + as_fn_error $? "Your HDF5 library version does not meet the minimum version requirement (HDF5 >= $min_hdf5_version). Please use --with-hdf5 to specify the location of a valid installation." "$LINENO" 5 fi +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for H5Fopen in -lhdf5" >&5 +printf %s "checking for H5Fopen in -lhdf5... " >&6; } +if test ${ac_cv_lib_hdf5_H5Fopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lhdf5 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char H5Fopen (void); +int +main (void) +{ +return H5Fopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_hdf5_H5Fopen=yes +else case e in #( + e) ac_cv_lib_hdf5_H5Fopen=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_H5Fopen" >&5 +printf "%s\n" "$ac_cv_lib_hdf5_H5Fopen" >&6; } +if test "x$ac_cv_lib_hdf5_H5Fopen" = xyes +then : + found_library=yes +else case e in #( + e) found_library=no ;; +esac fi + succeeded=no + if test "x$found_header" = "xyes" && test "x$min_version_succeeded" = "xyes" && test "x$found_library" = "xyes" +then : + succeeded=yes +fi +fi -if test "x$enableeigen" = xyes + CFLAGS="$ac_HDF5_save_CFLAGS" + CPPFLAGS="$ac_HDF5_save_CPPFLAGS" + LDFLAGS="$ac_HDF5_save_LDFLAGS" + LIBS="$ac_HDF5_save_LIBS" + + if test "x$succeeded" = "xno" then : - if test "x$install_internal_eigen" = xyes + if test "x$is_package_required" = "xyes" then : - libmesh_contrib_INCLUDES="$EIGEN_INCLUDE $libmesh_contrib_INCLUDES" + as_fn_error $? "HDF5 not found. Try either --with-hdf5 or setting HDF5_DIR." "$LINENO" 5 else case e in #( - e) libmesh_optional_INCLUDES="$EIGEN_INCLUDE $libmesh_optional_INCLUDES" ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: optional HDF5 library not found, or does not meet version requirements" >&5 +printf "%s\n" "$as_me: optional HDF5 library not found, or does not meet version requirements" >&6;} ;; esac fi -fi -ac_config_files="$ac_config_files contrib/eigen/eigen/Makefile" + HDF5_CFLAGS="" + HDF5_CPPFLAGS="" + HDF5_LIBS="" + HDF5_PREFIX="" - if test x$enableeigen = xyes; then - LIBMESH_ENABLE_EIGEN_TRUE= - LIBMESH_ENABLE_EIGEN_FALSE='#' -else - LIBMESH_ENABLE_EIGEN_TRUE='#' - LIBMESH_ENABLE_EIGEN_FALSE= +else case e in #( + e) + HAVE_HDF5=1 + +printf "%s\n" "#define HAVE_HDF5 1" >>confdefs.h + + + + + + + ;; +esac fi - if test x$install_internal_eigen = xyes; then - LIBMESH_INSTALL_INTERNAL_EIGEN_TRUE= - LIBMESH_INSTALL_INTERNAL_EIGEN_FALSE='#' -else - LIBMESH_INSTALL_INTERNAL_EIGEN_TRUE='#' - LIBMESH_INSTALL_INTERNAL_EIGEN_FALSE= fi -#-------------------------------------------------------------- +#AM_CONDITIONAL(HDF5_ENABLED,test x$HAVE_HDF5 = x1) + if test "x$HAVE_HDF5" = "x0" +then : -# ------------------------------------------------------------- -# GLPK -- Needed by the SCM routine of rbOOmit. -# Enabled by default. -# ------------------------------------------------------------- + enablehdf5=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< HDF5 support not found or disabled >>>" >&5 +printf "%s\n" "<<< HDF5 support not found or disabled >>>" >&6; } - # Check whether --enable-glpk was given. -if test ${enable_glpk+y} -then : - enableval=$enable_glpk; case "${enableval}" in #( - yes) : - enableglpk=yes ;; #( - no) : - enableglpk=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-glpk" "$LINENO" 5 ;; -esac else case e in #( - e) enableglpk=$enableoptional ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with HDF5 support >>>" >&5 +printf "%s\n" "<<< Configuring library with HDF5 support >>>" >&6; } ;; esac fi +fi + - if test "x$enableglpk" = "xyes" +CPPFLAGS="$ac_PETSCHDF5_save_CPPFLAGS" +LDFLAGS="$ac_PETSCHDF5_save_LDFLAGS" + +if test $enablehdf5 = yes then : + libmesh_optional_INCLUDES="$HDF5_CPPFLAGS $libmesh_optional_INCLUDES" -# Check whether --with-glpk-include was given. -if test ${with_glpk_include+y} + if test "$hdf5_has_cxx" = yes then : - withval=$with_glpk_include; withglpkinc=$withval -else case e in #( - e) withglpkinc=no ;; -esac + libmesh_optional_LIBS="$HDF5_CXXLIBS $libmesh_optional_LIBS" fi + libmesh_optional_LIBS="$HDF5_LIBS $libmesh_optional_LIBS" +fi + if test x$enablehdf5 = xyes; then + LIBMESH_ENABLE_HDF5_TRUE= + LIBMESH_ENABLE_HDF5_FALSE='#' +else + LIBMESH_ENABLE_HDF5_TRUE='#' + LIBMESH_ENABLE_HDF5_FALSE= +fi -# Check whether --with-glpk-lib was given. -if test ${with_glpk_lib+y} + +# -------------------------------------------------------------- +# libxml2 for netCDF +# -------------------------------------------------------------- + + +# Check whether --with-xml-prefix was given. +if test ${with_xml_prefix+y} then : - withval=$with_glpk_lib; withglpklib=$withval + withval=$with_xml_prefix; xml_config_prefix="$withval" else case e in #( - e) withglpklib=no ;; + e) xml_config_prefix="" ;; esac fi - if test "x$withglpkinc" != "xno" -then : - GLPK_INC="$withglpkinc" -elif test "x$GLPK_INC" != "x" && test -f $GLPK_INC/glpk.h -then : - printf "%s\n" "Environment GLPK_INC=$GLPK_INC" -elif test "x$GLPK_DIR" != "x" && test -f $GLPK_DIR/include/glpk.h -then : - GLPK_INC="$GLPK_DIR/include" -elif test -f /usr/include/glpk/glpk.h -then : - GLPK_INC="/usr/include/glpk" -elif test -f /usr/local/include/glpk.h +# Check whether --with-xml-exec-prefix was given. +if test ${with_xml_exec_prefix+y} then : - GLPK_INC="/usr/local/include" + withval=$with_xml_exec_prefix; xml_config_exec_prefix="$withval" else case e in #( - e) GLPK_INC="/usr/include" ;; + e) xml_config_exec_prefix="" ;; esac fi - if test "x$withglpklib" != "xno" -then : - GLPK_LIB="$withglpklib" -elif test "x$GLPK_LIB" != "x" -then : - printf "%s\n" "Environment GLPK_LIB=$GLPK_INC" -elif test "x$GLPK_DIR" != "x" -then : - GLPK_LIB="$GLPK_DIR/lib" -elif test -f /usr/include/glpk/glpk.h -then : - if test -f /usr/lib64/libglpk.so || test -f /usr/lib64/libglpk.a -then : - GLPK_LIB="/usr/lib64" -elif test -f /usr/lib/libglpk.so || test -f /usr/lib/libglpk.a +# Check whether --enable-xmltest was given. +if test ${enable_xmltest+y} then : - GLPK_LIB="/usr/lib" + enableval=$enable_xmltest; +else case e in #( + e) enable_xmltest=yes ;; +esac fi -elif test -f /usr/local/include/glpk.h + + + if test x$xml_config_exec_prefix != x ; then + xml_config_args="$xml_config_args" + if test x${XML2_CONFIG+set} != xset ; then + XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config + fi + fi + if test x$xml_config_prefix != x ; then + xml_config_args="$xml_config_args --prefix=$xml_config_prefix" + if test x${XML2_CONFIG+set} != xset ; then + XML2_CONFIG=$xml_config_prefix/bin/xml2-config + fi + fi + + # Extract the first word of "xml2-config", so it can be a program name with args. +set dummy xml2-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_XML2_CONFIG+y} then : - GLPK_LIB="/usr/local/lib" + printf %s "(cached) " >&6 else case e in #( - e) GLPK_LIB="/usr/lib" ;; + e) case $XML2_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_XML2_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_XML2_CONFIG" && ac_cv_path_XML2_CONFIG="no" + ;; +esac ;; esac +fi +XML2_CONFIG=$ac_cv_path_XML2_CONFIG +if test -n "$XML2_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5 +printf "%s\n" "$XML2_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - GLPK_INCLUDE="" - GLPK_LIBRARY="" - if test "x$enableglpk" = "xyes" + min_xml_version=2.0.0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml - version >= $min_xml_version" >&5 +printf %s "checking for libxml - version >= $min_xml_version... " >&6; } + no_xml="" + if test "$XML2_CONFIG" = "no" ; then + no_xml=yes + else + XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags` + XML_LIBS=`$XML2_CONFIG $xml_config_args --libs` + xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_xmltest" = "xyes" ; then + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" + LIBS="$XML_LIBS $LIBS" + rm -f conf.xmltest + if test "$cross_compiling" = yes then : + echo $ac_n "cross compiling; assumed OK... $ac_c" +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - glpkincFound=no; - ac_glpk_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-I${GLPK_INC} ${CPPFLAGS}" - for ac_header in glpk.h -do : - ac_fn_cxx_check_header_compile "$LINENO" "glpk.h" "ac_cv_header_glpk_h" "$ac_includes_default" -if test "x$ac_cv_header_glpk_h" = xyes -then : - printf "%s\n" "#define HAVE_GLPK_H 1" >>confdefs.h - glpkincFound=yes -fi +#include +#include +#include +#include + +int +main() +{ + int xml_major_version, xml_minor_version, xml_micro_version; + int major, minor, micro; + char *tmp_version; + + system("touch conf.xmltest"); + + /* Capture xml2-config output via autoconf/configure variables */ + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *)strdup("$min_xml_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string from xml2-config\n", "$min_xml_version"); + exit(1); + } + free(tmp_version); + + /* Capture the version information from the header files */ + tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION); + if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) { + printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION"); + exit(1); + } + free(tmp_version); + + /* Compare xml2-config output to the libxml headers */ + if ((xml_major_version != $xml_config_major_version) || + (xml_minor_version != $xml_config_minor_version) || + (xml_micro_version != $xml_config_micro_version)) + { + printf("*** libxml header files (version %d.%d.%d) do not match\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** xml2-config (version %d.%d.%d)\n", + $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); + return 1; + } +/* Compare the headers to the library to make sure we match */ + /* Less than ideal -- doesn't provide us with return value feedback, + * only exits if there's a serious mismatch between header and library. + */ + LIBXML_TEST_VERSION; -done - CPPFLAGS="${ac_glpk_save_CPPFLAGS}" + /* Test that the library is greater than our minimum version */ + if ((xml_major_version > major) || + ((xml_major_version == major) && (xml_minor_version > minor)) || + ((xml_major_version == major) && (xml_minor_version == minor) && + (xml_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** You need a version of libxml newer than %d.%d.%d.\n", + major, minor, micro); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the xml2-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); + printf("*** correct copy of xml2-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + return 1; +} - if test "x$glpkincFound" = "xno" +_ACEOF +if ac_fn_c_try_run "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GLPK header files not found!" >&5 -printf "%s\n" "GLPK header files not found!" >&6; } - enableglpk=no - +else case e in #( + e) no_xml=yes ;; +esac fi - - if test "x$enableglpk" = "xyes" -then : - - glpkmajor=`grep "define GLP_MAJOR_VERSION" $GLPK_INC/glpk.h | sed -e "s/#define GLP_MAJOR_VERSION[ ]*//g"` - glpkminor=`grep "define GLP_MINOR_VERSION" $GLPK_INC/glpk.h | sed -e "s/#define GLP_MINOR_VERSION[ ]*//g"` - glpkversion=$glpkmajor.$glpkminor - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with GLPK version $glpkversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with GLPK version $glpkversion support >>>" >&6; } - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - if test "x$enableglpk" = "xyes" -then : - - old_LIBS="$LIBS" - LIBS="$old_LIBS -L$GLPK_LIB" + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + fi + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lglpk" >&5 -printf %s "checking for main in -lglpk... " >&6; } -if test ${ac_cv_lib_glpk_main+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lglpk $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$no_xml" = x ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)" >&5 +printf "%s\n" "yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)" >&6; } + haveexternalxml2=yes + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + if test "$XML2_CONFIG" = "no" ; then + echo "*** The xml2-config script installed by LIBXML could not be found" + echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the XML2_CONFIG environment variable to the" + echo "*** full path to xml2-config." + else + if test -f conf.xmltest ; then + : + else + echo "*** Could not run libxml test program, checking why..." + CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" + LIBS="$LIBS $XML_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int main (); -} +#include +#include + int main (void) { -return conftest::main (); + LIBXML_TEST_VERSION; return 0; ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_glpk_main=yes + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding LIBXML or finding the wrong" + echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else case e in #( - e) ac_cv_lib_glpk_main=no ;; + e) echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occurred. This usually means LIBXML was incorrectly installed" + echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" + echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glpk_main" >&5 -printf "%s\n" "$ac_cv_lib_glpk_main" >&6; } -if test "x$ac_cv_lib_glpk_main" = xyes -then : - enableglpk=yes -else case e in #( - e) enableglpk=no ;; -esac -fi - - - LIBS="$old_LIBS" + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + fi + fi -fi + XML_CPPFLAGS="" + XML_LIBS="" + haveexternalxml2=no + fi - if test "x$enableglpk" = "xyes" -then : - GLPK_INCLUDE="-I$GLPK_INC" - GLPK_LIBRARY="-L$GLPK_LIB -lglpk" - if test "x$RPATHFLAG" != "x" && test -d $GLPK_LIB -then : + rm -f conf.xmltest - if test "$GLPK_LIB" != "/usr/lib" && test "$GLPK_LIB" != "/usr/lib64" +if test $haveexternalxml2 = yes then : - GLPK_LIBRARY="${RPATHFLAG}${GLPK_LIB} $GLPK_LIBRARY" -fi - + libmesh_contrib_CPPFLAGS="$XML_CPPFLAGS $libmesh_contrib_CPPFLAGS" + libmesh_contrib_LIBS="$XML_LIBS $libmesh_contrib_LIBS" fi -printf "%s\n" "#define HAVE_GLPK 1" >>confdefs.h +# -------------------------------------------------------------- +# netCDF -- enabled by default (it is distributed in contrib) +# -------------------------------------------------------------- - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with GLPK support >>>" >&5 -printf "%s\n" "<<< Configuring library with GLPK support >>>" >&6; } + configure_netcdf_v462='' + configure_netcdf_v492='' + # Check whether --enable-netcdf was given. +if test ${enable_netcdf+y} +then : + enableval=$enable_netcdf; case "${enableval}" in #( + v492) : + enablenetcdf=yes + netcdfversion="v4.9.2" + configure_netcdf_v492=yes ;; #( + yes|new|v4|v462) : + enablenetcdf=yes + netcdfversion="v4.6.2" + configure_netcdf_v462=yes ;; #( + all) : + enablenetcdf=yes + netcdfversion="v4.9.2" + configure_netcdf_v462=yes + configure_netcdf_v492=yes ;; #( + old|v3) : + enablenetcdf=yes + netcdfversion=3 ;; #( + no) : + enablenetcdf=no + netcdfversion=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-netcdf" "$LINENO" 5 ;; +esac +else case e in #( + e) enablenetcdf=$enableoptional; + netcdfversion="v4.6.2" + configure_netcdf_v462=yes ;; +esac fi -fi + if test "x$enablenetcdf" = "xno" +then : + netcdfversion=no; + configure_netcdf_v462='' + configure_netcdf_v492='' fi - - - -if test x$enableglpk = xyes + if test "x$netcdfversion" = "x3" then : - libmesh_optional_INCLUDES="$GLPK_INCLUDE $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$GLPK_LIBRARY $libmesh_optional_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using netCDF 3.x is no longer supported, using version 4.x instead. >>>" >&5 +printf "%s\n" "<<< Using netCDF 3.x is no longer supported, using version 4.x instead. >>>" >&6; } + netcdfversion=4 -fi - if test x$enableglpk = xyes; then - LIBMESH_ENABLE_GLPK_TRUE= - LIBMESH_ENABLE_GLPK_FALSE='#' -else - LIBMESH_ENABLE_GLPK_TRUE='#' - LIBMESH_ENABLE_GLPK_FALSE= fi -# ------------------------------------------------------------- + netcdf_v4_arg='' + case "${netcdfversion}" in #( + 3) : + as_fn_error $? ">>> Error: netCDF3 is no longer distributed with libMesh <<<" "$LINENO" 5 + ;; #( + "v4.6.2") : + NETCDF_INCLUDE="-I\$(top_srcdir)/contrib/netcdf/netcdf-c-4.6.2/include -I\$(top_builddir)/contrib/netcdf/netcdf-c-4.6.2/include" -# ------------------------------------------------------------- -# NLOPT -- A library of nonlinear optimization routines. -# ------------------------------------------------------------- +printf "%s\n" "#define HAVE_NETCDF 1" >>confdefs.h - # Check whether --enable-nlopt was given. -if test ${enable_nlopt+y} + if test "x$enablenested" = "xno" then : - enableval=$enable_nlopt; case "${enableval}" in #( - yes) : - enablenlopt=yes ;; #( - no) : - enablenlopt=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-nlopt" "$LINENO" 5 ;; -esac -else case e in #( - e) enablenlopt=$enableoptional ;; -esac + as_fn_error $? "NetCDF v4 requires nested subpackages, try --enable-nested" "$LINENO" 5 fi - - if test "x$enablenlopt" = "xyes" && test "$dof_bytes" != "4" + if test "x$enablehdf5" = "xno" then : + netcdf_v4_arg=--disable-netcdf-4 +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< nlopt can only be enabled if libmesh is configured with --with-dof-id-bytes=4. >>>" >&5 -printf "%s\n" "<<< nlopt can only be enabled if libmesh is configured with --with-dof-id-bytes=4. >>>" >&6; } - enablenlopt=no + libmesh_pkgconfig_requires="netcdf >= 4.2 $libmesh_pkgconfig_requires" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NetCDF version 4.6.2 support >>>" >&5 +printf "%s\n" "<<< Configuring library with NetCDF version 4.6.2 support >>>" >&6; } ;; #( + "v4.9.2") : + NETCDF_INCLUDE="-I\$(top_srcdir)/contrib/netcdf/netcdf-c/include -I\$(top_builddir)/contrib/netcdf/netcdf-c/include" -fi +printf "%s\n" "#define HAVE_NETCDF 1" >>confdefs.h - if test "x$enablenlopt" = "xyes" + if test "x$enablenested" = "xno" then : + as_fn_error $? "NetCDF v4 requires nested subpackages, try --enable-nested" "$LINENO" 5 +fi - # User-specific include path - -# Check whether --with-nlopt-include was given. -if test ${with_nlopt_include+y} + if test "x$enablehdf5" = "xno" then : - withval=$with_nlopt_include; withnloptinc=$withval -else case e in #( - e) withnloptinc=no ;; -esac + netcdf_v4_arg=--disable-netcdf-4 fi + libmesh_pkgconfig_requires="netcdf >= 4.2 $libmesh_pkgconfig_requires" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NetCDF version 4.9.2 support >>>" >&5 +printf "%s\n" "<<< Configuring library with NetCDF version 4.9.2 support >>>" >&6; } ;; #( + *) : - # User-specific library path + NETCDF_INCLUDE="" + enablenetcdf=no + ;; +esac -# Check whether --with-nlopt-lib was given. -if test ${with_nlopt_lib+y} + if test "x$enablenested" = "xyes" then : - withval=$with_nlopt_lib; withnloptlib=$withval -else case e in #( - e) withnloptlib=no ;; -esac -fi + SUB_CPPFLAGS="$CPPFLAGS" + SUB_LDFLAGS="$LDFLAGS" + SUB_LIBS="$LIBS" + if test $enablehdf5 = yes +then : - # Use NLOPT_DIR/include if it exists. - if test $withnloptinc != no + SUB_CPPFLAGS="$HDF5_CPPFLAGS $SUB_CPPFLAGS" + SUB_LIBS="$HDF5_LIBS $SUB_LIBS" + SUB_LDFLAGS="$HDF5_LDFLAGS $SUB_LDFLAGS" + if test "x$enablepetsc" != "xno" then : - NLOPT_INC="$withnloptinc" -elif test "x$NLOPT_DIR" != "x" && test -f $NLOPT_DIR/include/nlopt.h + + SUB_CPPFLAGS="$PETSCINCLUDEDIRS $SUB_CPPFLAGS" + SUB_LIBS="$PETSCLINKLIBS $SUB_LIBS" + +fi +fi + + if test "x$haveexternalxml2" = "xyes" then : - NLOPT_INC="$NLOPT_DIR/include" + netcdf_xml2_arg='' else case e in #( - e) NLOPT_INC="" ;; + e) netcdf_xml2_arg='--disable-libxml2' ;; esac fi - # Use NLOPT_DIR/lib if it exists. - if test "x$withnloptlib" != "xno" -then : - NLOPT_LIB="$withnloptlib" -elif test "x$NLOPT_DIR" != "x" + if test "x$enablecurl" = "xyes" then : - NLOPT_LIB="$NLOPT_DIR/lib" + netcdf_dap_arg=--enable-dap + netcdf_curl_arg='' + netcdf_byterange_arg='' else case e in #( - e) NLOPT_LIB="" ;; + e) netcdf_dap_arg=--disable-dap + netcdf_curl_arg=--disable-curl + netcdf_byterange_arg=--disable-byterange ;; esac fi - # Initialize Makefile/config.h substitution variables - NLOPT_INCLUDE="" - NLOPT_LIBRARY="" - - if test "x$enablenlopt" = "xyes" + if test "x$configure_netcdf_v462" = "xyes" then : - NLOPT_INCLUDE="-I$NLOPT_INC" - NLOPT_LIBRARY="-L$NLOPT_LIB -lnlopt" - - # Try to compile and link a trivial nlopt test code. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for valid nlopt installation" >&5 -printf %s "checking for valid nlopt installation... " >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - # Save the original CFLAGS and LIBS contents - saveCFLAGS="$CFLAGS" - saveLIBS="$LIBS" - - # Append nlopt include paths to the CFLAGS variables - CFLAGS="$saveCFLAGS $NLOPT_INCLUDE" - LIBS="$saveLIBS $NLOPT_LIBRARY -lm" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#include -#include -#include - -double myfunc(unsigned n, const double *x, double *grad, void *my_func_data) -{ -if (grad) { - grad[0] = 0.0; - grad[1] = 0.5 / sqrt(x[1]); - } - return sqrt(x[1]); -} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configuring NetCDF v4.6.2" >&5 +printf "%s\n" "$as_me: Configuring NetCDF v4.6.2" >&6;} -typedef struct -{ - double a, b; -} my_constraint_data; -double myconstraint(unsigned n, const double *x, double *grad, void *data) -{ - my_constraint_data *d = (my_constraint_data *) data; - double a = d->a, b = d->b; - if (grad) { - grad[0] = 3 * a * (a*x[0] + b) * (a*x[0] + b); - grad[1] = -1.0; - } - return ((a*x[0] + b) * (a*x[0] + b) * (a*x[0] + b) - x[1]); -} + # Various preliminary checks. -int -main (void) -{ -double lb[2] = { -HUGE_VAL, 0 }; /* lower bounds */ -nlopt_opt opt; -opt = nlopt_create(NLOPT_LD_MMA, 2); /* algorithm and dimensionality */ -nlopt_set_lower_bounds(opt, lb); -nlopt_set_min_objective(opt, myfunc, NULL); -my_constraint_data data[2] = { {2,0}, {-1,1} }; -nlopt_add_inequality_constraint(opt, myconstraint, &data[0], 1e-8); -nlopt_add_inequality_constraint(opt, myconstraint, &data[1], 1e-8); -nlopt_set_xtol_rel(opt, 1e-4); -double x[2] = { 1.234, 5.678 }; /* some initial guess */ -double minf; /* the minimum objective value, upon return */ -if (nlopt_optimize(opt, x, &minf) < 0) { - printf("nlopt failed!\n"); -} -else { - printf("found minimum at f(%g,%g) = %0.10g\n", x[0], x[1], minf); -} -nlopt_destroy(opt); -return 0; + ax_dir="contrib/netcdf/netcdf-c-4.6.2" - ; - return 0; -} + # Do not complain, so a configure script can configure whichever parts of a + # large source tree are present. + if test -d "$srcdir/$ax_dir"; then + ac_builddir=. -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : +case "$ax_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`printf "%s\n" "$ax_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix - enablenlopt=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -else case e in #( - e) - enablenlopt=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + # Remove --cache-file, --srcdir, and --disable-option-checking arguments + # so they do not pile up. + ax_args= + ax_prev= + eval "set x $ac_configure_args" + shift + for ax_arg; do + if test -n "$ax_prev"; then + ax_prev= + continue + fi + case $ax_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi | --cache-f \ + | --cache- | --cache | --cach | --cac | --ca | --c) + ax_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ax_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ax_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* \ + | --p=*) + ;; + --disable-option-checking) + ;; + *) case $ax_arg in + *\'*) ax_arg=$(printf "%s\n" "$ax_arg" | sed "s/'/'\\\\\\\\''/g");; + esac + as_fn_append ax_args " '$ax_arg'" ;; + esac + done + # Always prepend --disable-option-checking to silence warnings, since + # different subdirs can have different --enable and --with options. + ax_args="--disable-option-checking $ax_args" + # Options that must be added as they are provided. + as_fn_append ax_args " 'CXX=$CXX'" + as_fn_append ax_args " 'CC=$CC'" + as_fn_append ax_args " 'F77=$F77'" + as_fn_append ax_args " 'FC=$FC'" + as_fn_append ax_args " 'CPPFLAGS=$SUB_CPPFLAGS'" + as_fn_append ax_args " 'LDFLAGS=$SUB_LDFLAGS'" + as_fn_append ax_args " 'LIBS=$SUB_LIBS'" + as_fn_append ax_args " '$netcdf_xml2_arg'" + as_fn_append ax_args " '$netcdf_dap_arg'" + as_fn_append ax_args " '$netcdf_curl_arg'" + as_fn_append ax_args " '$netcdf_byterange_arg'" + as_fn_append ax_args " '--disable-testsets'" + as_fn_append ax_args " '$netcdf_v4_arg'" - # Return CFLAGS and LIBS to their original states. - CFLAGS="$saveCFLAGS" - LIBS="$saveLIBS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # New options that may need to be merged with existing options. + # New options that must replace existing options. - if test "x$enablenlopt" = "xyes" -then : + # Options that must be removed. - if test "x$RPATHFLAG" != "x" && test -d $NLOPT_LIB -then : - NLOPT_LIBRARY="${RPATHFLAG}${NLOPT_LIB} $NLOPT_LIBRARY" -fi + as_fn_append ax_args " '--srcdir=$ac_srcdir'" + # Add the subdirectory to the list of target subdirectories. + ax_subconfigures="$ax_subconfigures $ax_dir" + # Save the argument list for this subdirectory. + ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_") + eval "ax_sub_configure_args_$ax_var=\"$ax_args\"" + eval "ax_sub_configure_$ax_var=\"yes\"" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find source tree for $ax_dir" >&5 +printf "%s\n" "$as_me: WARNING: could not find source tree for $ax_dir" >&2;} + fi -printf "%s\n" "#define HAVE_NLOPT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NLOPT support >>>" >&5 -printf "%s\n" "<<< Configuring library with NLOPT support >>>" >&6; } -fi -fi +else case e in #( + e) mkdir -p contrib/netcdf/netcdf-c-4.6.2 + echo "distclean:" > contrib/netcdf/netcdf-c-4.6.2/Makefile + echo "distdir:" >> contrib/netcdf/netcdf-c-4.6.2/Makefile + cat contrib/netcdf/netcdf-c-4.6.2/Makefile + ;; +esac fi + if test "x$configure_netcdf_v492" = "xyes" +then : - # Substitute the substitution variables + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configuring NetCDF v4.9.2" >&5 +printf "%s\n" "$as_me: Configuring NetCDF v4.9.2" >&6;} + # Various preliminary checks. -if test x$enablenlopt = xyes -then : - libmesh_optional_INCLUDES="$NLOPT_INCLUDE $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$NLOPT_LIBRARY $libmesh_optional_LIBS" -fi - if test x$enablenlopt = xyes; then - LIBMESH_ENABLE_NLOPT_TRUE= - LIBMESH_ENABLE_NLOPT_FALSE='#' -else - LIBMESH_ENABLE_NLOPT_TRUE='#' - LIBMESH_ENABLE_NLOPT_FALSE= -fi -# ------------------------------------------------------------- + ax_dir="contrib/netcdf/netcdf-c" -# ------------------------------------------------------------- -# CAPNPROTO -- Serialization library. -# ------------------------------------------------------------- + # Do not complain, so a configure script can configure whichever parts of a + # large source tree are present. + if test -d "$srcdir/$ax_dir"; then + ac_builddir=. - # Check whether --enable-capnproto was given. -if test ${enable_capnproto+y} -then : - enableval=$enable_capnproto; case "${enableval}" in #( - yes) : - enablecapnproto=yes ;; #( - no) : - enablecapnproto=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-capnproto" "$LINENO" 5 ;; -esac -else case e in #( - e) enablecapnproto=$enableoptional ;; +case "$ax_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`printf "%s\n" "$ax_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; esac -fi - +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix - # Check whether --enable-capnp-required was given. -if test ${enable_capnp_required+y} -then : - enableval=$enable_capnp_required; case "${enableval}" in #( - yes) : - capnprequired=yes ;; #( - no) : - capnprequired=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-capnp-required" "$LINENO" 5 ;; -esac -else case e in #( - e) capnprequired=no ;; +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -fi - - - if test "x$HAVE_CXX11" = "x" || test "x$HAVE_CXX11" = "x0" -then : - - enablecapnproto=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Cap'n Proto disabled -- C++11 support (auto keyword) is required. >>>" >&5 -printf "%s\n" "<<< Cap'n Proto disabled -- C++11 support (auto keyword) is required. >>>" >&6; } - -fi +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - if test "x$enablecapnproto" = "xyes" -then : + # Remove --cache-file, --srcdir, and --disable-option-checking arguments + # so they do not pile up. + ax_args= + ax_prev= + eval "set x $ac_configure_args" + shift + for ax_arg; do + if test -n "$ax_prev"; then + ax_prev= + continue + fi + case $ax_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi | --cache-f \ + | --cache- | --cache | --cach | --cac | --ca | --c) + ax_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ax_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ax_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* \ + | --p=*) + ;; + --disable-option-checking) + ;; + *) case $ax_arg in + *\'*) ax_arg=$(printf "%s\n" "$ax_arg" | sed "s/'/'\\\\\\\\''/g");; + esac + as_fn_append ax_args " '$ax_arg'" ;; + esac + done + # Always prepend --disable-option-checking to silence warnings, since + # different subdirs can have different --enable and --with options. + ax_args="--disable-option-checking $ax_args" + # Options that must be added as they are provided. + as_fn_append ax_args " 'CXX=$CXX'" + as_fn_append ax_args " 'CC=$CC'" + as_fn_append ax_args " 'F77=$F77'" + as_fn_append ax_args " 'FC=$FC'" + as_fn_append ax_args " 'CPPFLAGS=$SUB_CPPFLAGS'" + as_fn_append ax_args " 'LDFLAGS=$SUB_LDFLAGS'" + as_fn_append ax_args " 'LIBS=$SUB_LIBS'" + as_fn_append ax_args " '$netcdf_xml2_arg'" + as_fn_append ax_args " '$netcdf_dap_arg'" + as_fn_append ax_args " '$netcdf_curl_arg'" + as_fn_append ax_args " '$netcdf_byterange_arg'" + as_fn_append ax_args " '--disable-testsets'" + as_fn_append ax_args " '$netcdf_v4_arg'" - CAPNPROTO_INC="" - CAPNPROTO_LIB="" + # New options that may need to be merged with existing options. + # New options that must replace existing options. -# Check whether --with-capnproto was given. -if test ${with_capnproto+y} -then : - withval=$with_capnproto; - CAPNPROTO_INC="$withval/include" - CAPNPROTO_LIB="$withval/lib" + # Options that must be removed. -fi + as_fn_append ax_args " '--srcdir=$ac_srcdir'" + # Add the subdirectory to the list of target subdirectories. + ax_subconfigures="$ax_subconfigures $ax_dir" + # Save the argument list for this subdirectory. + ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_") + eval "ax_sub_configure_args_$ax_var=\"$ax_args\"" + eval "ax_sub_configure_$ax_var=\"yes\"" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find source tree for $ax_dir" >&5 +printf "%s\n" "$as_me: WARNING: could not find source tree for $ax_dir" >&2;} + fi - if test "x$CAPNPROTO_DIR" != x -then : - CAPNPROTO_INC="$CAPNPROTO_DIR/include" - CAPNPROTO_LIB="$CAPNPROTO_DIR/lib" -fi - CAPNPROTO_INCLUDE="" - CAPNPROTO_LIBRARY="" - if test -r $CAPNPROTO_INC/capnp/common.h -then : - enablecapnproto=yes else case e in #( - e) - enablecapnproto=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Required header files not found, Cap'n Proto support disabled. >>>" >&5 -printf "%s\n" "<<< Required header files not found, Cap'n Proto support disabled. >>>" >&6; } + e) mkdir -p contrib/netcdf/netcdf-c + echo "distclean:" > contrib/netcdf/netcdf-c/Makefile + echo "distdir:" >> contrib/netcdf/netcdf-c/Makefile + cat contrib/netcdf/netcdf-c/Makefile ;; esac fi - if test "x$enablecapnproto" = "xyes" -then : +fi - # Extract the first word of "capnp", so it can be a program name with args. -set dummy capnp; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CAPNP_BINARY+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CAPNP_BINARY"; then - ac_cv_prog_CAPNP_BINARY="$CAPNP_BINARY" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CAPNP_BINARY="capnp" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - test -z "$ac_cv_prog_CAPNP_BINARY" && ac_cv_prog_CAPNP_BINARY="none" -fi ;; -esac + +if test $enablenetcdf = yes +then : + libmesh_contrib_INCLUDES="$NETCDF_INCLUDE $libmesh_contrib_INCLUDES" fi -CAPNP_BINARY=$ac_cv_prog_CAPNP_BINARY -if test -n "$CAPNP_BINARY"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CAPNP_BINARY" >&5 -printf "%s\n" "$CAPNP_BINARY" >&6; } + + if test x$enablenetcdf = xyes; then + LIBMESH_ENABLE_NETCDF_TRUE= + LIBMESH_ENABLE_NETCDF_FALSE='#' else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + LIBMESH_ENABLE_NETCDF_TRUE='#' + LIBMESH_ENABLE_NETCDF_FALSE= fi - - if test "x$CAPNP_BINARY" = "xcapnp" -then : - enablecapnproto=yes -else case e in #( - e) - enablecapnproto=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< The 'capnp' utility is not in your PATH, Cap'n Proto support disabled. >>>" >&5 -printf "%s\n" "<<< The 'capnp' utility is not in your PATH, Cap'n Proto support disabled. >>>" >&6; } - ;; -esac + if test x$netcdfversion = xv4.6.2; then + LIBMESH_ENABLE_NETCDF_V462_TRUE= + LIBMESH_ENABLE_NETCDF_V462_FALSE='#' +else + LIBMESH_ENABLE_NETCDF_V462_TRUE='#' + LIBMESH_ENABLE_NETCDF_V462_FALSE= fi + if test x$netcdfversion = xv4.9.2; then + LIBMESH_ENABLE_NETCDF_V492_TRUE= + LIBMESH_ENABLE_NETCDF_V492_FALSE='#' +else + LIBMESH_ENABLE_NETCDF_V492_TRUE='#' + LIBMESH_ENABLE_NETCDF_V492_FALSE= fi - # If the required programs were found in $PATH, continue. - if test "x$enablecapnproto" = "xyes" -then : - - printf '%s\n' "@0xdbb9ad1f14bf0b36;" > example.capnp - printf '%s\n' "struct Person {" >> example.capnp - printf '%s\n' "name @0 :Text;" >> example.capnp - printf '%s\n' "birthdate @3 :Date;" >> example.capnp - printf '%s\n' "email @1 :Text;" >> example.capnp - printf '%s\n' "phones @2 :List(PhoneNumber);" >> example.capnp - printf '%s\n' "struct PhoneNumber {" >> example.capnp - printf '%s\n' "number @0 :Text;" >> example.capnp - printf '%s\n' "type @1 :Type;" >> example.capnp - printf '%s\n' "enum Type {" >> example.capnp - printf '%s\n' "mobile @0;" >> example.capnp - printf '%s\n' "home @1;" >> example.capnp - printf '%s\n' "work @2;" >> example.capnp - printf '%s\n' "} } }" >> example.capnp - printf '%s\n' "struct Date {" >> example.capnp - printf '%s\n' "year @0 :Int16;" >> example.capnp - printf '%s\n' "month @1 :UInt8;" >> example.capnp - printf '%s\n' "day @2 :UInt8;" >> example.capnp - printf '%s\n' "}" >> example.capnp - # Call the capnp utility - capnp compile -oc++ example.capnp +# ------------------------------------------------------------- +# ExodusII -- enabled by default (it is distributed in contrib) +# (note that ExodusII requires netCDF) +# ------------------------------------------------------------- - if test "x$?" = "x0" + # Check whether --enable-exodus was given. +if test ${enable_exodus+y} then : - enablecapnproto=yes + enableval=$enable_exodus; case "${enableval}" in #( + yes) : + enableexodus=yes + if test "x$enablehdf5" = "xyes" +then : + exodusversion=v8.11 else case e in #( - e) - enablecapnproto=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< The 'capnp' utility function failed, Cap'n Proto support disabled. >>>" >&5 -printf "%s\n" "<<< The 'capnp' utility function failed, Cap'n Proto support disabled. >>>" >&6; } - ;; + e) exodusversion=v5.22 ;; +esac +fi ;; #( + v811) : + enableexodus=yes + exodusversion="v8.11" ;; #( + new|v522) : + enableexodus=yes + exodusversion="v5.22" ;; #( + old|v509) : + enableexodus=yes + exodusversion="v5.09" ;; #( + no) : + enableexodus=no + exodusversion=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-exodus" "$LINENO" 5 ;; +esac +else case e in #( + e) enableexodus=$enablenetcdf ; + if test "x$enablehdf5" = "xyes" +then : + exodusversion=v8.11 +else case e in #( + e) exodusversion=v5.22 ;; +esac +fi ;; esac fi - rm -f example.capnp example.capnp.h example.capnp.c++ - + if test "x$enableexodus" = "xno" +then : + exodusversion=no fi - if test "x$enablecapnproto" = "xyes" + EXODUS_NOT_NETCDF4_FLAG="" + if test "x$enablehdf5" = "xno" || test "x$netcdfversion" = "x3" then : - CAPNPROTO_INCLUDE="-I$CAPNPROTO_INC" - CAPNPROTO_LIBRARY="-L$CAPNPROTO_LIB -lcapnp -lkj" + EXODUS_NOT_NETCDF4_FLAG="-DNOT_NETCDF4" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defining -DNOT_NETCDF4 for our Exodus build" >&5 +printf "%s\n" "defining -DNOT_NETCDF4 for our Exodus build" >&6; } - if test "x$RPATHFLAG" != "x" && test -d $CAPNPROTO_LIB -then : - CAPNPROTO_LIBRARY="${RPATHFLAG}${CAPNPROTO_LIB} $CAPNPROTO_LIBRARY" fi + case "${exodusversion}" in #( + "v5.09") : + EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/include" -printf "%s\n" "#define HAVE_CAPNPROTO 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with CAPNPROTO support >>>" >&5 -printf "%s\n" "<<< Configuring library with CAPNPROTO support >>>" >&6; } - -fi - -fi +printf "%s\n" "#define HAVE_EXODUS_API 1" >>confdefs.h - if test "x$enablecapnproto" != "xyes" && test "x$capnprequired" = "xyes" -then : - as_fn_error 6 "*** Cap'n Proto was not found, but --enable-capnp-required was specified. Make sure the capnp executable is in your PATH" "$LINENO" 5 -fi +printf "%s\n" "#define DETECTED_EXODUS_VERSION_MAJOR 5" >>confdefs.h +printf "%s\n" "#define DETECTED_EXODUS_VERSION_MINOR 9" >>confdefs.h -if test x$enablecapnproto = xyes -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with Exodus version $exodusversion support >>>" >&6; } + enableexodusfortran=no ;; #( + "v5.22") : + EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/cbind/include" - libmesh_optional_INCLUDES="$CAPNPROTO_INCLUDE $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$CAPNPROTO_LIBRARY $libmesh_optional_LIBS" +printf "%s\n" "#define HAVE_EXODUS_API 1" >>confdefs.h -fi - if test x$enablecapnproto = xyes; then - LIBMESH_ENABLE_CAPNPROTO_TRUE= - LIBMESH_ENABLE_CAPNPROTO_FALSE='#' -else - LIBMESH_ENABLE_CAPNPROTO_TRUE='#' - LIBMESH_ENABLE_CAPNPROTO_FALSE= -fi -ac_config_files="$ac_config_files contrib/capnproto/Makefile" +printf "%s\n" "#define DETECTED_EXODUS_VERSION_MAJOR 5" >>confdefs.h -# ------------------------------------------------------------- -# ------------------------------------------------------------- -# libcurl -- enabled by default -# Note: I tried to use the m4 files ax_lib_curl.m4 and -# ax_path_generic.m4 from the autoconf-archive for this, but they -# would not work (bootstrap failed!) on either Linux or OSX. -# ------------------------------------------------------------- +printf "%s\n" "#define DETECTED_EXODUS_VERSION_MINOR 22" >>confdefs.h - # Check whether --enable-curl was given. -if test ${enable_curl+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with Exodus version $exodusversion support >>>" >&6; } + # Check whether --enable-exodus-fortran was given. +if test ${enable_exodus_fortran+y} then : - enableval=$enable_curl; case "${enableval}" in #( + enableval=$enable_exodus_fortran; case "${enableval}" in #( yes) : - enablecurl=yes ;; #( + enableexodusfortran=yes ;; #( no) : - enablecurl=no ;; #( + enableexodusfortran=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-curl" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-exodus-fortran" "$LINENO" 5 ;; esac else case e in #( - e) enablecurl=no ;; + e) enableexodusfortran=$enablefortran ;; esac fi - - if test "x$enablecurl" = "xyes" + if test "x$enableexodusfortran" = "xyes" then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus Fortran API >>>" >&5 +printf "%s\n" "<<< Configuring library with Exodus Fortran API >>>" >&6; } +fi ;; #( + "v8.11") : + EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/include -I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/sierra" +printf "%s\n" "#define HAVE_EXODUS_API 1" >>confdefs.h -# Check whether --with-curl-include was given. -if test ${with_curl_include+y} -then : - withval=$with_curl_include; withcurlinc=$withval -else case e in #( - e) withcurlinc=no ;; -esac -fi +printf "%s\n" "#define DETECTED_EXODUS_VERSION_MAJOR 8" >>confdefs.h -# Check whether --with-curl-lib was given. -if test ${with_curl_lib+y} -then : - withval=$with_curl_lib; withcurllib=$withval -else case e in #( - e) withcurllib=no ;; -esac -fi +printf "%s\n" "#define DETECTED_EXODUS_VERSION_MINOR 11" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with Exodus version $exodusversion support >>>" >&6; } + enableexodusfortran=no ;; #( + *) : - CURL_INC="/usr/include/curl" - CURL_LIB="/usr/lib" + EXODUS_INCLUDE="" + enableexodus=no + enableexodusfortran=no + ;; +esac - if test "x$withcurlinc" != "xno" -then : - CURL_INC="$withcurlinc" -fi + ac_config_files="$ac_config_files contrib/exodusii/v5.09/Makefile" - if test "x$withcurllib" != "xno" -then : - CURL_LIB="$withcurllib" -fi + ac_config_files="$ac_config_files contrib/exodusii/v5.22/exodus/Makefile" - # Initialize eventual Makefile/config.h substitution variables - CURL_INCLUDE="" - CURL_LIBRARY="" + ac_config_files="$ac_config_files contrib/exodusii/v8.11/exodus/Makefile" - # Actually test for the existence of headers and libs. - if test "x$enablecurl" = "xyes" -then : - curlincFound=no; - ac_curl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-I${CURL_INC} ${CPPFLAGS}" - for ac_header in curl.h -do : - ac_fn_cxx_check_header_compile "$LINENO" "curl.h" "ac_cv_header_curl_h" "$ac_includes_default" -if test "x$ac_cv_header_curl_h" = xyes -then : - printf "%s\n" "#define HAVE_CURL_H 1" >>confdefs.h - curlincFound=yes + + if test x$enableexodusfortran = xyes; then + EXODUS_FORTRAN_API_TRUE= + EXODUS_FORTRAN_API_FALSE='#' +else + EXODUS_FORTRAN_API_TRUE='#' + EXODUS_FORTRAN_API_FALSE= fi -done - CPPFLAGS="${ac_curl_save_CPPFLAGS}" - if test "x$curlincFound" = "xno" +if test $enableexodus = yes then : + libmesh_contrib_INCLUDES="$EXODUS_INCLUDE $libmesh_contrib_INCLUDES" +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: CURL header files not found!" >&5 -printf "%s\n" "CURL header files not found!" >&6; } - enablecurl=no - + if test x$enableexodus = xyes; then + LIBMESH_ENABLE_EXODUS_TRUE= + LIBMESH_ENABLE_EXODUS_FALSE='#' +else + LIBMESH_ENABLE_EXODUS_TRUE='#' + LIBMESH_ENABLE_EXODUS_FALSE= fi - #define LIBCURL_VERSION_MAJOR 7 - #define LIBCURL_VERSION_MINOR 37 - #define LIBCURL_VERSION_PATCH 1 - if test "x$enablecurl" = "xyes" -then : + if test x$exodusversion = xv5.09; then + LIBMESH_ENABLE_EXODUS_V509_TRUE= + LIBMESH_ENABLE_EXODUS_V509_FALSE='#' +else + LIBMESH_ENABLE_EXODUS_V509_TRUE='#' + LIBMESH_ENABLE_EXODUS_V509_FALSE= +fi - curlmajor=`grep "define LIBCURL_VERSION_MAJOR" $CURL_INC/curlver.h | sed -e "s/#define LIBCURL_VERSION_MAJOR[ ]*//g"` - curlminor=`grep "define LIBCURL_VERSION_MINOR" $CURL_INC/curlver.h | sed -e "s/#define LIBCURL_VERSION_MINOR[ ]*//g"` - curlversion=$curlmajor.$curlminor - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with CURL version $curlversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with CURL version $curlversion support >>>" >&6; } + if test x$exodusversion = xv5.22; then + LIBMESH_ENABLE_EXODUS_V522_TRUE= + LIBMESH_ENABLE_EXODUS_V522_FALSE='#' +else + LIBMESH_ENABLE_EXODUS_V522_TRUE='#' + LIBMESH_ENABLE_EXODUS_V522_FALSE= +fi + if test x$exodusversion = xv8.11; then + LIBMESH_ENABLE_EXODUS_V811_TRUE= + LIBMESH_ENABLE_EXODUS_V811_FALSE='#' +else + LIBMESH_ENABLE_EXODUS_V811_TRUE='#' + LIBMESH_ENABLE_EXODUS_V811_FALSE= fi - if test "x$enablecurl" = "xyes" -then : - old_LIBS="$LIBS" - LIBS="$old_LIBS -L$CURL_LIB" +# ------------------------------------------------------------- +# Nemesis -- enabled by default (it is distributed in contrib) +# (note that Nemesis requires netCDF and exodus) +# ------------------------------------------------------------- - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5 -printf %s "checking for main in -lcurl... " >&6; } -if test ${ac_cv_lib_curl_main+y} + # Check whether --enable-nemesis was given. +if test ${enable_nemesis+y} then : - printf %s "(cached) " >&6 + enableval=$enable_nemesis; case "${enableval}" in #( + yes|v811) : + enablenemesis=yes ; nemesisversion="v8.11" ;; #( + new|v522) : + enablenemesis=yes ; nemesisversion="v5.22" ;; #( + old|v309) : + enablenemesis=yes ; nemesisversion="v3.09" ;; #( + no) : + enablenemesis=no ; nemesisversion=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-nemesis" "$LINENO" 5 ;; +esac else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -namespace conftest { - extern "C" int main (); -} -int -main (void) -{ -return conftest::main (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" + e) + # if unspecified, depend on exodus + enablenemesis=$enableexodus ; + if test "x$exodusversion" = "xv5.09" then : - ac_cv_lib_curl_main=yes + nemesisversion="v3.09" else case e in #( - e) ac_cv_lib_curl_main=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + e) nemesisversion="$exodusversion" ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_main" >&5 -printf "%s\n" "$ac_cv_lib_curl_main" >&6; } -if test "x$ac_cv_lib_curl_main" = xyes -then : - enablecurl=yes -else case e in #( - e) enablecurl=no ;; + ;; esac fi - LIBS="$old_LIBS" - -fi - - if test "x$enablecurl" = "xyes" -then : - - CURL_INCLUDE="-I$CURL_INC" - CURL_LIBRARY="-L$CURL_LIB -lcurl" - if test "x$RPATHFLAG" != "x" && test -d $CURL_LIB -then : - if test "$CURL_LIB" != "/usr/lib" && test "$CURL_LIB" != "/usr/lib64" + # Trump --enable-nemesis with --disable-mpi + if test "x$enablempi" = xno then : - CURL_LIBRARY="${RPATHFLAG}${CURL_LIB} $CURL_LIBRARY" -fi + nemesisversion=no fi -printf "%s\n" "#define HAVE_CURL 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with CURL support >>>" >&5 -printf "%s\n" "<<< Configuring library with CURL support >>>" >&6; } + case "${nemesisversion}" in #( + "v3.09") : -fi + NEMESIS_INCLUDE="-I\$(top_srcdir)/contrib/nemesis/$nemesisversion" -fi +printf "%s\n" "#define HAVE_NEMESIS_API 1" >>confdefs.h -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nemesis version $nemesisversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with Nemesis version $nemesisversion support >>>" >&6; } + ;; #( + "v5.22") : + NEMESIS_INCLUDE="-I\$(top_srcdir)/contrib/nemesis/$nemesisversion/nemesis" +printf "%s\n" "#define HAVE_NEMESIS_API 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nemesis version $nemesisversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with Nemesis version $nemesisversion support >>>" >&6; } + ;; #( + "v8.11") : -if test x$enablecurl = xyes -then : + NEMESIS_INCLUDE="-I\$(top_srcdir)/contrib/nemesis/$nemesisversion/nemesis" - libmesh_optional_INCLUDES="$CURL_INCLUDE $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$CURL_LIBRARY $libmesh_optional_LIBS" +printf "%s\n" "#define HAVE_NEMESIS_API 1" >>confdefs.h -fi - if test x$enablecurl = xyes; then - LIBMESH_ENABLE_CURL_TRUE= - LIBMESH_ENABLE_CURL_FALSE='#' -else - LIBMESH_ENABLE_CURL_TRUE='#' - LIBMESH_ENABLE_CURL_FALSE= -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nemesis version $nemesisversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with Nemesis version $nemesisversion support >>>" >&6; } + ;; #( + *) : -# ------------------------------------------------------------- + NEMESIS_INCLUDE="" + enablenemesis=no + ;; +esac + ac_config_files="$ac_config_files contrib/nemesis/v3.09/Makefile" + ac_config_files="$ac_config_files contrib/nemesis/v5.22/nemesis/Makefile" -# -------------------------------------------------------------- -# HDF5 -- disabled by default -# -------------------------------------------------------------- + ac_config_files="$ac_config_files contrib/nemesis/v8.11/nemesis/Makefile" -# PETSc configure can --download-hdf5, and that's a really convenient -# feature for users ... but libMesh --enable-hdf5 will only detect it -# if we add PETSc include and lib directory flags *here*; if we wait -# until build time it's too late. -ac_PETSCHDF5_save_CPPFLAGS="$CPPFLAGS" -ac_PETSCHDF5_save_LDFLAGS="$LDFLAGS" -if test "x$enablepetsc" != "xno" +if test $enablenemesis = yes then : + libmesh_contrib_INCLUDES="$NEMESIS_INCLUDE $libmesh_contrib_INCLUDES" +fi - CPPFLAGS="$PETSCINCLUDEDIRS $CPPFLAGS" - LDFLAGS="$PETSCLINKLIBS $LDFLAGS" + if test x$enablenemesis = xyes; then + LIBMESH_ENABLE_NEMESIS_TRUE= + LIBMESH_ENABLE_NEMESIS_FALSE='#' +else + LIBMESH_ENABLE_NEMESIS_TRUE='#' + LIBMESH_ENABLE_NEMESIS_FALSE= +fi + if test x$nemesisversion = xv3.09; then + LIBMESH_ENABLE_NEMESIS_V309_TRUE= + LIBMESH_ENABLE_NEMESIS_V309_FALSE='#' +else + LIBMESH_ENABLE_NEMESIS_V309_TRUE='#' + LIBMESH_ENABLE_NEMESIS_V309_FALSE= fi + if test x$nemesisversion = xv5.22; then + LIBMESH_ENABLE_NEMESIS_V522_TRUE= + LIBMESH_ENABLE_NEMESIS_V522_FALSE='#' +else + LIBMESH_ENABLE_NEMESIS_V522_TRUE='#' + LIBMESH_ENABLE_NEMESIS_V522_FALSE= +fi - # Check whether --enable-hdf5 was given. -if test ${enable_hdf5+y} -then : - enableval=$enable_hdf5; case "${enableval}" in #( - yes) : - enablehdf5=yes ;; #( - no) : - enablehdf5=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-hdf5" "$LINENO" 5 ;; -esac -else case e in #( - e) enablehdf5=no ;; -esac + if test x$nemesisversion = xv8.11; then + LIBMESH_ENABLE_NEMESIS_V811_TRUE= + LIBMESH_ENABLE_NEMESIS_V811_FALSE='#' +else + LIBMESH_ENABLE_NEMESIS_V811_TRUE='#' + LIBMESH_ENABLE_NEMESIS_V811_FALSE= fi - # Check whether --enable-hdf5-required was given. -if test ${enable_hdf5_required+y} + + +# ------------------------------------------------------------- +# libHilbert -- distributed in ./contrib, +# enabled by default +# ------------------------------------------------------------- + + # Check whether --enable-libHilbert was given. +if test ${enable_libHilbert+y} then : - enableval=$enable_hdf5_required; case "${enableval}" in #( + enableval=$enable_libHilbert; case "${enableval}" in #( yes) : - hdf5required=yes - enablehdf5=yes ;; #( + enablelibhilbert=yes ;; #( no) : - hdf5required=no ;; #( + enablelibhilbert=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-hdf5-required" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-libHilbert" "$LINENO" 5 ;; esac else case e in #( - e) hdf5required=no ;; + e) enablelibhilbert=$enableoptional ;; esac fi - if test "x$enablehdf5" = "xyes" + if test "x$enablelibhilbert" = "xyes" then : + LIBHILBERT_INCLUDE="-I\$(top_srcdir)/contrib/libHilbert/include" + LIBHILBERT_LIBRARY="\$(EXTERNAL_LIBDIR)/libHilbert\$(libext)" +printf "%s\n" "#define HAVE_LIBHILBERT 1" >>confdefs.h -HAVE_HDF5=0 - - - - -# Check whether --with-hdf5 was given. -if test ${with_hdf5+y} -then : - withval=$with_hdf5; - with_hdf5=$withval - if test "x${with_hdf5}" != "xyes" -then : - HDF5_PREFIX=$withval -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with libHilbert support >>>" >&5 +printf "%s\n" "<<< Configuring library with libHilbert support >>>" >&6; } else case e in #( e) - with_hdf5=$withval - - if test "x${HDF5_DIR}" != "x" -then : - - HDF5_PREFIX=${HDF5_DIR} - with_hdf5=yes - -fi - ;; + LIBHILBERT_INCLUDE="" + LIBHILBERT_LIBRARY="" + enablelibhilbert=no + ;; esac fi -is_package_required=$hdf5required -if test "x$is_package_required" = "xyes" +if test $enablelibhilbert = yes then : - with_hdf5=yes + libmesh_contrib_INCLUDES="$LIBHILBERT_INCLUDE $libmesh_contrib_INCLUDES" fi -if test "x${with_hdf5}" != "xno" -then : + if test x$enablelibhilbert = xyes; then + LIBMESH_ENABLE_LIBHILBERT_TRUE= + LIBMESH_ENABLE_LIBHILBERT_FALSE='#' +else + LIBMESH_ENABLE_LIBHILBERT_TRUE='#' + LIBMESH_ENABLE_LIBHILBERT_FALSE= +fi - if test -d "${HDF5_PREFIX}/lib" -then : +ac_config_files="$ac_config_files contrib/libHilbert/Makefile" - HDF5_LDFLAGS="-L${HDF5_PREFIX}/lib" - HDF5_LIBS="-lhdf5" +# ------------------------------------------------------------- -fi - if test "x$RPATHFLAG" != "x" && test -d "${HDF5_PREFIX}/lib" -then : - HDF5_LDFLAGS="${HDF5_LDFLAGS} ${RPATHFLAG}${HDF5_PREFIX}/lib" +# ------------------------------------------------------------- +# fparser -- distributed in ./contrib, +# enabled by default +# ------------------------------------------------------------- + # Check whether --enable-fparser was given. +if test ${enable_fparser+y} +then : + enableval=$enable_fparser; case "${enableval}" in #( + yes) : + enablefparser=yes ;; #( + no) : + enablefparser=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-fparser" "$LINENO" 5 ;; +esac +else case e in #( + e) enablefparser=$enableoptional ;; +esac fi - if test -d "${HDF5_PREFIX}/include" + + +# Check whether --with-fparser was given. +if test ${with_fparser+y} then : - HDF5_CPPFLAGS="-I${HDF5_PREFIX}/include" + withval=$with_fparser; case "${withval}" in #( + release) : + enablefparserdevel=no ;; #( + devel) : + enablefparserdevel=yes ;; #( + none) : + enablefparser=no ;; #( + *) : + as_fn_error $? "bad value ${withval} for --with-fparser" "$LINENO" 5 ;; +esac +else case e in #( + e) enablefparserdevel=no ;; +esac fi - ac_HDF5_save_CFLAGS="$CFLAGS" - ac_HDF5_save_CPPFLAGS="$CPPFLAGS" - ac_HDF5_save_LDFLAGS="$LDFLAGS" - ac_HDF5_save_LIBS="$LIBS" - CFLAGS="${HDF5_CPPFLAGS} ${CFLAGS}" - CPPFLAGS="${HDF5_CPPFLAGS} ${CPPFLAGS}" - LDFLAGS="${HDF5_LDFLAGS} ${LDFLAGS}" - LIBS="${HDF5_LIBS} ${LIBS}" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_fn_c_check_header_compile "$LINENO" "hdf5.h" "ac_cv_header_hdf5_h" "$ac_includes_default" -if test "x$ac_cv_header_hdf5_h" = xyes + if test "x$enablefparser" = "xyes" then : - found_header=yes + + # Check whether --enable-fparser-debugging was given. +if test ${enable_fparser_debugging+y} +then : + enableval=$enable_fparser_debugging; case "${enableval}" in #( + yes) : + enablefparserdebugging=yes ;; #( + no) : + enablefparserdebugging=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-fparser-debugging" "$LINENO" 5 ;; +esac else case e in #( - e) found_header=no ;; + e) enablefparserdebugging=no ;; esac fi - min_hdf5_version=1.8.0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in #( +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 version >= $min_hdf5_version" >&5 -printf %s "checking for HDF5 version >= $min_hdf5_version... " >&6; } + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed - MAJOR_VER=`echo $min_hdf5_version | sed 's/^\([0-9]*\).*/\1/'` - if test "x${MAJOR_VER}" = "x" + for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_YACC+y} then : - MAJOR_VER=0 -fi + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - MINOR_VER=`echo $min_hdf5_version | sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\2/'` - if test "x${MINOR_VER}" = "x" -then : - MINOR_VER=0 +fi ;; +esac fi - - MICRO_VER=`echo $min_hdf5_version | sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\3/'` - if test "x${MICRO_VER}" = "x" -then : - MICRO_VER=0 +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +printf "%s\n" "$YACC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - succeeded=no - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" - if test "x${found_header}" = "xyes" -then : - min_version_succeeded=no + FPARSER_INCLUDE="-I\$(top_srcdir)/contrib/fparser" + FPARSER_LIBRARY="\$(EXTERNAL_LIBDIR)/libfparser\$(libext)" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +printf "%s\n" "#define HAVE_FPARSER 1" >>confdefs.h - #include -int -main (void) -{ + if test "x$enablefparserdevel" = "xyes" +then : - #if H5_VERS_MAJOR > $MAJOR_VER - /* Sweet nibblets */ - #elif (H5_VERS_MAJOR >= $MAJOR_VER) && (H5_VERS_MINOR >= $MINOR_VER) && (H5_VERS_RELEASE >= $MICRO_VER) - /* Winner winner, chicken dinner */ - #else - # error HDF5 version is too old - #endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +printf "%s\n" "#define HAVE_FPARSER_DEVEL 1" >>confdefs.h - min_version_succeeded=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with fparser support (development version) >>>" >&5 +printf "%s\n" "<<< Configuring library with fparser support (development version) >>>" >&6; } else case e in #( e) - min_version_succeeded=no - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - if test "x$min_version_succeeded" = "xno" -then : +printf "%s\n" "#define HAVE_FPARSER_DEVEL 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - if test "x$is_package_required" = "xyes" -then : - as_fn_error $? "Your HDF5 library version does not meet the minimum version requirement (HDF5 >= $min_hdf5_version). Please use --with-hdf5 to specify the location of a valid installation." "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with fparser support (release version) >>>" >&5 +printf "%s\n" "<<< Configuring library with fparser support (release version) >>>" >&6; } + ;; +esac fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen support" >&5 +printf %s "checking for dlopen support... " >&6; } +if test ${ac_cv_cxx_dlopen+y} +then : + printf %s "(cached) " >&6 else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ;; -esac -fi + e) + ac_cv_cxx_dlopen=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for H5Fopen in -lhdf5" >&5 -printf %s "checking for H5Fopen in -lhdf5... " >&6; } -if test ${ac_cv_lib_hdf5_H5Fopen+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +printf %s "checking for library containing dlopen... " >&6; } +if test ${ac_cv_search_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lhdf5 $LIBS" + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -70876,190 +72405,294 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char H5Fopen (void); +char dlopen (void); int main (void) { -return H5Fopen (); +return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +for ac_lib in '' dl dld +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_hdf5_H5Fopen=yes + ac_cv_search_dlopen=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_dlopen+y} +then : + break +fi +done +if test ${ac_cv_search_dlopen+y} +then : + else case e in #( - e) ac_cv_lib_hdf5_H5Fopen=no ;; + e) ac_cv_search_dlopen=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_H5Fopen" >&5 -printf "%s\n" "$ac_cv_lib_hdf5_H5Fopen" >&6; } -if test "x$ac_cv_lib_hdf5_H5Fopen" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 +printf "%s\n" "$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no then : - found_library=yes + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + ac_cv_cxx_dlopen=yes else case e in #( - e) found_library=no ;; + e) ac_cv_cxx_dlopen=no ;; esac fi - succeeded=no - if test "x$found_header" = "xyes" && test "x$min_version_succeeded" = "xyes" && test "x$found_library" = "xyes" + if test "x$enableallstatic" = "xyes" then : - succeeded=yes + ac_cv_cxx_dlopen=no fi -fi + if test "x$ac_cv_cxx_dlopen" = "xyes" +then : - CFLAGS="$ac_HDF5_save_CFLAGS" - CPPFLAGS="$ac_HDF5_save_CPPFLAGS" - LDFLAGS="$ac_HDF5_save_LDFLAGS" - LIBS="$ac_HDF5_save_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the c++ compiler supports dlopen/dlsym/dlclose" >&5 +printf %s "checking whether the c++ compiler supports dlopen/dlsym/dlclose... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "x$succeeded" = "xno" -then : - if test "x$is_package_required" = "xyes" -then : - as_fn_error $? "HDF5 not found. Try either --with-hdf5 or setting HDF5_DIR." "$LINENO" 5 -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: optional HDF5 library not found, or does not meet version requirements" >&5 -printf "%s\n" "$as_me: optional HDF5 library not found, or does not meet version requirements" >&6;} ;; -esac -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - HDF5_CFLAGS="" - HDF5_CPPFLAGS="" - HDF5_LIBS="" - HDF5_PREFIX="" + #include // NULL + #include -else case e in #( - e) - HAVE_HDF5=1 +int +main (void) +{ -printf "%s\n" "#define HAVE_HDF5 1" >>confdefs.h + // Try all possible ways of naming libraries. dlopen() will search + // in system-dependent paths if these names do not contain forward + // slashes. + const unsigned n_names = 2; + const char * lib_namesn_names = {"libm.so", "libm.dylib"}; + + // To catch the output of dlopen + void * handle = NULL; + + for (unsigned i=0; i&5 +printf "%s\n" "yes" >&6; } + ac_cv_cxx_dlopen=yes +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_cxx_dlopen=no ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext -fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -#AM_CONDITIONAL(HDF5_ENABLED,test x$HAVE_HDF5 = x1) +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_dlopen" >&5 +printf "%s\n" "$ac_cv_cxx_dlopen" >&6; } - if test "x$HAVE_HDF5" = "x0" + if test "x$ac_cv_cxx_dlopen" = "xyes" then : - enablehdf5=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< HDF5 support not found or disabled >>>" >&5 -printf "%s\n" "<<< HDF5 support not found or disabled >>>" >&6; } + +printf "%s\n" "#define HAVE_FPARSER_JIT 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with fparser JIT compilation support >>>" >&5 +printf "%s\n" "<<< Configuring library with fparser JIT compilation support >>>" >&6; } + enablefparserjit=yes else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with HDF5 support >>>" >&5 -printf "%s\n" "<<< Configuring library with HDF5 support >>>" >&6; } ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< dlopen() not found" >&5 +printf "%s\n" "<<< dlopen() not found" >&6; } + enablefparserjit=no + ;; esac fi -fi + if test "x$enablefparserdebugging" = "xyes" +then : -CPPFLAGS="$ac_PETSCHDF5_save_CPPFLAGS" -LDFLAGS="$ac_PETSCHDF5_save_LDFLAGS" +printf "%s\n" "#define FPARSER_SUPPORT_DEBUGGING 1" >>confdefs.h -if test $enablehdf5 = yes -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with fparser debugging functions >>>" >&5 +printf "%s\n" "<<< Configuring library with fparser debugging functions >>>" >&6; } - libmesh_optional_INCLUDES="$HDF5_CPPFLAGS $libmesh_optional_INCLUDES" +fi - if test "$hdf5_has_cxx" = yes -then : - libmesh_optional_LIBS="$HDF5_CXXLIBS $libmesh_optional_LIBS" +else case e in #( + e) + FPARSER_INCLUDE="" + FPARSER_LIBRARY="" + enablefparser=no + ;; +esac fi - libmesh_optional_LIBS="$HDF5_LIBS $libmesh_optional_LIBS" -fi - if test x$enablehdf5 = xyes; then - LIBMESH_ENABLE_HDF5_TRUE= - LIBMESH_ENABLE_HDF5_FALSE='#' + + + if test x$enablefparserdevel = xno; then + FPARSER_RELEASE_TRUE= + FPARSER_RELEASE_FALSE='#' else - LIBMESH_ENABLE_HDF5_TRUE='#' - LIBMESH_ENABLE_HDF5_FALSE= + FPARSER_RELEASE_TRUE='#' + FPARSER_RELEASE_FALSE= fi + if test x$enablefparserdevel = xyes; then + FPARSER_DEVEL_TRUE= + FPARSER_DEVEL_FALSE='#' +else + FPARSER_DEVEL_TRUE='#' + FPARSER_DEVEL_FALSE= +fi -# -------------------------------------------------------------- -# libxml2 for netCDF -# -------------------------------------------------------------- + if test x$enablefparserdebugging = xyes; then + FPARSER_SUPPORT_DEBUGGING_TRUE= + FPARSER_SUPPORT_DEBUGGING_FALSE='#' +else + FPARSER_SUPPORT_DEBUGGING_TRUE='#' + FPARSER_SUPPORT_DEBUGGING_FALSE= +fi + if test x$enablefparserjit = xyes; then + FPARSER_SUPPORT_JIT_TRUE= + FPARSER_SUPPORT_JIT_FALSE='#' +else + FPARSER_SUPPORT_JIT_TRUE='#' + FPARSER_SUPPORT_JIT_FALSE= +fi -# Check whether --with-xml-prefix was given. -if test ${with_xml_prefix+y} -then : - withval=$with_xml_prefix; xml_config_prefix="$withval" -else case e in #( - e) xml_config_prefix="" ;; -esac + if test "$GXX" = "yes" && test "x$REAL_GXX" != "x"; then + FPARSER_NO_PSABI_TRUE= + FPARSER_NO_PSABI_FALSE='#' +else + FPARSER_NO_PSABI_TRUE='#' + FPARSER_NO_PSABI_FALSE= fi -# Check whether --with-xml-exec-prefix was given. -if test ${with_xml_exec_prefix+y} +if test $enablefparser = yes then : - withval=$with_xml_exec_prefix; xml_config_exec_prefix="$withval" -else case e in #( - e) xml_config_exec_prefix="" ;; -esac + libmesh_contrib_INCLUDES="$FPARSER_INCLUDE $libmesh_contrib_INCLUDES" fi -# Check whether --enable-xmltest was given. -if test ${enable_xmltest+y} + if test x$enablefparser = xyes; then + LIBMESH_ENABLE_FPARSER_TRUE= + LIBMESH_ENABLE_FPARSER_FALSE='#' +else + LIBMESH_ENABLE_FPARSER_TRUE='#' + LIBMESH_ENABLE_FPARSER_FALSE= +fi + +ac_config_files="$ac_config_files contrib/fparser/Makefile" + +ac_config_files="$ac_config_files contrib/fparser/extrasrc/Makefile" + +# ------------------------------------------------------------- + + + +# ------------------------------------------------------------- +# cppunit C++ unit testing -- enabled by default +# ------------------------------------------------------------- +# Check whether --enable-cppunit was given. +if test ${enable_cppunit+y} then : - enableval=$enable_xmltest; + enableval=$enable_cppunit; case "${enableval}" in #( + yes) : + enablecppunit=yes ;; #( + no) : + enablecppunit=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-cppunit" "$LINENO" 5 ;; +esac else case e in #( - e) enable_xmltest=yes ;; + e) enablecppunit=yes ;; esac fi +if test "$enablecppunit" = yes +then : - if test x$xml_config_exec_prefix != x ; then - xml_config_args="$xml_config_args" - if test x${XML2_CONFIG+set} != xset ; then - XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config - fi - fi - if test x$xml_config_prefix != x ; then - xml_config_args="$xml_config_args --prefix=$xml_config_prefix" - if test x${XML2_CONFIG+set} != xset ; then - XML2_CONFIG=$xml_config_prefix/bin/xml2-config - fi - fi + CPPUNIT_CFLAGS= + CPPUNIT_LIBS=-lcppunit - # Extract the first word of "xml2-config", so it can be a program name with args. -set dummy xml2-config; ac_word=$2 + # Extract the first word of "cppunit-config", so it can be a program name with args. +set dummy cppunit-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_XML2_CONFIG+y} +if test ${ac_cv_prog_CPPUNIT_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( - e) case $XML2_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + e) if test -n "$CPPUNIT_CONFIG"; then + ac_cv_prog_CPPUNIT_CONFIG="$CPPUNIT_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -71070,512 +72703,412 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_XML2_CONFIG="$as_dir$ac_word$ac_exec_ext" + ac_cv_prog_CPPUNIT_CONFIG="cppunit-config" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_XML2_CONFIG" && ac_cv_path_XML2_CONFIG="no" - ;; -esac ;; -esac -fi -XML2_CONFIG=$ac_cv_path_XML2_CONFIG -if test -n "$XML2_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5 -printf "%s\n" "$XML2_CONFIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - min_xml_version=2.0.0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml - version >= $min_xml_version" >&5 -printf %s "checking for libxml - version >= $min_xml_version... " >&6; } - no_xml="" - if test "$XML2_CONFIG" = "no" ; then - no_xml=yes - else - XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags` - XML_LIBS=`$XML2_CONFIG $xml_config_args --libs` - xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test "x$enable_xmltest" = "xyes" ; then - ac_save_CPPFLAGS="$CPPFLAGS" - ac_save_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" - LIBS="$XML_LIBS $LIBS" - rm -f conf.xmltest - if test "$cross_compiling" = yes -then : - echo $ac_n "cross compiling; assumed OK... $ac_c" -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#include - -int -main() -{ - int xml_major_version, xml_minor_version, xml_micro_version; - int major, minor, micro; - char *tmp_version; - - system("touch conf.xmltest"); - - /* Capture xml2-config output via autoconf/configure variables */ - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = (char *)strdup("$min_xml_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string from xml2-config\n", "$min_xml_version"); - exit(1); - } - free(tmp_version); - - /* Capture the version information from the header files */ - tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION); - if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) { - printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION"); - exit(1); - } - free(tmp_version); - - /* Compare xml2-config output to the libxml headers */ - if ((xml_major_version != $xml_config_major_version) || - (xml_minor_version != $xml_config_minor_version) || - (xml_micro_version != $xml_config_micro_version)) - { - printf("*** libxml header files (version %d.%d.%d) do not match\n", - xml_major_version, xml_minor_version, xml_micro_version); - printf("*** xml2-config (version %d.%d.%d)\n", - $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); - return 1; - } -/* Compare the headers to the library to make sure we match */ - /* Less than ideal -- doesn't provide us with return value feedback, - * only exits if there's a serious mismatch between header and library. - */ - LIBXML_TEST_VERSION; +done + done +IFS=$as_save_IFS - /* Test that the library is greater than our minimum version */ - if ((xml_major_version > major) || - ((xml_major_version == major) && (xml_minor_version > minor)) || - ((xml_major_version == major) && (xml_minor_version == minor) && - (xml_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", - xml_major_version, xml_minor_version, xml_micro_version); - printf("*** You need a version of libxml newer than %d.%d.%d.\n", - major, minor, micro); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the xml2-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); - printf("*** correct copy of xml2-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - return 1; -} + test -z "$ac_cv_prog_CPPUNIT_CONFIG" && ac_cv_prog_CPPUNIT_CONFIG="none" +fi ;; +esac +fi +CPPUNIT_CONFIG=$ac_cv_prog_CPPUNIT_CONFIG +if test -n "$CPPUNIT_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPPUNIT_CONFIG" >&5 +printf "%s\n" "$CPPUNIT_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -_ACEOF -if ac_fn_c_try_run "$LINENO" + + if test "x$CPPUNIT_CONFIG" = "xcppunit-config" then : -else case e in #( - e) no_xml=yes ;; -esac + CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` + CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` + fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + + +# Check whether --with-cppunit-include was given. +if test ${with_cppunit_include+y} +then : + withval=$with_cppunit_include; CPPUNIT_CFLAGS="-I$withval" fi - CPPFLAGS="$ac_save_CPPFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_xml" = x ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)" >&5 -printf "%s\n" "yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)" >&6; } - haveexternalxml2=yes - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - if test "$XML2_CONFIG" = "no" ; then - echo "*** The xml2-config script installed by LIBXML could not be found" - echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the XML2_CONFIG environment variable to the" - echo "*** full path to xml2-config." - else - if test -f conf.xmltest ; then - : - else - echo "*** Could not run libxml test program, checking why..." - CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" - LIBS="$LIBS $XML_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +# Check whether --with-cppunit-lib was given. +if test ${with_cppunit_lib+y} +then : + withval=$with_cppunit_lib; CPPUNIT_LIBS="-L$withval -lcppunit" +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can build a trivial CppUnit program" >&5 +printf %s "checking whether we can build a trivial CppUnit program... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + saveCXXFLAGS="$CXXFLAGS" + CXXFLAGS="$saveCXXFLAGS $CPPUNIT_CFLAGS" + saveLIBS="$LIBS" + LIBS="$CPPUNIT_LIBS $saveLIBS" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include + #include + int main(int argc, char **argv) + { + CppUnit::TextUi::TestRunner runner; + + if (runner.run()) + return 0; + + return 1; + } -int -main (void) -{ - LIBXML_TEST_VERSION; return 0; - ; - return 0; -} _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_cxx_try_link "$LINENO" then : - echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding LIBXML or finding the wrong" - echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else case e in #( - e) echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occurred. This usually means LIBXML was incorrectly installed" - echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" - echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + CPPUNIT_CFLAGS= + CPPUNIT_LIBS= + enablecppunit=no + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$ac_save_CPPFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - XML_CPPFLAGS="" - XML_LIBS="" - haveexternalxml2=no - fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + LIBS="$saveLIBS" + CXXFLAGS="$saveCXXFLAGS" + - rm -f conf.xmltest -if test $haveexternalxml2 = yes -then : - libmesh_contrib_CPPFLAGS="$XML_CPPFLAGS $libmesh_contrib_CPPFLAGS" - libmesh_contrib_LIBS="$XML_LIBS $libmesh_contrib_LIBS" fi -# -------------------------------------------------------------- -# netCDF -- enabled by default (it is distributed in contrib) -# -------------------------------------------------------------- + if test x$enablecppunit = xyes; then + LIBMESH_ENABLE_CPPUNIT_TRUE= + LIBMESH_ENABLE_CPPUNIT_FALSE='#' +else + LIBMESH_ENABLE_CPPUNIT_TRUE='#' + LIBMESH_ENABLE_CPPUNIT_FALSE= +fi - configure_netcdf_v462='' - configure_netcdf_v492='' +# ------------------------------------------------------------- - # Check whether --enable-netcdf was given. -if test ${enable_netcdf+y} + + +# ------------------------------------------------------------- +# nanoflann -- enabled by default +# ------------------------------------------------------------- + + # Check whether --enable-nanoflann was given. +if test ${enable_nanoflann+y} then : - enableval=$enable_netcdf; case "${enableval}" in #( - v492) : - enablenetcdf=yes - netcdfversion="v4.9.2" - configure_netcdf_v492=yes ;; #( - yes|new|v4|v462) : - enablenetcdf=yes - netcdfversion="v4.6.2" - configure_netcdf_v462=yes ;; #( - all) : - enablenetcdf=yes - netcdfversion="v4.9.2" - configure_netcdf_v462=yes - configure_netcdf_v492=yes ;; #( - old|v3) : - enablenetcdf=yes - netcdfversion=3 ;; #( + enableval=$enable_nanoflann; case "${enableval}" in #( + yes) : + enablenanoflann=yes ;; #( no) : - enablenetcdf=no - netcdfversion=no ;; #( + enablenanoflann=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-netcdf" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-nanoflann" "$LINENO" 5 ;; esac else case e in #( - e) enablenetcdf=$enableoptional; - netcdfversion="v4.6.2" - configure_netcdf_v462=yes ;; + e) enablenanoflann=$enableoptional ;; esac fi - if test "x$enablenetcdf" = "xno" + # Check whether --enable-nanoflann-pointlocator was given. +if test ${enable_nanoflann_pointlocator+y} then : - netcdfversion=no; - configure_netcdf_v462='' - configure_netcdf_v492='' + enableval=$enable_nanoflann_pointlocator; case "${enableval}" in #( + yes) : + enablenanoflannpointlocator=yes ;; #( + no) : + enablenanoflannpointlocator=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-nanoflann-pointlocator" "$LINENO" 5 ;; +esac +else case e in #( + e) enablenanoflannpointlocator=no ;; +esac fi - if test "x$netcdfversion" = "x3" + + if test "x$enablenanoflann" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using netCDF 3.x is no longer supported, using version 4.x instead. >>>" >&5 -printf "%s\n" "<<< Using netCDF 3.x is no longer supported, using version 4.x instead. >>>" >&6; } - netcdfversion=4 + NANOFLANN_INCLUDE="-I\$(top_srcdir)/contrib/nanoflann/nanoflann/include" -fi +printf "%s\n" "#define HAVE_NANOFLANN 1" >>confdefs.h - netcdf_v4_arg='' - case "${netcdfversion}" in #( - 3) : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with nanoflann KDtree support >>>" >&5 +printf "%s\n" "<<< Configuring library with nanoflann KDtree support >>>" >&6; } - as_fn_error $? ">>> Error: netCDF3 is no longer distributed with libMesh <<<" "$LINENO" 5 - ;; #( - "v4.6.2") : - NETCDF_INCLUDE="-I\$(top_srcdir)/contrib/netcdf/netcdf-c-4.6.2/include -I\$(top_builddir)/contrib/netcdf/netcdf-c-4.6.2/include" + if test "x$enablenanoflannpointlocator" = "xyes" +then : -printf "%s\n" "#define HAVE_NETCDF 1" >>confdefs.h - if test "x$enablenested" = "xno" -then : - as_fn_error $? "NetCDF v4 requires nested subpackages, try --enable-nested" "$LINENO" 5 +printf "%s\n" "#define ENABLE_NANOFLANN_POINTLOCATOR 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nanoflann-based PointLocator >>>" >&5 +printf "%s\n" "<<< Configuring library with Nanoflann-based PointLocator >>>" >&6; } + fi - if test "x$enablehdf5" = "xno" -then : - netcdf_v4_arg=--disable-netcdf-4 +else case e in #( + e) + NANOFLANN_INCLUDE="" + enablenanoflann=no + ;; +esac fi - libmesh_pkgconfig_requires="netcdf >= 4.2 $libmesh_pkgconfig_requires" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NetCDF version 4.6.2 support >>>" >&5 -printf "%s\n" "<<< Configuring library with NetCDF version 4.6.2 support >>>" >&6; } ;; #( - "v4.9.2") : - NETCDF_INCLUDE="-I\$(top_srcdir)/contrib/netcdf/netcdf-c/include -I\$(top_builddir)/contrib/netcdf/netcdf-c/include" -printf "%s\n" "#define HAVE_NETCDF 1" >>confdefs.h - if test "x$enablenested" = "xno" +if test $enablenanoflann = yes then : - as_fn_error $? "NetCDF v4 requires nested subpackages, try --enable-nested" "$LINENO" 5 + libmesh_contrib_INCLUDES="$NANOFLANN_INCLUDE $libmesh_contrib_INCLUDES" fi - if test "x$enablehdf5" = "xno" -then : - netcdf_v4_arg=--disable-netcdf-4 + if test x$enablenanoflann = xyes; then + LIBMESH_ENABLE_NANOFLANN_TRUE= + LIBMESH_ENABLE_NANOFLANN_FALSE='#' +else + LIBMESH_ENABLE_NANOFLANN_TRUE='#' + LIBMESH_ENABLE_NANOFLANN_FALSE= fi - libmesh_pkgconfig_requires="netcdf >= 4.2 $libmesh_pkgconfig_requires" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NetCDF version 4.9.2 support >>>" >&5 -printf "%s\n" "<<< Configuring library with NetCDF version 4.9.2 support >>>" >&6; } ;; #( - *) : +ac_config_files="$ac_config_files contrib/nanoflann/Makefile" - NETCDF_INCLUDE="" - enablenetcdf=no - ;; -esac +# ------------------------------------------------------------- - if test "x$enablenested" = "xyes" -then : - SUB_CPPFLAGS="$CPPFLAGS" - SUB_LDFLAGS="$LDFLAGS" - SUB_LIBS="$LIBS" - if test $enablehdf5 = yes -then : - SUB_CPPFLAGS="$HDF5_CPPFLAGS $SUB_CPPFLAGS" - SUB_LIBS="$HDF5_LIBS $SUB_LIBS" - SUB_LDFLAGS="$HDF5_LDFLAGS $SUB_LDFLAGS" - if test "x$enablepetsc" != "xno" +# ------------------------------------------------------------- +# MetaPhysicL -- enabled by default +# ------------------------------------------------------------- + + # Check whether --enable-metaphysicl was given. +if test ${enable_metaphysicl+y} then : + enableval=$enable_metaphysicl; case "${enableval}" in #( + yes) : + enablemetaphysicl=yes ;; #( + no) : + enablemetaphysicl=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-metaphysicl" "$LINENO" 5 ;; +esac +else case e in #( + e) enablemetaphysicl=$enablenested ;; +esac +fi - SUB_CPPFLAGS="$PETSCINCLUDEDIRS $SUB_CPPFLAGS" - SUB_LIBS="$PETSCLINKLIBS $SUB_LIBS" -fi -fi - if test "x$haveexternalxml2" = "xyes" +# Check whether --with-metaphysicl was given. +if test ${with_metaphysicl+y} then : - netcdf_xml2_arg='' + withval=$with_metaphysicl; case "${withval}" in #( + internal) : + build_metaphysicl=yes ;; #( + yes) : + build_metaphysicl=yes ;; #( + *) : + METAPHYSICL_DIR="${withval}" + build_metaphysicl=no ;; +esac + enablemetaphysicl=yes else case e in #( - e) netcdf_xml2_arg='--disable-libxml2' ;; + e) build_metaphysicl=yes ;; esac fi - if test "x$enablecurl" = "xyes" + + +# Check whether --with-metaphysicl-include was given. +if test ${with_metaphysicl_include+y} then : - netcdf_dap_arg=--enable-dap - netcdf_curl_arg='' - netcdf_byterange_arg='' + withval=$with_metaphysicl_include; METAPHYSICL_INCLUDE="-I${withval}" + METAPHYSICL_INC="-I${withval}" + enablemetaphysicl=yes + build_metaphysicl=no else case e in #( - e) netcdf_dap_arg=--disable-dap - netcdf_curl_arg=--disable-curl - netcdf_byterange_arg=--disable-byterange ;; + e) if test "x$build_metaphysicl" = "xyes" +then : + METAPHYSICL_INCLUDE="-I\$(top_srcdir)/contrib/metaphysicl/src/numerics/include -I\$(top_srcdir)/contrib/metaphysicl/src/core/include -I\$(top_srcdir)/contrib/metaphysicl/src/utilities/include -I\$(top_builddir)/contrib/metaphysicl/src/utilities/include" + METAPHYSICL_INC="-I$top_srcdir/contrib/metaphysicl/src/numerics/include -I$top_srcdir/contrib/metaphysicl/src/core/include -I$top_srcdir/contrib/metaphysicl/src/utilities/include -I$top_builddir/contrib/metaphysicl/src/utilities/include" +else case e in #( + e) METAPHYSICL_INCLUDE="-I$METAPHYSICL_DIR/include" + METAPHYSICL_INC="-I$METAPHYSICL_DIR/include" ;; +esac +fi + ;; esac fi - - if test "x$configure_netcdf_v462" = "xyes" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configuring NetCDF v4.6.2" >&5 -printf "%s\n" "$as_me: Configuring NetCDF v4.6.2" >&6;} - # Various preliminary checks. + # Check whether --enable-metaphysicl-required was given. +if test ${enable_metaphysicl_required+y} +then : + enableval=$enable_metaphysicl_required; case "${enableval}" in #( + yes) : + metaphysiclrequired=yes ;; #( + no) : + metaphysiclrequired=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-metaphysicl-required" "$LINENO" 5 ;; +esac +else case e in #( + e) metaphysiclrequired=no ;; +esac +fi + if test "x$enablemetaphysicl" = "xno" && test "x$metaphysiclrequired" = "xyes" +then : + enablemetaphysicl=yes +fi + if test "x$enablemetaphysicl" = "xyes" +then : - ax_dir="contrib/netcdf/netcdf-c-4.6.2" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MetaPhysicL NumberArray support" >&5 +printf %s "checking for MetaPhysicL NumberArray support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # Do not complain, so a configure script can configure whichever parts of a - # large source tree are present. - if test -d "$srcdir/$ax_dir"; then - ac_builddir=. -case "$ax_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ax_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $METAPHYSICL_INC" -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. - ax_args= - ax_prev= - eval "set x $ac_configure_args" - shift - for ax_arg; do - if test -n "$ax_prev"; then - ax_prev= - continue - fi - case $ax_arg in - -cache-file | --cache-file | --cache-fil | --cache-fi | --cache-f \ - | --cache- | --cache | --cach | --cac | --ca | --c) - ax_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ - | --c=*) - ;; - --config-cache | -C) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ax_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ax_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* \ - | --p=*) - ;; - --disable-option-checking) - ;; - *) case $ax_arg in - *\'*) ax_arg=$(printf "%s\n" "$ax_arg" | sed "s/'/'\\\\\\\\''/g");; - esac - as_fn_append ax_args " '$ax_arg'" ;; - esac - done - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ax_args="--disable-option-checking $ax_args" - # Options that must be added as they are provided. - as_fn_append ax_args " 'CXX=$CXX'" - as_fn_append ax_args " 'CC=$CC'" - as_fn_append ax_args " 'F77=$F77'" - as_fn_append ax_args " 'FC=$FC'" - as_fn_append ax_args " 'CPPFLAGS=$SUB_CPPFLAGS'" - as_fn_append ax_args " 'LDFLAGS=$SUB_LDFLAGS'" - as_fn_append ax_args " 'LIBS=$SUB_LIBS'" - as_fn_append ax_args " '$netcdf_xml2_arg'" - as_fn_append ax_args " '$netcdf_dap_arg'" - as_fn_append ax_args " '$netcdf_curl_arg'" - as_fn_append ax_args " '$netcdf_byterange_arg'" - as_fn_append ax_args " '--disable-testsets'" - as_fn_append ax_args " '$netcdf_v4_arg'" + #include "metaphysicl/raw_type.h" - # New options that may need to be merged with existing options. +int +main (void) +{ - # New options that must replace existing options. + MetaPhysicL::RawType x; - # Options that must be removed. + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : - as_fn_append ax_args " '--srcdir=$ac_srcdir'" + enablemetaphysicl=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - # Add the subdirectory to the list of target subdirectories. - ax_subconfigures="$ax_subconfigures $ax_dir" - # Save the argument list for this subdirectory. - ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_") - eval "ax_sub_configure_args_$ax_var=\"$ax_args\"" - eval "ax_sub_configure_$ax_var=\"yes\"" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find source tree for $ax_dir" >&5 -printf "%s\n" "$as_me: WARNING: could not find source tree for $ax_dir" >&2;} - fi +else case e in #( + e) + enablemetaphysicl=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + if test "x$build_metaphysicl" = "xyes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Metaphysicl not found, you may need to run 'git submodule update --init' first <<<" >&5 +printf "%s\n" ">>> Metaphysicl not found, you may need to run 'git submodule update --init' first <<<" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Metaphysicl not found in specified location <<<" >&5 +printf "%s\n" ">>> Metaphysicl not found in specified location <<<" >&6; } ;; +esac +fi + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CXXFLAGS="$old_CXXFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi + if test "x$enablemetaphysicl" = "xno" && test "x$metaphysiclrequired" = "xyes" +then : + as_fn_error 5 "*** MetaPhysicL was not found, but --enable-metaphysicl-required was specified." "$LINENO" 5 +fi -else case e in #( - e) mkdir -p contrib/netcdf/netcdf-c-4.6.2 - echo "distclean:" > contrib/netcdf/netcdf-c-4.6.2/Makefile - echo "distdir:" >> contrib/netcdf/netcdf-c-4.6.2/Makefile - cat contrib/netcdf/netcdf-c-4.6.2/Makefile - ;; -esac + if test "x$enablemetaphysicl" = "xyes" +then : + + +printf "%s\n" "#define HAVE_METAPHYSICL 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with MetaPhysicL support >>>" >&5 +printf "%s\n" "<<< Configuring library with MetaPhysicL support >>>" >&6; } + + my_method=dbg + if test "x$build_devel" = xyes +then : + my_method=devel fi - if test "x$configure_netcdf_v492" = "xyes" + if test "x$build_prof" = xyes +then : + my_method=prof +fi + if test "x$build_oprof" = xyes +then : + my_method=oprof +fi + if test "x$build_opt" = xyes +then : + my_method=opt +fi + + my_top_srcdir="$(cd $srcdir && pwd)" + + if test "x$build_metaphysicl" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configuring NetCDF v4.9.2" >&5 -printf "%s\n" "$as_me: Configuring NetCDF v4.9.2" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with built-in MetaPhysicL support >>>" >&5 +printf "%s\n" "<<< Configuring library with built-in MetaPhysicL support >>>" >&6; } + if test "x$prefix" = "xNONE" +then : + future_timpi_prefix=$ac_abs_top_builddir/contrib/timpi/src/ +else case e in #( + e) future_timpi_prefix=$prefix ;; +esac +fi # Various preliminary checks. @@ -71584,7 +73117,7 @@ printf "%s\n" "$as_me: Configuring NetCDF v4.9.2" >&6;} - ax_dir="contrib/netcdf/netcdf-c" + ax_dir="contrib/metaphysicl" # Do not complain, so a configure script can configure whichever parts of a # large source tree are present. @@ -71665,19 +73198,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix # different subdirs can have different --enable and --with options. ax_args="--disable-option-checking $ax_args" # Options that must be added as they are provided. - as_fn_append ax_args " 'CXX=$CXX'" - as_fn_append ax_args " 'CC=$CC'" - as_fn_append ax_args " 'F77=$F77'" - as_fn_append ax_args " 'FC=$FC'" - as_fn_append ax_args " 'CPPFLAGS=$SUB_CPPFLAGS'" - as_fn_append ax_args " 'LDFLAGS=$SUB_LDFLAGS'" - as_fn_append ax_args " 'LIBS=$SUB_LIBS'" - as_fn_append ax_args " '$netcdf_xml2_arg'" - as_fn_append ax_args " '$netcdf_dap_arg'" - as_fn_append ax_args " '$netcdf_curl_arg'" - as_fn_append ax_args " '$netcdf_byterange_arg'" - as_fn_append ax_args " '--disable-testsets'" - as_fn_append ax_args " '$netcdf_v4_arg'" + as_fn_append ax_args " '--with-cxx-std=20$acsm_cxx_version'" + as_fn_append ax_args " 'CPPFLAGS=-I$my_top_srcdir/contrib/timpi/src/algorithms/include/ -I$my_top_srcdir/contrib/timpi/src/parallel/include/ -I$my_top_srcdir/contrib/timpi/src/utilities/include/ -I$ac_abs_top_builddir/contrib/timpi/src/utilities/include/ $CPPFLAGS'" + as_fn_append ax_args " 'LDFLAGS=-L$ac_abs_top_builddir/contrib/timpi/src/ $LDFLAGS'" + as_fn_append ax_args " '--with-future-timpi-dir=$future_timpi_prefix'" + as_fn_append ax_args " '--with-timpi-method=$my_method'" # New options that may need to be merged with existing options. @@ -71703,488 +73228,228 @@ printf "%s\n" "$as_me: WARNING: could not find source tree for $ax_dir" >&2;} else case e in #( - e) mkdir -p contrib/netcdf/netcdf-c - echo "distclean:" > contrib/netcdf/netcdf-c/Makefile - echo "distdir:" >> contrib/netcdf/netcdf-c/Makefile - cat contrib/netcdf/netcdf-c/Makefile - ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with external MetaPhysicL support >>>" >&5 +printf "%s\n" "<<< Configuring library with external MetaPhysicL support >>>" >&6; } ;; esac fi -fi - - - -if test $enablenetcdf = yes -then : - libmesh_contrib_INCLUDES="$NETCDF_INCLUDE $libmesh_contrib_INCLUDES" -fi - - if test x$enablenetcdf = xyes; then - LIBMESH_ENABLE_NETCDF_TRUE= - LIBMESH_ENABLE_NETCDF_FALSE='#' -else - LIBMESH_ENABLE_NETCDF_TRUE='#' - LIBMESH_ENABLE_NETCDF_FALSE= -fi - - if test x$netcdfversion = xv4.6.2; then - LIBMESH_ENABLE_NETCDF_V462_TRUE= - LIBMESH_ENABLE_NETCDF_V462_FALSE='#' -else - LIBMESH_ENABLE_NETCDF_V462_TRUE='#' - LIBMESH_ENABLE_NETCDF_V462_FALSE= -fi - - if test x$netcdfversion = xv4.9.2; then - LIBMESH_ENABLE_NETCDF_V492_TRUE= - LIBMESH_ENABLE_NETCDF_V492_FALSE='#' -else - LIBMESH_ENABLE_NETCDF_V492_TRUE='#' - LIBMESH_ENABLE_NETCDF_V492_FALSE= -fi - - -# ------------------------------------------------------------- -# ExodusII -- enabled by default (it is distributed in contrib) -# (note that ExodusII requires netCDF) -# ------------------------------------------------------------- - - # Check whether --enable-exodus was given. -if test ${enable_exodus+y} -then : - enableval=$enable_exodus; case "${enableval}" in #( - yes) : - enableexodus=yes - if test "x$enablehdf5" = "xyes" -then : - exodusversion=v8.11 -else case e in #( - e) exodusversion=v5.22 ;; -esac -fi ;; #( - v811) : - enableexodus=yes - exodusversion="v8.11" ;; #( - new|v522) : - enableexodus=yes - exodusversion="v5.22" ;; #( - old|v509) : - enableexodus=yes - exodusversion="v5.09" ;; #( - no) : - enableexodus=no - exodusversion=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-exodus" "$LINENO" 5 ;; -esac -else case e in #( - e) enableexodus=$enablenetcdf ; - if test "x$enablehdf5" = "xyes" -then : - exodusversion=v8.11 else case e in #( - e) exodusversion=v5.22 ;; -esac -fi ;; + e) + METAPHYSICL_INCLUDE="" + ;; esac fi - if test "x$enableexodus" = "xno" -then : - exodusversion=no -fi - - EXODUS_NOT_NETCDF4_FLAG="" - if test "x$enablehdf5" = "xno" || test "x$netcdfversion" = "x3" -then : - - EXODUS_NOT_NETCDF4_FLAG="-DNOT_NETCDF4" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defining -DNOT_NETCDF4 for our Exodus build" >&5 -printf "%s\n" "defining -DNOT_NETCDF4 for our Exodus build" >&6; } - -fi - - case "${exodusversion}" in #( - "v5.09") : - EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/include" - -printf "%s\n" "#define HAVE_EXODUS_API 1" >>confdefs.h - - -printf "%s\n" "#define DETECTED_EXODUS_VERSION_MAJOR 5" >>confdefs.h - - -printf "%s\n" "#define DETECTED_EXODUS_VERSION_MINOR 9" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with Exodus version $exodusversion support >>>" >&6; } - enableexodusfortran=no ;; #( - "v5.22") : - EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/cbind/include" - -printf "%s\n" "#define HAVE_EXODUS_API 1" >>confdefs.h - - -printf "%s\n" "#define DETECTED_EXODUS_VERSION_MAJOR 5" >>confdefs.h - - -printf "%s\n" "#define DETECTED_EXODUS_VERSION_MINOR 22" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with Exodus version $exodusversion support >>>" >&6; } - # Check whether --enable-exodus-fortran was given. -if test ${enable_exodus_fortran+y} -then : - enableval=$enable_exodus_fortran; case "${enableval}" in #( - yes) : - enableexodusfortran=yes ;; #( - no) : - enableexodusfortran=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-exodus-fortran" "$LINENO" 5 ;; -esac -else case e in #( - e) enableexodusfortran=$enablefortran ;; -esac + if test x$build_metaphysicl = xyes; then + BUILD_METAPHYSICL_TRUE= + BUILD_METAPHYSICL_FALSE='#' +else + BUILD_METAPHYSICL_TRUE='#' + BUILD_METAPHYSICL_FALSE= fi - if test "x$enableexodusfortran" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus Fortran API >>>" >&5 -printf "%s\n" "<<< Configuring library with Exodus Fortran API >>>" >&6; } -fi ;; #( - "v8.11") : - EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/include -I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/sierra" - -printf "%s\n" "#define HAVE_EXODUS_API 1" >>confdefs.h - - -printf "%s\n" "#define DETECTED_EXODUS_VERSION_MAJOR 8" >>confdefs.h - - -printf "%s\n" "#define DETECTED_EXODUS_VERSION_MINOR 11" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with Exodus version $exodusversion support >>>" >&6; } - enableexodusfortran=no ;; #( - *) : - - EXODUS_INCLUDE="" - enableexodus=no - enableexodusfortran=no - ;; -esac - - ac_config_files="$ac_config_files contrib/exodusii/v5.09/Makefile" - - ac_config_files="$ac_config_files contrib/exodusii/v5.22/exodus/Makefile" - - ac_config_files="$ac_config_files contrib/exodusii/v8.11/exodus/Makefile" - if test x$enableexodusfortran = xyes; then - EXODUS_FORTRAN_API_TRUE= - EXODUS_FORTRAN_API_FALSE='#' -else - EXODUS_FORTRAN_API_TRUE='#' - EXODUS_FORTRAN_API_FALSE= -fi - - -if test $enableexodus = yes +if test $enablemetaphysicl = yes then : - libmesh_contrib_INCLUDES="$EXODUS_INCLUDE $libmesh_contrib_INCLUDES" -fi - - if test x$enableexodus = xyes; then - LIBMESH_ENABLE_EXODUS_TRUE= - LIBMESH_ENABLE_EXODUS_FALSE='#' -else - LIBMESH_ENABLE_EXODUS_TRUE='#' - LIBMESH_ENABLE_EXODUS_FALSE= + libmesh_contrib_INCLUDES="$METAPHYSICL_INCLUDE $libmesh_contrib_INCLUDES" fi - if test x$exodusversion = xv5.09; then - LIBMESH_ENABLE_EXODUS_V509_TRUE= - LIBMESH_ENABLE_EXODUS_V509_FALSE='#' + if test x$enablemetaphysicl = xyes; then + LIBMESH_ENABLE_METAPHYSICL_TRUE= + LIBMESH_ENABLE_METAPHYSICL_FALSE='#' else - LIBMESH_ENABLE_EXODUS_V509_TRUE='#' - LIBMESH_ENABLE_EXODUS_V509_FALSE= + LIBMESH_ENABLE_METAPHYSICL_TRUE='#' + LIBMESH_ENABLE_METAPHYSICL_FALSE= fi - if test x$exodusversion = xv5.22; then - LIBMESH_ENABLE_EXODUS_V522_TRUE= - LIBMESH_ENABLE_EXODUS_V522_FALSE='#' -else - LIBMESH_ENABLE_EXODUS_V522_TRUE='#' - LIBMESH_ENABLE_EXODUS_V522_FALSE= -fi +# ------------------------------------------------------------- - if test x$exodusversion = xv8.11; then - LIBMESH_ENABLE_EXODUS_V811_TRUE= - LIBMESH_ENABLE_EXODUS_V811_FALSE='#' -else - LIBMESH_ENABLE_EXODUS_V811_TRUE='#' - LIBMESH_ENABLE_EXODUS_V811_FALSE= -fi # ------------------------------------------------------------- -# Nemesis -- enabled by default (it is distributed in contrib) -# (note that Nemesis requires netCDF and exodus) +# Kokkos -- enables the native Kokkos FE math path +# +# We *don't* add KOKKOS_CPPFLAGS or KOKKOS_CXXFLAGS here; those +# are just for compilation of .K files, not .C # ------------------------------------------------------------- - # Check whether --enable-nemesis was given. -if test ${enable_nemesis+y} -then : - enableval=$enable_nemesis; case "${enableval}" in #( - yes|v811) : - enablenemesis=yes ; nemesisversion="v8.11" ;; #( - new|v522) : - enablenemesis=yes ; nemesisversion="v5.22" ;; #( - old|v309) : - enablenemesis=yes ; nemesisversion="v3.09" ;; #( - no) : - enablenemesis=no ; nemesisversion=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-nemesis" "$LINENO" 5 ;; -esac -else case e in #( - e) - # if unspecified, depend on exodus - enablenemesis=$enableexodus ; - if test "x$exodusversion" = "xv5.09" -then : - nemesisversion="v3.09" -else case e in #( - e) nemesisversion="$exodusversion" ;; -esac -fi - ;; -esac -fi - - - # Trump --enable-nemesis with --disable-mpi - if test "x$enablempi" = xno -then : - nemesisversion=no -fi - - case "${nemesisversion}" in #( - "v3.09") : - - NEMESIS_INCLUDE="-I\$(top_srcdir)/contrib/nemesis/$nemesisversion" - -printf "%s\n" "#define HAVE_NEMESIS_API 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nemesis version $nemesisversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with Nemesis version $nemesisversion support >>>" >&6; } - ;; #( - "v5.22") : - - NEMESIS_INCLUDE="-I\$(top_srcdir)/contrib/nemesis/$nemesisversion/nemesis" - -printf "%s\n" "#define HAVE_NEMESIS_API 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nemesis version $nemesisversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with Nemesis version $nemesisversion support >>>" >&6; } - ;; #( - "v8.11") : - - NEMESIS_INCLUDE="-I\$(top_srcdir)/contrib/nemesis/$nemesisversion/nemesis" - -printf "%s\n" "#define HAVE_NEMESIS_API 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nemesis version $nemesisversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with Nemesis version $nemesisversion support >>>" >&6; } - ;; #( - *) : - - NEMESIS_INCLUDE="" - enablenemesis=no - ;; -esac - - ac_config_files="$ac_config_files contrib/nemesis/v3.09/Makefile" - - ac_config_files="$ac_config_files contrib/nemesis/v5.22/nemesis/Makefile" - - ac_config_files="$ac_config_files contrib/nemesis/v8.11/nemesis/Makefile" - - - -if test $enablenemesis = yes -then : - libmesh_contrib_INCLUDES="$NEMESIS_INCLUDE $libmesh_contrib_INCLUDES" -fi - - if test x$enablenemesis = xyes; then - LIBMESH_ENABLE_NEMESIS_TRUE= - LIBMESH_ENABLE_NEMESIS_FALSE='#' -else - LIBMESH_ENABLE_NEMESIS_TRUE='#' - LIBMESH_ENABLE_NEMESIS_FALSE= -fi - - if test x$nemesisversion = xv3.09; then - LIBMESH_ENABLE_NEMESIS_V309_TRUE= - LIBMESH_ENABLE_NEMESIS_V309_FALSE='#' -else - LIBMESH_ENABLE_NEMESIS_V309_TRUE='#' - LIBMESH_ENABLE_NEMESIS_V309_FALSE= -fi - - if test x$nemesisversion = xv5.22; then - LIBMESH_ENABLE_NEMESIS_V522_TRUE= - LIBMESH_ENABLE_NEMESIS_V522_FALSE='#' -else - LIBMESH_ENABLE_NEMESIS_V522_TRUE='#' - LIBMESH_ENABLE_NEMESIS_V522_FALSE= -fi - - if test x$nemesisversion = xv8.11; then - LIBMESH_ENABLE_NEMESIS_V811_TRUE= - LIBMESH_ENABLE_NEMESIS_V811_FALSE='#' -else - LIBMESH_ENABLE_NEMESIS_V811_TRUE='#' - LIBMESH_ENABLE_NEMESIS_V811_FALSE= -fi -# ------------------------------------------------------------- -# libHilbert -- distributed in ./contrib, -# enabled by default -# ------------------------------------------------------------- - # Check whether --enable-libHilbert was given. -if test ${enable_libHilbert+y} +# Check whether --with-kokkos was given. +if test ${with_kokkos+y} then : - enableval=$enable_libHilbert; case "${enableval}" in #( - yes) : - enablelibhilbert=yes ;; #( - no) : - enablelibhilbert=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-libHilbert" "$LINENO" 5 ;; -esac + withval=$with_kokkos; KOKKOS_DIR="$withval" else case e in #( - e) enablelibhilbert=$enableoptional ;; + e) KOKKOS_DIR="no" ;; esac fi - if test "x$enablelibhilbert" = "xyes" -then : - - LIBHILBERT_INCLUDE="-I\$(top_srcdir)/contrib/libHilbert/include" - LIBHILBERT_LIBRARY="\$(EXTERNAL_LIBDIR)/libHilbert\$(libext)" - -printf "%s\n" "#define HAVE_LIBHILBERT 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with libHilbert support >>>" >&5 -printf "%s\n" "<<< Configuring library with libHilbert support >>>" >&6; } +# Check whether --with-kokkos-include was given. +if test ${with_kokkos_include+y} +then : + withval=$with_kokkos_include; KOKKOS_INCLUDE_DIR="$withval" else case e in #( - e) - LIBHILBERT_INCLUDE="" - LIBHILBERT_LIBRARY="" - enablelibhilbert=no - ;; + e) KOKKOS_INCLUDE_DIR="$KOKKOS_DIR/include" ;; esac fi - -if test $enablelibhilbert = yes +# Check whether --with-kokkos-lib was given. +if test ${with_kokkos_lib+y} then : - libmesh_contrib_INCLUDES="$LIBHILBERT_INCLUDE $libmesh_contrib_INCLUDES" -fi - - if test x$enablelibhilbert = xyes; then - LIBMESH_ENABLE_LIBHILBERT_TRUE= - LIBMESH_ENABLE_LIBHILBERT_FALSE='#' -else - LIBMESH_ENABLE_LIBHILBERT_TRUE='#' - LIBMESH_ENABLE_LIBHILBERT_FALSE= + withval=$with_kokkos_lib; KOKKOS_LIB_DIR="$withval" +else case e in #( + e) KOKKOS_LIB_DIR="$KOKKOS_DIR/lib" ;; +esac fi -ac_config_files="$ac_config_files contrib/libHilbert/Makefile" - -# ------------------------------------------------------------- +# Check whether --with-kokkos-backend was given. +if test ${with_kokkos_backend+y} +then : + withval=$with_kokkos_backend; KOKKOS_BACKEND="$withval" +else case e in #( + e) KOKKOS_BACKEND="auto" ;; +esac +fi -# ------------------------------------------------------------- -# fparser -- distributed in ./contrib, -# enabled by default -# ------------------------------------------------------------- - # Check whether --enable-fparser was given. -if test ${enable_fparser+y} + # Check whether --enable-kokkos-required was given. +if test ${enable_kokkos_required+y} then : - enableval=$enable_fparser; case "${enableval}" in #( + enableval=$enable_kokkos_required; case "${enableval}" in #( yes) : - enablefparser=yes ;; #( + kokkosrequired=yes ;; #( no) : - enablefparser=no ;; #( + kokkosrequired=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-fparser" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-kokkos-required" "$LINENO" 5 ;; esac else case e in #( - e) enablefparser=$enableoptional ;; + e) kokkosrequired=no ;; esac fi -# Check whether --with-fparser was given. -if test ${with_fparser+y} + if test "x$KOKKOS_INCLUDE_DIR" != "xno/include" -a "x$KOKKOS_LIB_DIR" != "xno/lib" then : - withval=$with_fparser; case "${withval}" in #( - release) : - enablefparserdevel=no ;; #( - devel) : - enablefparserdevel=yes ;; #( - none) : - enablefparser=no ;; #( - *) : - as_fn_error $? "bad value ${withval} for --with-fparser" "$LINENO" 5 ;; -esac + + KOKKOS_INCLUDES="-I$KOKKOS_INCLUDE_DIR" + KOKKOS_CPPFLAGS="${KOKKOS_CPPFLAGS:--DACSM_KOKKOS_COMPILATION}" + KOKKOS_LDFLAGS="${KOKKOS_LDFLAGS:--L$KOKKOS_LIB_DIR ${ACSM_RPATHFLAG}${KOKKOS_LIB_DIR}}" + KOKKOS_LIBS="${KOKKOS_LIBS:--lkokkoscore}" + + as_ac_File=`printf "%s\n" "ac_cv_file_$KOKKOS_INCLUDE_DIR/Kokkos_Core.hpp" | sed "$as_sed_sh"` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $KOKKOS_INCLUDE_DIR/Kokkos_Core.hpp" >&5 +printf %s "checking for $KOKKOS_INCLUDE_DIR/Kokkos_Core.hpp... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 else case e in #( - e) enablefparserdevel=no ;; + e) test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "$KOKKOS_INCLUDE_DIR/Kokkos_Core.hpp"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi ;; esac fi +eval ac_res=\$$as_ac_File + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : + enablekokkos=yes - - if test "x$enablefparser" = "xyes" + if test "x$KOKKOS_CXX" = "x" then : - # Check whether --enable-fparser-debugging was given. -if test ${enable_fparser_debugging+y} + KOKKOS_CFG="$KOKKOS_INCLUDE_DIR/KokkosCore_config.h" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} then : - enableval=$enable_fparser_debugging; case "${enableval}" in #( - yes) : - enablefparserdebugging=yes ;; #( - no) : - enablefparserdebugging=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-fparser-debugging" "$LINENO" 5 ;; -esac + printf %s "(cached) " >&6 else case e in #( - e) enablefparserdebugging=no ;; + e) if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in #( +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -fi + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : @@ -72261,398 +73526,229 @@ printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed - for ac_prog in 'bison -y' byacc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_YACC+y} + + have_kokkos_openmp=no + if test -r "$KOKKOS_CFG" then : - printf %s "(cached) " >&6 + if grep -F -q '#define KOKKOS_ENABLE_OPENMP' "$KOKKOS_CFG" +then : + have_kokkos_openmp=yes else case e in #( - e) if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_YACC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi ;; + e) have_kokkos_openmp=no ;; esac fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -printf "%s\n" "$YACC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } fi - - test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - - - FPARSER_INCLUDE="-I\$(top_srcdir)/contrib/fparser" - FPARSER_LIBRARY="\$(EXTERNAL_LIBDIR)/libfparser\$(libext)" - -printf "%s\n" "#define HAVE_FPARSER 1" >>confdefs.h - - - if test "x$enablefparserdevel" = "xyes" + if test "x$KOKKOS_BACKEND" = "xauto" then : - -printf "%s\n" "#define HAVE_FPARSER_DEVEL 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with fparser support (development version) >>>" >&5 -printf "%s\n" "<<< Configuring library with fparser support (development version) >>>" >&6; } - -else case e in #( - e) - -printf "%s\n" "#define HAVE_FPARSER_DEVEL 0" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with fparser support (release version) >>>" >&5 -printf "%s\n" "<<< Configuring library with fparser support (release version) >>>" >&6; } - ;; -esac -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen support" >&5 -printf %s "checking for dlopen support... " >&6; } -if test ${ac_cv_cxx_dlopen+y} + if test -r "$KOKKOS_CFG" then : - printf %s "(cached) " >&6 -else case e in #( - e) - ac_cv_cxx_dlopen=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -printf %s "checking for library containing dlopen... " >&6; } -if test ${ac_cv_search_dlopen+y} + if grep -F -q '#define KOKKOS_ENABLE_CUDA' "$KOKKOS_CFG" then : - printf %s "(cached) " >&6 + KOKKOS_BACKEND=cuda else case e in #( - e) ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (void); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dl dld -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_dlopen=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_dlopen+y} -then : - break -fi -done -if test ${ac_cv_search_dlopen+y} + e) if grep -F -q '#define KOKKOS_ENABLE_HIP' "$KOKKOS_CFG" then : - + KOKKOS_BACKEND=hip else case e in #( - e) ac_cv_search_dlopen=no ;; -esac -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -printf "%s\n" "$ac_cv_search_dlopen" >&6; } -ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no + e) if grep -F -q '#define KOKKOS_ENABLE_SYCL' "$KOKKOS_CFG" then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - ac_cv_cxx_dlopen=yes + KOKKOS_BACKEND=sycl else case e in #( - e) ac_cv_cxx_dlopen=no ;; -esac -fi - - - if test "x$enableallstatic" = "xyes" -then : - ac_cv_cxx_dlopen=no -fi - - if test "x$ac_cv_cxx_dlopen" = "xyes" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the c++ compiler supports dlopen/dlsym/dlclose" >&5 -printf %s "checking whether the c++ compiler supports dlopen/dlsym/dlclose... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include // NULL - #include - -int -main (void) -{ - - // Try all possible ways of naming libraries. dlopen() will search - // in system-dependent paths if these names do not contain forward - // slashes. - const unsigned n_names = 2; - const char * lib_namesn_names = {"libm.so", "libm.dylib"}; - - // To catch the output of dlopen - void * handle = NULL; - - for (unsigned i=0; i&5 -printf "%s\n" "yes" >&6; } - ac_cv_cxx_dlopen=yes - + KOKKOS_BACKEND=openmp else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ac_cv_cxx_dlopen=no - ;; + e) KOKKOS_BACKEND=serial ;; esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi - ;; +fi ;; esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_dlopen" >&5 -printf "%s\n" "$ac_cv_cxx_dlopen" >&6; } - - if test "x$ac_cv_cxx_dlopen" = "xyes" -then : - - -printf "%s\n" "#define HAVE_FPARSER_JIT 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with fparser JIT compilation support >>>" >&5 -printf "%s\n" "<<< Configuring library with fparser JIT compilation support >>>" >&6; } - enablefparserjit=yes - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< dlopen() not found" >&5 -printf "%s\n" "<<< dlopen() not found" >&6; } - enablefparserjit=no - ;; +fi ;; +esac +fi ;; esac -fi - - if test "x$enablefparserdebugging" = "xyes" -then : - - -printf "%s\n" "#define FPARSER_SUPPORT_DEBUGGING 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with fparser debugging functions >>>" >&5 -printf "%s\n" "<<< Configuring library with fparser debugging functions >>>" >&6; } - fi else case e in #( - e) - FPARSER_INCLUDE="" - FPARSER_LIBRARY="" - enablefparser=no - ;; + e) KOKKOS_BACKEND=serial ;; esac fi - - - - if test x$enablefparserdevel = xno; then - FPARSER_RELEASE_TRUE= - FPARSER_RELEASE_FALSE='#' -else - FPARSER_RELEASE_TRUE='#' - FPARSER_RELEASE_FALSE= -fi - - if test x$enablefparserdevel = xyes; then - FPARSER_DEVEL_TRUE= - FPARSER_DEVEL_FALSE='#' -else - FPARSER_DEVEL_TRUE='#' - FPARSER_DEVEL_FALSE= -fi - - if test x$enablefparserdebugging = xyes; then - FPARSER_SUPPORT_DEBUGGING_TRUE= - FPARSER_SUPPORT_DEBUGGING_FALSE='#' -else - FPARSER_SUPPORT_DEBUGGING_TRUE='#' - FPARSER_SUPPORT_DEBUGGING_FALSE= -fi - - if test x$enablefparserjit = xyes; then - FPARSER_SUPPORT_JIT_TRUE= - FPARSER_SUPPORT_JIT_FALSE='#' -else - FPARSER_SUPPORT_JIT_TRUE='#' - FPARSER_SUPPORT_JIT_FALSE= -fi - - if test "$GXX" = "yes" && test "x$REAL_GXX" != "x"; then - FPARSER_NO_PSABI_TRUE= - FPARSER_NO_PSABI_FALSE='#' -else - FPARSER_NO_PSABI_TRUE='#' - FPARSER_NO_PSABI_FALSE= fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Kokkos backend: $KOKKOS_BACKEND" >&5 +printf "%s\n" "Kokkos backend: $KOKKOS_BACKEND" >&6; } -if test $enablefparser = yes + case "$KOKKOS_BACKEND" in + cuda) + # Extract the first word of "nvcc", so it can be a program name with args. +set dummy nvcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_NVCC+y} then : - libmesh_contrib_INCLUDES="$FPARSER_INCLUDE $libmesh_contrib_INCLUDES" -fi + printf %s "(cached) " >&6 +else case e in #( + e) case $NVCC in + [\\/]* | ?:[\\/]*) + ac_cv_path_NVCC="$NVCC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_NVCC="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - if test x$enablefparser = xyes; then - LIBMESH_ENABLE_FPARSER_TRUE= - LIBMESH_ENABLE_FPARSER_FALSE='#' + test -z "$ac_cv_path_NVCC" && ac_cv_path_NVCC="no" + ;; +esac ;; +esac +fi +NVCC=$ac_cv_path_NVCC +if test -n "$NVCC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NVCC" >&5 +printf "%s\n" "$NVCC" >&6; } else - LIBMESH_ENABLE_FPARSER_TRUE='#' - LIBMESH_ENABLE_FPARSER_FALSE= + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -ac_config_files="$ac_config_files contrib/fparser/Makefile" - -ac_config_files="$ac_config_files contrib/fparser/extrasrc/Makefile" -# ------------------------------------------------------------- + if test "x$NVCC" = "xno" +then : + as_fn_error $? "nvcc not found but Kokkos CUDA backend requested" "$LINENO" 5 +fi + KOKKOS_CXX="$NVCC" + KOKKOS_CXXFLAGS="--forward-unknown-to-host-compiler -x cu --extended-lambda --expt-relaxed-constexpr -ccbin $CXX $KOKKOS_CXXFLAGS" + KOKKOS_LDFLAGS="--forward-unknown-to-host-compiler $KOKKOS_LDFLAGS" + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Parsing Kokkos defined architectures" >&5 +printf "%s\n" "$as_me: Parsing Kokkos defined architectures" >&6;} + ax_kokkos_arch_lines=`$GREP '^[[:space:]]*#define[[:space:]]\{1,\}KOKKOS_ARCH_[A-Za-z0-9_][A-Za-z0-9_]*' "$KOKKOS_CFG" \ + | $SED -n 's/.*KOKKOS_ARCH_\([A-Za-z0-9_][A-Za-z0-9_]*\).*/\1/p'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_kokkos_arch_lines" >&5 +printf "%s\n" "$ax_kokkos_arch_lines" >&6; } + + ax_cuda_sms= + for t in $ax_kokkos_arch_lines; do + case "$t" in + KEPLER30|KEPLER) ax_cuda_sms="$ax_cuda_sms 30" ;; + KEPLER32) ax_cuda_sms="$ax_cuda_sms 32" ;; + KEPLER35) ax_cuda_sms="$ax_cuda_sms 35" ;; + KEPLER37) ax_cuda_sms="$ax_cuda_sms 37" ;; + MAXWELL|MAXWELL50) ax_cuda_sms="$ax_cuda_sms 50" ;; + MAXWELL52) ax_cuda_sms="$ax_cuda_sms 52" ;; + MAXWELL53) ax_cuda_sms="$ax_cuda_sms 53" ;; + PASCAL|PASCAL60) ax_cuda_sms="$ax_cuda_sms 60" ;; + PASCAL61) ax_cuda_sms="$ax_cuda_sms 61" ;; + VOLTA|VOLTA70) ax_cuda_sms="$ax_cuda_sms 70" ;; + VOLTA72) ax_cuda_sms="$ax_cuda_sms 72" ;; + TURING75) ax_cuda_sms="$ax_cuda_sms 75" ;; + AMPERE|AMPERE80) ax_cuda_sms="$ax_cuda_sms 80" ;; + AMPERE86) ax_cuda_sms="$ax_cuda_sms 86" ;; + ADA89) ax_cuda_sms="$ax_cuda_sms 89" ;; + HOPPER|HOPPER90) ax_cuda_sms="$ax_cuda_sms 90" ;; + BLACKWELL|BLACKWELL100) ax_cuda_sms="$ax_cuda_sms 100" ;; + AMD_GFX*) ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Unknown Kokkos Arch: $t" >&5 +printf "%s\n" "$as_me: WARNING: Unknown Kokkos Arch: $t" >&2;};; + esac + done + ax_cuda_sms=`printf "%s\n" $ax_cuda_sms | awk '!seenACSM_CONFIGURE_KOKKOS++'` + if test "x$ax_cuda_sms" != x; then + for sm in $ax_cuda_sms; do + KOKKOS_CXXFLAGS="-gencode=arch=compute_${sm},code=sm_${sm} $KOKKOS_CXXFLAGS" + done + fi -# ------------------------------------------------------------- -# cppunit C++ unit testing -- enabled by default -# ------------------------------------------------------------- -# Check whether --enable-cppunit was given. -if test ${enable_cppunit+y} + ;; + hip) + # Extract the first word of "hipcc", so it can be a program name with args. +set dummy hipcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_HIPCC+y} then : - enableval=$enable_cppunit; case "${enableval}" in #( - yes) : - enablecppunit=yes ;; #( - no) : - enablecppunit=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-cppunit" "$LINENO" 5 ;; -esac + printf %s "(cached) " >&6 else case e in #( - e) enablecppunit=yes ;; + e) case $HIPCC in + [\\/]* | ?:[\\/]*) + ac_cv_path_HIPCC="$HIPCC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_HIPCC="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_HIPCC" && ac_cv_path_HIPCC="no" + ;; +esac ;; esac +fi +HIPCC=$ac_cv_path_HIPCC +if test -n "$HIPCC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HIPCC" >&5 +printf "%s\n" "$HIPCC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -if test "$enablecppunit" = yes -then : - - CPPUNIT_CFLAGS= - CPPUNIT_LIBS=-lcppunit - # Extract the first word of "cppunit-config", so it can be a program name with args. -set dummy cppunit-config; ac_word=$2 + if test "x$HIPCC" = "xno" +then : + as_fn_error $? "hipcc not found but Kokkos HIP backend requested" "$LINENO" 5 +fi + KOKKOS_CXX="$HIPCC" + ;; + sycl) + # Extract the first word of "icpx", so it can be a program name with args. +set dummy icpx; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CPPUNIT_CONFIG+y} +if test ${ac_cv_path_ICPX+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$CPPUNIT_CONFIG"; then - ac_cv_prog_CPPUNIT_CONFIG="$CPPUNIT_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + e) case $ICPX in + [\\/]* | ?:[\\/]*) + ac_cv_path_ICPX="$ICPX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -72663,7 +73759,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CPPUNIT_CONFIG="cppunit-config" + ac_cv_path_ICPX="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -72671,297 +73767,190 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_CPPUNIT_CONFIG" && ac_cv_prog_CPPUNIT_CONFIG="none" -fi ;; + test -z "$ac_cv_path_ICPX" && ac_cv_path_ICPX="no" + ;; +esac ;; esac fi -CPPUNIT_CONFIG=$ac_cv_prog_CPPUNIT_CONFIG -if test -n "$CPPUNIT_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPPUNIT_CONFIG" >&5 -printf "%s\n" "$CPPUNIT_CONFIG" >&6; } +ICPX=$ac_cv_path_ICPX +if test -n "$ICPX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ICPX" >&5 +printf "%s\n" "$ICPX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test "x$CPPUNIT_CONFIG" = "xcppunit-config" + if test "x$ICPX" = "xno" then : - - CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` - CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` - + as_fn_error $? "icpx not found but Kokkos SYCL backend requested" "$LINENO" 5 fi + KOKKOS_CXX="$ICPX" + KOKKOS_CXXFLAGS="-fsycl" + KOKKOS_LDFLAGS="-fsycl $KOKKOS_LDFLAGS" + ;; + openmp) + KOKKOS_CXX="${CXX}" + KOKKOS_CXXFLAGS="-x c++ $KOKKOS_CXXFLAGS" + ;; + serial|*) + KOKKOS_CXX="${CXX}" + KOKKOS_CXXFLAGS="-x c++" + ;; + esac - -# Check whether --with-cppunit-include was given. -if test ${with_cppunit_include+y} -then : - withval=$with_cppunit_include; CPPUNIT_CFLAGS="-I$withval" +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using caller-provided KOKKOS_CXX=$KOKKOS_CXX" >&5 +printf "%s\n" "Using caller-provided KOKKOS_CXX=$KOKKOS_CXX" >&6; } ;; +esac fi - - -# Check whether --with-cppunit-lib was given. -if test ${with_cppunit_lib+y} + if test "x$have_kokkos_openmp" = "xyes" then : - withval=$with_cppunit_lib; CPPUNIT_LIBS="-L$withval -lcppunit" -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Kokkos compiler supports -fopenmp" >&5 +printf %s "checking whether the Kokkos compiler supports -fopenmp... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can build a trivial CppUnit program" >&5 -printf %s "checking whether we can build a trivial CppUnit program... " >&6; } - ac_ext=cpp + acsm_save_CXX="$CXX" + acsm_save_CXXFLAGS="$CXXFLAGS" + + CXX="$KOKKOS_CXX" + CXXFLAGS="$CXXFLAGS $KOKKOS_CXXFLAGS -fopenmp" + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - saveCXXFLAGS="$CXXFLAGS" - CXXFLAGS="$saveCXXFLAGS $CPPUNIT_CFLAGS" - saveLIBS="$LIBS" - LIBS="$CPPUNIT_LIBS $saveLIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +int +main (void) +{ - #include - int main(int argc, char **argv) - { - CppUnit::TextUi::TestRunner runner; - - if (runner.run()) - return 0; - - return 1; - } + std::vector v; + v.push_back(1); + ; + return 0; +} _ACEOF -if ac_fn_cxx_try_link "$LINENO" +if ac_fn_cxx_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + KOKKOS_CXXFLAGS="$KOKKOS_CXXFLAGS -fopenmp" + KOKKOS_LDFLAGS="$KOKKOS_LDFLAGS -fopenmp" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - CPPUNIT_CFLAGS= - CPPUNIT_LIBS= - enablecppunit=no - ;; + ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - - ac_ext=c +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CXXFLAGS="$acsm_save_CXXFLAGS" + CXX="$acsm_save_CXX" + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - LIBS="$saveLIBS" - CXXFLAGS="$saveCXXFLAGS" - - - - -fi - - if test x$enablecppunit = xyes; then - LIBMESH_ENABLE_CPPUNIT_TRUE= - LIBMESH_ENABLE_CPPUNIT_FALSE='#' -else - LIBMESH_ENABLE_CPPUNIT_TRUE='#' - LIBMESH_ENABLE_CPPUNIT_FALSE= -fi - -# ------------------------------------------------------------- - - - -# ------------------------------------------------------------- -# nanoflann -- enabled by default -# ------------------------------------------------------------- - - # Check whether --enable-nanoflann was given. -if test ${enable_nanoflann+y} -then : - enableval=$enable_nanoflann; case "${enableval}" in #( - yes) : - enablenanoflann=yes ;; #( - no) : - enablenanoflann=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-nanoflann" "$LINENO" 5 ;; -esac -else case e in #( - e) enablenanoflann=$enableoptional ;; -esac -fi - - # Check whether --enable-nanoflann-pointlocator was given. -if test ${enable_nanoflann_pointlocator+y} -then : - enableval=$enable_nanoflann_pointlocator; case "${enableval}" in #( - yes) : - enablenanoflannpointlocator=yes ;; #( - no) : - enablenanoflannpointlocator=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-nanoflann-pointlocator" "$LINENO" 5 ;; -esac -else case e in #( - e) enablenanoflannpointlocator=no ;; -esac fi - - if test "x$enablenanoflann" = "xyes" + KOKKOS_MPI_CPPFLAGS="" + KOKKOS_MPI_LDFLAGS="" + if test "x$enablempi" = "xyes" && test "x$KOKKOS_CXX" != "x$CXX" then : - NANOFLANN_INCLUDE="-I\$(top_srcdir)/contrib/nanoflann/nanoflann/include" - -printf "%s\n" "#define HAVE_NANOFLANN 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI compile flags to use with KOKKOS_CXX" >&5 +printf %s "checking for MPI compile flags to use with KOKKOS_CXX... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with nanoflann KDtree support >>>" >&5 -printf "%s\n" "<<< Configuring library with nanoflann KDtree support >>>" >&6; } + KOKKOS_MPI_CPPFLAGS=`$CXX -showme:compile 2>/dev/null` + KOKKOS_MPI_LDFLAGS=`$CXX -showme:link 2>/dev/null` - if test "x$enablenanoflannpointlocator" = "xyes" + if test "x$KOKKOS_MPI_CPPFLAGS" = "x" then : + KOKKOS_MPI_CPPFLAGS=`$CXX -cxx='' -compile_info 2>/dev/null` + KOKKOS_MPI_LDFLAGS=`$CXX -cxx='' -link_info 2>/dev/null` - -printf "%s\n" "#define ENABLE_NANOFLANN_POINTLOCATOR 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nanoflann-based PointLocator >>>" >&5 -printf "%s\n" "<<< Configuring library with Nanoflann-based PointLocator >>>" >&6; } - -fi - -else case e in #( - e) - NANOFLANN_INCLUDE="" - enablenanoflann=no - ;; -esac fi - - -if test $enablenanoflann = yes + if test "x$KOKKOS_MPI_CPPFLAGS" = "x" then : - libmesh_contrib_INCLUDES="$NANOFLANN_INCLUDE $libmesh_contrib_INCLUDES" -fi + KOKKOS_MPI_CPPFLAGS=`$CXX -show -c test.c 2>/dev/null | sed 's/^^ * //'` + KOKKOS_MPI_LDFLAGS=`$CXX -show -o a.out test.o 2>/dev/null | sed 's/^^ * //'` - if test x$enablenanoflann = xyes; then - LIBMESH_ENABLE_NANOFLANN_TRUE= - LIBMESH_ENABLE_NANOFLANN_FALSE='#' -else - LIBMESH_ENABLE_NANOFLANN_TRUE='#' - LIBMESH_ENABLE_NANOFLANN_FALSE= fi -ac_config_files="$ac_config_files contrib/nanoflann/Makefile" - -# ------------------------------------------------------------- - - -# ------------------------------------------------------------- -# MetaPhysicL -- enabled by default -# ------------------------------------------------------------- + STRIPPED_FLAGS="" + for flag in $KOKKOS_MPI_CPPFLAGS; do + case "$flag" in + -O*) # Skip possibly-undesired optimization level + ;; + -std=*) # Skip possibly-incompatible standard + ;; + *) # Append everything else + STRIPPED_FLAGS="$STRIPPED_FLAGS $flag" + ;; + esac + done + KOKKOS_MPI_CPPFLAGS=$STRIPPED_FLAGS - # Check whether --enable-metaphysicl was given. -if test ${enable_metaphysicl+y} + if test "x$KOKKOS_MPI_CPPFLAGS" = "x" then : - enableval=$enable_metaphysicl; case "${enableval}" in #( - yes) : - enablemetaphysicl=yes ;; #( - no) : - enablemetaphysicl=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-metaphysicl" "$LINENO" 5 ;; -esac -else case e in #( - e) enablemetaphysicl=$enablenested ;; -esac + KOKKOS_MPI_CPPFLAGS="$MPI_INCLUDES" fi - - -# Check whether --with-metaphysicl was given. -if test ${with_metaphysicl+y} + if test "x$KOKKOS_MPI_LDFLAGS" = "x" then : - withval=$with_metaphysicl; case "${withval}" in #( - internal) : - build_metaphysicl=yes ;; #( - yes) : - build_metaphysicl=yes ;; #( - *) : - METAPHYSICL_DIR="${withval}" - build_metaphysicl=no ;; -esac - enablemetaphysicl=yes -else case e in #( - e) build_metaphysicl=yes ;; -esac + KOKKOS_MPI_LDFLAGS="$MPI_LDFLAGS" fi - - -# Check whether --with-metaphysicl-include was given. -if test ${with_metaphysicl_include+y} -then : - withval=$with_metaphysicl_include; METAPHYSICL_INCLUDE="-I${withval}" - METAPHYSICL_INC="-I${withval}" - enablemetaphysicl=yes - build_metaphysicl=no -else case e in #( - e) if test "x$build_metaphysicl" = "xyes" + if test "x$KOKKOS_MPI_CPPFLAGS" = "x" then : - METAPHYSICL_INCLUDE="-I\$(top_srcdir)/contrib/metaphysicl/src/numerics/include -I\$(top_srcdir)/contrib/metaphysicl/src/core/include -I\$(top_srcdir)/contrib/metaphysicl/src/utilities/include -I\$(top_builddir)/contrib/metaphysicl/src/utilities/include" - METAPHYSICL_INC="-I$top_srcdir/contrib/metaphysicl/src/numerics/include -I$top_srcdir/contrib/metaphysicl/src/core/include -I$top_srcdir/contrib/metaphysicl/src/utilities/include -I$top_builddir/contrib/metaphysicl/src/utilities/include" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none found" >&5 +printf "%s\n" "none found" >&6; } else case e in #( - e) METAPHYSICL_INCLUDE="-I$METAPHYSICL_DIR/include" - METAPHYSICL_INC="-I$METAPHYSICL_DIR/include" ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $KOKKOS_MPI_CPPFLAGS" >&5 +printf "%s\n" "$KOKKOS_MPI_CPPFLAGS" >&6; } ;; esac fi - ;; -esac -fi - - - # Check whether --enable-metaphysicl-required was given. -if test ${enable_metaphysicl_required+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI link flags to use with KOKKOS_CXX" >&5 +printf %s "checking for MPI link flags to use with KOKKOS_CXX... " >&6; } + if test "x$KOKKOS_MPI_LDFLAGS" = "x" then : - enableval=$enable_metaphysicl_required; case "${enableval}" in #( - yes) : - metaphysiclrequired=yes ;; #( - no) : - metaphysiclrequired=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-metaphysicl-required" "$LINENO" 5 ;; -esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +printf "%s\n" "not found" >&6; } else case e in #( - e) metaphysiclrequired=no ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $KOKKOS_MPI_LDFLAGS" >&5 +printf "%s\n" "$KOKKOS_MPI_LDFLAGS" >&6; } ;; esac fi - - if test "x$enablemetaphysicl" = "xno" && test "x$metaphysiclrequired" = "xyes" -then : - enablemetaphysicl=yes fi - if test "x$enablemetaphysicl" = "xyes" -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Kokkos compiler configuration works" >&5 +printf %s "checking whether the Kokkos compiler configuration works... " >&6; } + acsm_save_CXX="$CXX" + acsm_save_CPPFLAGS="$CPPFLAGS" + acsm_save_CXXFLAGS="$CXXFLAGS" + acsm_save_LDFLAGS="$LDFLAGS" + acsm_save_LIBS="$LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MetaPhysicL NumberArray support" >&5 -printf %s "checking for MetaPhysicL NumberArray support... " >&6; } + CXX="$KOKKOS_CXX" + CPPFLAGS="$CPPFLAGS $KOKKOS_CPPFLAGS $KOKKOS_MPI_CPPFLAGS" + CXXFLAGS="$CXXFLAGS $KOKKOS_CXXFLAGS" + LDFLAGS="$LDFLAGS $KOKKOS_LDFLAGS $KOKKOS_MPI_LDFLAGS" + LIBS="$LIBS $KOKKOS_LIBS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -72969,51 +73958,62 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $METAPHYSICL_INC" + if test "x$enablempi" = "xyes" +then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + LDFLAGS="$LDFLAGS $MPI_LDFLAGS" + LIBS="$LIBS $MPI_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include "metaphysicl/raw_type.h" - -int -main (void) -{ - - MetaPhysicL::RawType x; + #include + #include + int main(int argc, char ** argv) + { + MPI_Init(&argc, &argv); + Kokkos::initialize(argc, argv); + Kokkos::finalize(); + MPI_Finalize(); + return 0; + } - ; - return 0; -} _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_cxx_try_link "$LINENO" then : - - enablemetaphysicl=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + kokkos_config_works=yes +else case e in #( + e) kokkos_config_works=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext else case e in #( e) - enablemetaphysicl=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - if test "x$build_metaphysicl" = "xyes" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main(int argc, char ** argv) + { + Kokkos::initialize(argc, argv); + Kokkos::finalize(); + return 0; + } + +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Metaphysicl not found, you may need to run 'git submodule update --init' first <<<" >&5 -printf "%s\n" ">>> Metaphysicl not found, you may need to run 'git submodule update --init' first <<<" >&6; } + kokkos_config_works=yes else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Metaphysicl not found in specified location <<<" >&5 -printf "%s\n" ">>> Metaphysicl not found in specified location <<<" >&6; } ;; + e) kokkos_config_works=no ;; esac fi - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - CXXFLAGS="$old_CXXFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -73021,211 +74021,96 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi + CXX="$acsm_save_CXX" + CPPFLAGS="$acsm_save_CPPFLAGS" + CXXFLAGS="$acsm_save_CXXFLAGS" + LDFLAGS="$acsm_save_LDFLAGS" + LIBS="$acsm_save_LIBS" - if test "x$enablemetaphysicl" = "xno" && test "x$metaphysiclrequired" = "xyes" + if test "x$kokkos_config_works" = "xyes" then : - as_fn_error 5 "*** MetaPhysicL was not found, but --enable-metaphysicl-required was specified." "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + as_fn_error $? "Kokkos compiler/flags failed to compile and link a minimal test program" "$LINENO" 5 ;; +esac fi - if test "x$enablemetaphysicl" = "xyes" -then : - - -printf "%s\n" "#define HAVE_METAPHYSICL 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with MetaPhysicL support >>>" >&5 -printf "%s\n" "<<< Configuring library with MetaPhysicL support >>>" >&6; } - - my_method=dbg - if test "x$build_devel" = xyes -then : - my_method=devel -fi - if test "x$build_prof" = xyes -then : - my_method=prof -fi - if test "x$build_oprof" = xyes -then : - my_method=oprof -fi - if test "x$build_opt" = xyes -then : - my_method=opt -fi - my_top_srcdir="$(cd $srcdir && pwd)" +printf "%s\n" "#define HAVE_KOKKOS 1" >>confdefs.h - if test "x$build_metaphysicl" = "xyes" -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Kokkos support >>>" >&5 +printf "%s\n" "<<< Configuring library with Kokkos support >>>" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with built-in MetaPhysicL support >>>" >&5 -printf "%s\n" "<<< Configuring library with built-in MetaPhysicL support >>>" >&6; } - if test "x$prefix" = "xNONE" -then : - future_timpi_prefix=$ac_abs_top_builddir/contrib/timpi/src/ else case e in #( - e) future_timpi_prefix=$prefix ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Kokkos not found at $KOKKOS_INCLUDE_DIR -- disabling Kokkos FE support" >&5 +printf "%s\n" "$as_me: WARNING: Kokkos not found at $KOKKOS_INCLUDE_DIR -- disabling Kokkos FE support" >&2;} + enablekokkos=no + ;; esac fi - # Various preliminary checks. - - - - - - ax_dir="contrib/metaphysicl" - - # Do not complain, so a configure script can configure whichever parts of a - # large source tree are present. - if test -d "$srcdir/$ax_dir"; then - ac_builddir=. - -case "$ax_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ax_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: <<< Configuring library without Kokkos support >>>" >&5 +printf "%s\n" "$as_me: <<< Configuring library without Kokkos support >>>" >&6;} + enablekokkos=no ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. - ax_args= - ax_prev= - eval "set x $ac_configure_args" - shift - for ax_arg; do - if test -n "$ax_prev"; then - ax_prev= - continue - fi - case $ax_arg in - -cache-file | --cache-file | --cache-fil | --cache-fi | --cache-f \ - | --cache- | --cache | --cach | --cac | --ca | --c) - ax_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ - | --c=*) - ;; - --config-cache | -C) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ax_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ax_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* \ - | --p=*) - ;; - --disable-option-checking) - ;; - *) case $ax_arg in - *\'*) ax_arg=$(printf "%s\n" "$ax_arg" | sed "s/'/'\\\\\\\\''/g");; - esac - as_fn_append ax_args " '$ax_arg'" ;; - esac - done - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ax_args="--disable-option-checking $ax_args" - # Options that must be added as they are provided. - as_fn_append ax_args " '--with-cxx-std=20$acsm_cxx_version'" - as_fn_append ax_args " 'CPPFLAGS=-I$my_top_srcdir/contrib/timpi/src/algorithms/include/ -I$my_top_srcdir/contrib/timpi/src/parallel/include/ -I$my_top_srcdir/contrib/timpi/src/utilities/include/ -I$ac_abs_top_builddir/contrib/timpi/src/utilities/include/ $CPPFLAGS'" - as_fn_append ax_args " 'LDFLAGS=-L$ac_abs_top_builddir/contrib/timpi/src/ $LDFLAGS'" - as_fn_append ax_args " '--with-future-timpi-dir=$future_timpi_prefix'" - as_fn_append ax_args " '--with-timpi-method=$my_method'" - - # New options that may need to be merged with existing options. +fi - # New options that must replace existing options. + if test "$enablekokkos" = "no" && test "$kokkosrequired" = "yes" +then : + as_fn_error 4 "*** Kokkos was not found, but --enable-kokkos-required was specified." "$LINENO" 5 +fi - # Options that must be removed. - as_fn_append ax_args " '--srcdir=$ac_srcdir'" - # Add the subdirectory to the list of target subdirectories. - ax_subconfigures="$ax_subconfigures $ax_dir" - # Save the argument list for this subdirectory. - ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_") - eval "ax_sub_configure_args_$ax_var=\"$ax_args\"" - eval "ax_sub_configure_$ax_var=\"yes\"" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find source tree for $ax_dir" >&5 -printf "%s\n" "$as_me: WARNING: could not find source tree for $ax_dir" >&2;} - fi -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with external MetaPhysicL support >>>" >&5 -printf "%s\n" "<<< Configuring library with external MetaPhysicL support >>>" >&6; } ;; -esac -fi -else case e in #( - e) - METAPHYSICL_INCLUDE="" - ;; -esac -fi - if test x$build_metaphysicl = xyes; then - BUILD_METAPHYSICL_TRUE= - BUILD_METAPHYSICL_FALSE='#' + if test x$enablekokkos = xyes; then + ACSM_ENABLE_KOKKOS_TRUE= + ACSM_ENABLE_KOKKOS_FALSE='#' else - BUILD_METAPHYSICL_TRUE='#' - BUILD_METAPHYSICL_FALSE= + ACSM_ENABLE_KOKKOS_TRUE='#' + ACSM_ENABLE_KOKKOS_FALSE= fi - -if test $enablemetaphysicl = yes +if test "x$enablekokkos" != "xno" then : - libmesh_contrib_INCLUDES="$METAPHYSICL_INCLUDE $libmesh_contrib_INCLUDES" -fi - if test x$enablemetaphysicl = xyes; then - LIBMESH_ENABLE_METAPHYSICL_TRUE= - LIBMESH_ENABLE_METAPHYSICL_FALSE='#' + libmesh_optional_LIBS="$KOKKOS_LDFLAGS $KOKKOS_LIBS $libmesh_optional_LIBS" + +fi + if test x$enablekokkos = xyes; then + LIBMESH_ENABLE_KOKKOS_TRUE= + LIBMESH_ENABLE_KOKKOS_FALSE='#' else - LIBMESH_ENABLE_METAPHYSICL_TRUE='#' - LIBMESH_ENABLE_METAPHYSICL_FALSE= + LIBMESH_ENABLE_KOKKOS_TRUE='#' + LIBMESH_ENABLE_KOKKOS_FALSE= fi # ------------------------------------------------------------- +# ------------------------------------------------------------- +# With either CppUnit or Kokkos we'll have tests to run +# ------------------------------------------------------------- + if test x$enablekokkos = xyes -o x$enablecppunit = xyes; then + LIBMESH_ENABLE_TESTS_DIR_TRUE= + LIBMESH_ENABLE_TESTS_DIR_FALSE='#' +else + LIBMESH_ENABLE_TESTS_DIR_TRUE='#' + LIBMESH_ENABLE_TESTS_DIR_FALSE= +fi @@ -74674,6 +75559,18 @@ if test -z "${LIBMESH_ENABLE_METAPHYSICL_TRUE}" && test -z "${LIBMESH_ENABLE_MET as_fn_error $? "conditional \"LIBMESH_ENABLE_METAPHYSICL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ACSM_ENABLE_KOKKOS_TRUE}" && test -z "${ACSM_ENABLE_KOKKOS_FALSE}"; then + as_fn_error $? "conditional \"ACSM_ENABLE_KOKKOS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LIBMESH_ENABLE_KOKKOS_TRUE}" && test -z "${LIBMESH_ENABLE_KOKKOS_FALSE}"; then + as_fn_error $? "conditional \"LIBMESH_ENABLE_KOKKOS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LIBMESH_ENABLE_TESTS_DIR_TRUE}" && test -z "${LIBMESH_ENABLE_TESTS_DIR_FALSE}"; then + as_fn_error $? "conditional \"LIBMESH_ENABLE_TESTS_DIR\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GIT_CHECKOUT_TRUE}" && test -z "${GIT_CHECKOUT_FALSE}"; then as_fn_error $? "conditional \"GIT_CHECKOUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -77939,6 +78836,11 @@ fi printf "%s\n" " gmv.............................. : $enablegmv" printf "%s\n" " gzstream......................... : $enablegz" printf "%s\n" " hdf5............................. : $enablehdf5" + printf "%s\n" " kokkos........................... : $enablekokkos" + if test "x$enablekokkos" = "xyes" +then : + printf "%s\n" " kokkos backend................ : $KOKKOS_BACKEND" +fi printf "%s\n" " laspack.......................... : $enablelaspack" printf "%s\n" " libhilbert....................... : $enablelibhilbert" printf "%s\n" " metaphysicl...................... : $enablemetaphysicl" diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 2f811f8273..f07c73023b 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -254,6 +254,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -602,11 +603,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -654,6 +666,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/capnproto/Makefile.in b/contrib/capnproto/Makefile.in index 39dd5dc7fb..f31aa9aed9 100644 --- a/contrib/capnproto/Makefile.in +++ b/contrib/capnproto/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -456,11 +457,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -508,6 +520,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/eigen/gitshim/Makefile.in b/contrib/eigen/gitshim/Makefile.in index caa8d46661..c33a985fef 100644 --- a/contrib/eigen/gitshim/Makefile.in +++ b/contrib/eigen/gitshim/Makefile.in @@ -103,6 +103,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -340,11 +341,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -392,6 +404,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/5.22b/exodus/Makefile.in b/contrib/exodusii/5.22b/exodus/Makefile.in index 376c964d0c..7a5d3e205c 100644 --- a/contrib/exodusii/5.22b/exodus/Makefile.in +++ b/contrib/exodusii/5.22b/exodus/Makefile.in @@ -115,6 +115,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -3323,11 +3324,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -3375,6 +3387,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/5.22b/nemesis/Makefile.in b/contrib/exodusii/5.22b/nemesis/Makefile.in index e0d9c332fd..6d76114477 100644 --- a/contrib/exodusii/5.22b/nemesis/Makefile.in +++ b/contrib/exodusii/5.22b/nemesis/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -402,11 +403,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -454,6 +466,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/Lib/Makefile.in b/contrib/exodusii/Lib/Makefile.in index 6bbe85fc74..de179a5dd1 100644 --- a/contrib/exodusii/Lib/Makefile.in +++ b/contrib/exodusii/Lib/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -1958,11 +1959,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -2010,6 +2022,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/v8.11/exodus/Makefile.in b/contrib/exodusii/v8.11/exodus/Makefile.in index 38129ca303..ea5d055ef1 100644 --- a/contrib/exodusii/v8.11/exodus/Makefile.in +++ b/contrib/exodusii/v8.11/exodus/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -4251,11 +4252,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -4303,6 +4315,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/v8.11/nemesis/Makefile.in b/contrib/exodusii/v8.11/nemesis/Makefile.in index 3a3667d137..20df6b8827 100644 --- a/contrib/exodusii/v8.11/nemesis/Makefile.in +++ b/contrib/exodusii/v8.11/nemesis/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -412,11 +413,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -464,6 +476,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/fparser/Makefile.in b/contrib/fparser/Makefile.in index 1f10a68c69..3cfc1cf065 100644 --- a/contrib/fparser/Makefile.in +++ b/contrib/fparser/Makefile.in @@ -122,6 +122,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -870,11 +871,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -922,6 +934,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/fparser/extrasrc/Makefile.in b/contrib/fparser/extrasrc/Makefile.in index d8d34e3a8d..147e5ad272 100644 --- a/contrib/fparser/extrasrc/Makefile.in +++ b/contrib/fparser/extrasrc/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -342,11 +343,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -394,6 +406,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/gmv/Makefile.in b/contrib/gmv/Makefile.in index b38e7ab1b8..bea16a257e 100644 --- a/contrib/gmv/Makefile.in +++ b/contrib/gmv/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -397,11 +398,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -449,6 +461,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/gzstream/Makefile.in b/contrib/gzstream/Makefile.in index 34096b9aef..48c1e0e3d9 100644 --- a/contrib/gzstream/Makefile.in +++ b/contrib/gzstream/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -449,11 +450,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -501,6 +513,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/laspack/Makefile.in b/contrib/laspack/Makefile.in index 9e185c7ae7..8e3b4b6b85 100644 --- a/contrib/laspack/Makefile.in +++ b/contrib/laspack/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -507,11 +508,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -559,6 +571,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/libHilbert/Makefile.in b/contrib/libHilbert/Makefile.in index 435542122d..fb64a0b90b 100644 --- a/contrib/libHilbert/Makefile.in +++ b/contrib/libHilbert/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -480,11 +481,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -532,6 +544,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/metis/Makefile.in b/contrib/metis/Makefile.in index 1aca1cc820..bd6664447c 100644 --- a/contrib/metis/Makefile.in +++ b/contrib/metis/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -1024,11 +1025,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -1076,6 +1088,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/nanoflann/Makefile.in b/contrib/nanoflann/Makefile.in index 3974f8146d..44428d80a6 100644 --- a/contrib/nanoflann/Makefile.in +++ b/contrib/nanoflann/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -446,11 +447,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -498,6 +510,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/nemesis/Lib/Makefile.in b/contrib/nemesis/Lib/Makefile.in index af341f139d..4c64227cb9 100644 --- a/contrib/nemesis/Lib/Makefile.in +++ b/contrib/nemesis/Lib/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -792,11 +793,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -844,6 +856,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/netgen/Makefile.in b/contrib/netgen/Makefile.in index 8494722b92..ba4a50fde7 100644 --- a/contrib/netgen/Makefile.in +++ b/contrib/netgen/Makefile.in @@ -101,6 +101,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -344,11 +345,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -396,6 +408,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/parmetis/Makefile.in b/contrib/parmetis/Makefile.in index 05ab3a52a3..640e955b3f 100644 --- a/contrib/parmetis/Makefile.in +++ b/contrib/parmetis/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -858,11 +859,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -910,6 +922,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/poly2tri/modified/Makefile.in b/contrib/poly2tri/modified/Makefile.in index be9241d271..f2d6713fba 100644 --- a/contrib/poly2tri/modified/Makefile.in +++ b/contrib/poly2tri/modified/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -544,11 +545,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -596,6 +608,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/qhull/Makefile.in b/contrib/qhull/Makefile.in index 5f9ddd46cc..a01154fc06 100644 --- a/contrib/qhull/Makefile.in +++ b/contrib/qhull/Makefile.in @@ -100,6 +100,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -320,11 +321,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -372,6 +384,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/sfcurves/Makefile.in b/contrib/sfcurves/Makefile.in index cc72d40ac9..aada25a536 100644 --- a/contrib/sfcurves/Makefile.in +++ b/contrib/sfcurves/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -417,11 +418,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -469,6 +481,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/tecplot/binary/Makefile.in b/contrib/tecplot/binary/Makefile.in index 15e655eae1..dc7ef1627c 100644 --- a/contrib/tecplot/binary/Makefile.in +++ b/contrib/tecplot/binary/Makefile.in @@ -101,6 +101,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -387,11 +388,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -439,6 +451,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/tecplot/tecio/Makefile.in b/contrib/tecplot/tecio/Makefile.in index 237dc1280b..e04061efcd 100644 --- a/contrib/tecplot/tecio/Makefile.in +++ b/contrib/tecplot/tecio/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -626,11 +627,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -678,6 +690,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/tetgen/Makefile.in b/contrib/tetgen/Makefile.in index f17953d688..a6ef2d006c 100644 --- a/contrib/tetgen/Makefile.in +++ b/contrib/tetgen/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -432,11 +433,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -484,6 +496,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/triangle/Makefile.in b/contrib/triangle/Makefile.in index d47a798150..8477fec92c 100644 --- a/contrib/triangle/Makefile.in +++ b/contrib/triangle/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -427,11 +428,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -479,6 +491,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/Makefile.in b/doc/Makefile.in index 2af0fb142d..2b54065fbb 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -99,6 +99,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -350,11 +351,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -402,6 +414,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index a61d929877..33b80dff7e 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -103,6 +103,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -310,11 +311,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -362,6 +374,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/Makefile.in b/examples/Makefile.in index ee0e4e2528..0e05e40dac 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -100,6 +100,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -378,11 +379,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -430,6 +442,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex1/Makefile.in b/examples/adaptivity/adaptivity_ex1/Makefile.in index 463ee0ceeb..9a95084444 100644 --- a/examples/adaptivity/adaptivity_ex1/Makefile.in +++ b/examples/adaptivity/adaptivity_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex2/Makefile.in b/examples/adaptivity/adaptivity_ex2/Makefile.in index 90ad85f195..85b4d06b91 100644 --- a/examples/adaptivity/adaptivity_ex2/Makefile.in +++ b/examples/adaptivity/adaptivity_ex2/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -487,11 +488,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -539,6 +551,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex3/Makefile.in b/examples/adaptivity/adaptivity_ex3/Makefile.in index afac1b733d..93be5f234a 100644 --- a/examples/adaptivity/adaptivity_ex3/Makefile.in +++ b/examples/adaptivity/adaptivity_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex4/Makefile.in b/examples/adaptivity/adaptivity_ex4/Makefile.in index 832de17f26..c3f6d6804c 100644 --- a/examples/adaptivity/adaptivity_ex4/Makefile.in +++ b/examples/adaptivity/adaptivity_ex4/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex5/Makefile.in b/examples/adaptivity/adaptivity_ex5/Makefile.in index a0ff64df26..ccb107a578 100644 --- a/examples/adaptivity/adaptivity_ex5/Makefile.in +++ b/examples/adaptivity/adaptivity_ex5/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -483,11 +484,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -535,6 +547,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex1/Makefile.in b/examples/adjoints/adjoints_ex1/Makefile.in index 9fade6ac51..87a54d39da 100644 --- a/examples/adjoints/adjoints_ex1/Makefile.in +++ b/examples/adjoints/adjoints_ex1/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -562,11 +563,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -614,6 +626,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex2/Makefile.in b/examples/adjoints/adjoints_ex2/Makefile.in index 0bde4de523..ba12e1a6a1 100644 --- a/examples/adjoints/adjoints_ex2/Makefile.in +++ b/examples/adjoints/adjoints_ex2/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -530,11 +531,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -582,6 +594,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex3/Makefile.in b/examples/adjoints/adjoints_ex3/Makefile.in index 02a6126bf6..c5942ea1e0 100644 --- a/examples/adjoints/adjoints_ex3/Makefile.in +++ b/examples/adjoints/adjoints_ex3/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -565,11 +566,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -617,6 +629,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex4/Makefile.in b/examples/adjoints/adjoints_ex4/Makefile.in index d4a5810197..d14436fe8d 100644 --- a/examples/adjoints/adjoints_ex4/Makefile.in +++ b/examples/adjoints/adjoints_ex4/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -565,11 +566,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -617,6 +629,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex5/Makefile.in b/examples/adjoints/adjoints_ex5/Makefile.in index a2a14d0f89..b237fa7c11 100644 --- a/examples/adjoints/adjoints_ex5/Makefile.in +++ b/examples/adjoints/adjoints_ex5/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -565,11 +566,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -617,6 +629,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex6/Makefile.in b/examples/adjoints/adjoints_ex6/Makefile.in index 6a5ae243d1..233da86f9b 100644 --- a/examples/adjoints/adjoints_ex6/Makefile.in +++ b/examples/adjoints/adjoints_ex6/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -530,11 +531,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -582,6 +594,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex7/Makefile.in b/examples/adjoints/adjoints_ex7/Makefile.in index 822be487ed..33da02b31a 100644 --- a/examples/adjoints/adjoints_ex7/Makefile.in +++ b/examples/adjoints/adjoints_ex7/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -580,11 +581,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -632,6 +644,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/eigenproblems/eigenproblems_ex1/Makefile.in b/examples/eigenproblems/eigenproblems_ex1/Makefile.in index 1406defc5b..2862f0ba8a 100644 --- a/examples/eigenproblems/eigenproblems_ex1/Makefile.in +++ b/examples/eigenproblems/eigenproblems_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/eigenproblems/eigenproblems_ex2/Makefile.in b/examples/eigenproblems/eigenproblems_ex2/Makefile.in index c7c2ac85cf..d326ef1b1a 100644 --- a/examples/eigenproblems/eigenproblems_ex2/Makefile.in +++ b/examples/eigenproblems/eigenproblems_ex2/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/eigenproblems/eigenproblems_ex3/Makefile.in b/examples/eigenproblems/eigenproblems_ex3/Makefile.in index f13e2c3d2e..b48b91706c 100644 --- a/examples/eigenproblems/eigenproblems_ex3/Makefile.in +++ b/examples/eigenproblems/eigenproblems_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/eigenproblems/eigenproblems_ex4/Makefile.in b/examples/eigenproblems/eigenproblems_ex4/Makefile.in index 02cb83a47c..00b8f46ea6 100644 --- a/examples/eigenproblems/eigenproblems_ex4/Makefile.in +++ b/examples/eigenproblems/eigenproblems_ex4/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex1/Makefile.in b/examples/fem_system/fem_system_ex1/Makefile.in index e9c35c0d7b..c9adb2e331 100644 --- a/examples/fem_system/fem_system_ex1/Makefile.in +++ b/examples/fem_system/fem_system_ex1/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -502,11 +503,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -554,6 +566,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex2/Makefile.in b/examples/fem_system/fem_system_ex2/Makefile.in index 52edc47d8f..c0a9668ac6 100644 --- a/examples/fem_system/fem_system_ex2/Makefile.in +++ b/examples/fem_system/fem_system_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -517,11 +518,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -569,6 +581,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex3/Makefile.in b/examples/fem_system/fem_system_ex3/Makefile.in index 52493272fa..0f080de1a3 100644 --- a/examples/fem_system/fem_system_ex3/Makefile.in +++ b/examples/fem_system/fem_system_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -502,11 +503,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -554,6 +566,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex4/Makefile.in b/examples/fem_system/fem_system_ex4/Makefile.in index cb9723e037..dc7987e083 100644 --- a/examples/fem_system/fem_system_ex4/Makefile.in +++ b/examples/fem_system/fem_system_ex4/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -502,11 +503,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -554,6 +566,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex5/Makefile.in b/examples/fem_system/fem_system_ex5/Makefile.in index 6f21e1e738..8e883eaa58 100644 --- a/examples/fem_system/fem_system_ex5/Makefile.in +++ b/examples/fem_system/fem_system_ex5/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -517,11 +518,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -569,6 +581,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex1/Makefile.in b/examples/introduction/introduction_ex1/Makefile.in index 2a280924b1..ba3064f097 100644 --- a/examples/introduction/introduction_ex1/Makefile.in +++ b/examples/introduction/introduction_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex2/Makefile.in b/examples/introduction/introduction_ex2/Makefile.in index c4b1de4a38..b6a8a25554 100644 --- a/examples/introduction/introduction_ex2/Makefile.in +++ b/examples/introduction/introduction_ex2/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex3/Makefile.in b/examples/introduction/introduction_ex3/Makefile.in index 8512bcbba8..b1fd96f06c 100644 --- a/examples/introduction/introduction_ex3/Makefile.in +++ b/examples/introduction/introduction_ex3/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -483,11 +484,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -535,6 +547,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex4/Makefile.in b/examples/introduction/introduction_ex4/Makefile.in index c2e343303c..58a1eae5ac 100644 --- a/examples/introduction/introduction_ex4/Makefile.in +++ b/examples/introduction/introduction_ex4/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -483,11 +484,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -535,6 +547,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex5/Makefile.in b/examples/introduction/introduction_ex5/Makefile.in index 3223abcb2d..5b7900f5fe 100644 --- a/examples/introduction/introduction_ex5/Makefile.in +++ b/examples/introduction/introduction_ex5/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -483,11 +484,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -535,6 +547,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex1/Makefile.in b/examples/miscellaneous/miscellaneous_ex1/Makefile.in index a1bf2b097b..9cf989f9b5 100644 --- a/examples/miscellaneous/miscellaneous_ex1/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex10/Makefile.in b/examples/miscellaneous/miscellaneous_ex10/Makefile.in index 8e4d59e2fd..7744a1600c 100644 --- a/examples/miscellaneous/miscellaneous_ex10/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex10/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex11/Makefile.in b/examples/miscellaneous/miscellaneous_ex11/Makefile.in index e2309e15b9..b7f159e931 100644 --- a/examples/miscellaneous/miscellaneous_ex11/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex11/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex12/Makefile.in b/examples/miscellaneous/miscellaneous_ex12/Makefile.in index 0f88f26d37..1f7c32e692 100644 --- a/examples/miscellaneous/miscellaneous_ex12/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex12/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex13/Makefile.in b/examples/miscellaneous/miscellaneous_ex13/Makefile.in index 08010b7a5d..ac00621ba7 100644 --- a/examples/miscellaneous/miscellaneous_ex13/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex13/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex14/Makefile.in b/examples/miscellaneous/miscellaneous_ex14/Makefile.in index 579eb82449..9c9a5d26c1 100644 --- a/examples/miscellaneous/miscellaneous_ex14/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex14/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex15/Makefile.in b/examples/miscellaneous/miscellaneous_ex15/Makefile.in index 25ed74aa0d..ea85d4b0cb 100644 --- a/examples/miscellaneous/miscellaneous_ex15/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex15/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex16/Makefile.in b/examples/miscellaneous/miscellaneous_ex16/Makefile.in index a642bd7488..55fc6d21cd 100644 --- a/examples/miscellaneous/miscellaneous_ex16/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex16/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -484,11 +485,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -536,6 +548,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex17/Makefile.in b/examples/miscellaneous/miscellaneous_ex17/Makefile.in index 09346a456c..5a19a695cf 100644 --- a/examples/miscellaneous/miscellaneous_ex17/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex17/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -483,11 +484,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -535,6 +547,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex2/Makefile.in b/examples/miscellaneous/miscellaneous_ex2/Makefile.in index 48eace5b60..3b233f8c06 100644 --- a/examples/miscellaneous/miscellaneous_ex2/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex3/Makefile.in b/examples/miscellaneous/miscellaneous_ex3/Makefile.in index e77c8f12e3..f655565718 100644 --- a/examples/miscellaneous/miscellaneous_ex3/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex3/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +537,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex4/Makefile.in b/examples/miscellaneous/miscellaneous_ex4/Makefile.in index 856e8442de..4030408713 100644 --- a/examples/miscellaneous/miscellaneous_ex4/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex4/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex5/Makefile.in b/examples/miscellaneous/miscellaneous_ex5/Makefile.in index c76fa34b7b..f79f31d61f 100644 --- a/examples/miscellaneous/miscellaneous_ex5/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex5/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -482,11 +483,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -534,6 +546,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex6/Makefile.in b/examples/miscellaneous/miscellaneous_ex6/Makefile.in index fed71be123..868c30b71f 100644 --- a/examples/miscellaneous/miscellaneous_ex6/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex6/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex7/Makefile.in b/examples/miscellaneous/miscellaneous_ex7/Makefile.in index bee1314c82..92bf9e526c 100644 --- a/examples/miscellaneous/miscellaneous_ex7/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex7/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -511,11 +512,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -563,6 +575,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex8/Makefile.in b/examples/miscellaneous/miscellaneous_ex8/Makefile.in index deee6b0519..33cdacfbd8 100644 --- a/examples/miscellaneous/miscellaneous_ex8/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex8/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex9/Makefile.in b/examples/miscellaneous/miscellaneous_ex9/Makefile.in index e3380d2909..d83e9bfd6d 100644 --- a/examples/miscellaneous/miscellaneous_ex9/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex9/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -508,11 +509,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -560,6 +572,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/optimization/optimization_ex1/Makefile.in b/examples/optimization/optimization_ex1/Makefile.in index bc4c257f3f..1e9212a0c8 100644 --- a/examples/optimization/optimization_ex1/Makefile.in +++ b/examples/optimization/optimization_ex1/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/optimization/optimization_ex2/Makefile.in b/examples/optimization/optimization_ex2/Makefile.in index 30d2c09dd6..a95489d476 100644 --- a/examples/optimization/optimization_ex2/Makefile.in +++ b/examples/optimization/optimization_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex1/Makefile.in b/examples/reduced_basis/reduced_basis_ex1/Makefile.in index c2b66c1b1b..f5a2e70bd9 100644 --- a/examples/reduced_basis/reduced_basis_ex1/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex1/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -492,11 +493,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -544,6 +556,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex2/Makefile.in b/examples/reduced_basis/reduced_basis_ex2/Makefile.in index 57b316a11b..e3d246610b 100644 --- a/examples/reduced_basis/reduced_basis_ex2/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -492,11 +493,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -544,6 +556,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex3/Makefile.in b/examples/reduced_basis/reduced_basis_ex3/Makefile.in index f583d2dde8..ffd939f3ab 100644 --- a/examples/reduced_basis/reduced_basis_ex3/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -492,11 +493,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -544,6 +556,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex4/Makefile.in b/examples/reduced_basis/reduced_basis_ex4/Makefile.in index 416d02b0df..e7f4801d67 100644 --- a/examples/reduced_basis/reduced_basis_ex4/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex4/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -497,11 +498,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -549,6 +561,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex5/Makefile.in b/examples/reduced_basis/reduced_basis_ex5/Makefile.in index 1dc920ab1e..e609848007 100644 --- a/examples/reduced_basis/reduced_basis_ex5/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex5/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -507,11 +508,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -559,6 +571,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex6/Makefile.in b/examples/reduced_basis/reduced_basis_ex6/Makefile.in index 658a1c7133..f24ee2eb80 100644 --- a/examples/reduced_basis/reduced_basis_ex6/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex6/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -497,11 +498,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -549,6 +561,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex7/Makefile.in b/examples/reduced_basis/reduced_basis_ex7/Makefile.in index 2eca1bb9f9..f37114989f 100644 --- a/examples/reduced_basis/reduced_basis_ex7/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex7/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -492,11 +493,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -544,6 +556,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/solution_transfer/solution_transfer_ex1/Makefile.in b/examples/solution_transfer/solution_transfer_ex1/Makefile.in index 21f43d3561..c42455335a 100644 --- a/examples/solution_transfer/solution_transfer_ex1/Makefile.in +++ b/examples/solution_transfer/solution_transfer_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +532,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/subdomains/subdomains_ex1/Makefile.in b/examples/subdomains/subdomains_ex1/Makefile.in index 26cf01b2ac..da82a0abbd 100644 --- a/examples/subdomains/subdomains_ex1/Makefile.in +++ b/examples/subdomains/subdomains_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -483,11 +484,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -535,6 +547,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/subdomains/subdomains_ex2/Makefile.in b/examples/subdomains/subdomains_ex2/Makefile.in index 574ac616f7..65c0c23eb9 100644 --- a/examples/subdomains/subdomains_ex2/Makefile.in +++ b/examples/subdomains/subdomains_ex2/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -483,11 +484,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -535,6 +547,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/subdomains/subdomains_ex3/Makefile.in b/examples/subdomains/subdomains_ex3/Makefile.in index 88e225863a..b50bbe2311 100644 --- a/examples/subdomains/subdomains_ex3/Makefile.in +++ b/examples/subdomains/subdomains_ex3/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -477,11 +478,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -529,6 +541,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in index e39e7dc5f0..33f0a9d737 100644 --- a/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -469,11 +470,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -521,6 +533,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in index 4b5498e66b..2084f67e1f 100644 --- a/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in index dc4e42bfbd..d19672b39d 100644 --- a/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -469,11 +470,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -521,6 +533,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in index 517385e1e2..b05c61a9c2 100644 --- a/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -469,11 +470,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -521,6 +533,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in index 590341c7cc..35d7b32764 100644 --- a/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -469,11 +470,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -521,6 +533,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in index 50f3f2181c..63813820d3 100644 --- a/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -469,11 +470,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -521,6 +533,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex7/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex7/Makefile.in index c6934577a9..3b6b66e5cc 100644 --- a/examples/systems_of_equations/systems_of_equations_ex7/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex7/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -475,11 +476,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -527,6 +539,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex8/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex8/Makefile.in index 2ce7a6663a..debc83bd55 100644 --- a/examples/systems_of_equations/systems_of_equations_ex8/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex8/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -513,11 +514,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -565,6 +577,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex9/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex9/Makefile.in index 7b4b6b4e46..55922f4844 100644 --- a/examples/systems_of_equations/systems_of_equations_ex9/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex9/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -475,11 +476,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -527,6 +539,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/transient/transient_ex1/Makefile.in b/examples/transient/transient_ex1/Makefile.in index 3835c13eb7..ca2d1f989b 100644 --- a/examples/transient/transient_ex1/Makefile.in +++ b/examples/transient/transient_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -483,11 +484,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -535,6 +547,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/transient/transient_ex2/Makefile.in b/examples/transient/transient_ex2/Makefile.in index 673a3f869b..9950c17bcb 100644 --- a/examples/transient/transient_ex2/Makefile.in +++ b/examples/transient/transient_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -469,11 +470,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -521,6 +533,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/transient/transient_ex3/Makefile.in b/examples/transient/transient_ex3/Makefile.in index bfafe29bdb..4464bc3f62 100644 --- a/examples/transient/transient_ex3/Makefile.in +++ b/examples/transient/transient_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -517,11 +518,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -569,6 +581,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex1/Makefile.in b/examples/vector_fe/vector_fe_ex1/Makefile.in index 021e73fa84..cca43e583c 100644 --- a/examples/vector_fe/vector_fe_ex1/Makefile.in +++ b/examples/vector_fe/vector_fe_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -481,11 +482,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -533,6 +545,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex10/Makefile.in b/examples/vector_fe/vector_fe_ex10/Makefile.in index bb392b09d0..35943c45f8 100644 --- a/examples/vector_fe/vector_fe_ex10/Makefile.in +++ b/examples/vector_fe/vector_fe_ex10/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -492,11 +493,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -544,6 +556,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex2/Makefile.in b/examples/vector_fe/vector_fe_ex2/Makefile.in index b12a411716..534c6a0f9b 100644 --- a/examples/vector_fe/vector_fe_ex2/Makefile.in +++ b/examples/vector_fe/vector_fe_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -507,11 +508,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -559,6 +571,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex3/Makefile.in b/examples/vector_fe/vector_fe_ex3/Makefile.in index 3cb1a5beb1..0903f6b1e7 100644 --- a/examples/vector_fe/vector_fe_ex3/Makefile.in +++ b/examples/vector_fe/vector_fe_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -507,11 +508,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -559,6 +571,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex4/Makefile.in b/examples/vector_fe/vector_fe_ex4/Makefile.in index ecdf5572ed..847f2e03f0 100644 --- a/examples/vector_fe/vector_fe_ex4/Makefile.in +++ b/examples/vector_fe/vector_fe_ex4/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -507,11 +508,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -559,6 +571,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex5/Makefile.in b/examples/vector_fe/vector_fe_ex5/Makefile.in index 7a9a4da02c..59cf736d48 100644 --- a/examples/vector_fe/vector_fe_ex5/Makefile.in +++ b/examples/vector_fe/vector_fe_ex5/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -494,11 +495,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -546,6 +558,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex6/Makefile.in b/examples/vector_fe/vector_fe_ex6/Makefile.in index 6377a309dd..86892a4a77 100644 --- a/examples/vector_fe/vector_fe_ex6/Makefile.in +++ b/examples/vector_fe/vector_fe_ex6/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -492,11 +493,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -544,6 +556,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex7/Makefile.in b/examples/vector_fe/vector_fe_ex7/Makefile.in index a8e0af5cc7..57f3c3b995 100644 --- a/examples/vector_fe/vector_fe_ex7/Makefile.in +++ b/examples/vector_fe/vector_fe_ex7/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -492,11 +493,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -544,6 +556,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex8/Makefile.in b/examples/vector_fe/vector_fe_ex8/Makefile.in index 25a6abccf1..f1f0585c96 100644 --- a/examples/vector_fe/vector_fe_ex8/Makefile.in +++ b/examples/vector_fe/vector_fe_ex8/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -492,11 +493,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -544,6 +556,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex9/Makefile.in b/examples/vector_fe/vector_fe_ex9/Makefile.in index 6bbd282b03..22210da48c 100644 --- a/examples/vector_fe/vector_fe_ex9/Makefile.in +++ b/examples/vector_fe/vector_fe_ex9/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -502,11 +503,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -554,6 +566,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/include/Makefile.in b/include/Makefile.in index e4979ee3d7..e63f099302 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -102,6 +102,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -383,11 +384,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -435,6 +447,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -640,6 +653,7 @@ include_HEADERS = \ base/libmesh_abort.h \ base/libmesh_base.h \ base/libmesh_common.h \ + base/libmesh_device.h \ base/libmesh_documentation.h \ base/libmesh_exceptions.h \ base/libmesh_logging.h \ @@ -786,6 +800,11 @@ include_HEADERS = \ geom/sphere.h \ geom/stored_range.h \ geom/surface.h \ + gpu/kokkos_linalg_base.h \ + gpu/kokkos_storage.h \ + gpu/kokkos_storage_policy.h \ + gpu/kokkos_tensor_ops.h \ + gpu/kokkos_vector_ops.h \ ghosting/default_coupling.h \ ghosting/ghost_point_neighbors.h \ ghosting/ghosting_functor.h \ diff --git a/include/libmesh/Makefile.in b/include/libmesh/Makefile.in index 62bc6c82e1..655ba3b6b3 100644 --- a/include/libmesh/Makefile.in +++ b/include/libmesh/Makefile.in @@ -120,6 +120,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -312,11 +313,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -364,6 +376,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -535,10 +548,11 @@ EXTRA_DIST = rebuild_makefile.sh BUILT_SOURCES = dirichlet_boundaries.h dof_map.h dof_map_base.h \ dof_object.h factory.h float128_shims.h getpot.h id_types.h \ libmesh.h libmesh_abort.h libmesh_augment_std_namespace.h \ - libmesh_base.h libmesh_common.h libmesh_documentation.h \ - libmesh_exceptions.h libmesh_logging.h libmesh_singleton.h \ - libmesh_version.h multi_predicates.h periodic_boundaries.h \ - periodic_boundary.h periodic_boundary_base.h print_trace.h \ + libmesh_base.h libmesh_common.h libmesh_device.h \ + libmesh_documentation.h libmesh_exceptions.h libmesh_logging.h \ + libmesh_singleton.h libmesh_version.h multi_predicates.h \ + periodic_boundaries.h periodic_boundary.h \ + periodic_boundary_base.h print_trace.h \ reference_counted_object.h reference_counter.h \ single_predicates.h sparsity_pattern.h variable.h \ variant_filter_iterator.h enum_convergence_flags.h \ @@ -585,7 +599,9 @@ BUILT_SOURCES = dirichlet_boundaries.h dof_map.h dof_map_base.h \ remote_elem.h sphere.h stored_range.h surface.h \ default_coupling.h ghost_point_neighbors.h ghosting_functor.h \ non_manifold_coupling.h overlap_coupling.h \ - point_neighbor_coupling.h sibling_coupling.h abaqus_io.h \ + point_neighbor_coupling.h sibling_coupling.h \ + kokkos_linalg_base.h kokkos_storage.h kokkos_storage_policy.h \ + kokkos_tensor_ops.h kokkos_vector_ops.h abaqus_io.h \ boundary_info.h boundary_mesh.h checkpoint_io.h \ distributed_mesh.h dyna_io.h ensight_io.h exodusII_io.h \ exodusII_io_helper.h exodus_header_info.h fro_io.h gmsh_io.h \ @@ -998,6 +1014,9 @@ libmesh_base.h: $(top_srcdir)/include/base/libmesh_base.h libmesh_common.h: $(top_srcdir)/include/base/libmesh_common.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +libmesh_device.h: $(top_srcdir)/include/base/libmesh_device.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + libmesh_documentation.h: $(top_srcdir)/include/base/libmesh_documentation.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ @@ -1457,6 +1476,21 @@ point_neighbor_coupling.h: $(top_srcdir)/include/ghosting/point_neighbor_couplin sibling_coupling.h: $(top_srcdir)/include/ghosting/sibling_coupling.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +kokkos_linalg_base.h: $(top_srcdir)/include/gpu/kokkos_linalg_base.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_storage.h: $(top_srcdir)/include/gpu/kokkos_storage.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_storage_policy.h: $(top_srcdir)/include/gpu/kokkos_storage_policy.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_tensor_ops.h: $(top_srcdir)/include/gpu/kokkos_tensor_ops.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_vector_ops.h: $(top_srcdir)/include/gpu/kokkos_vector_ops.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + abaqus_io.h: $(top_srcdir)/include/mesh/abaqus_io.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ diff --git a/tests/Makefile.in b/tests/Makefile.in index dd815a997f..8f8d85bb53 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -95,25 +95,33 @@ target_triplet = @target@ @LIBMESH_ENABLE_FPARSER_TRUE@ fparser/autodiff.C check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ - $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) + $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \ + $(am__EXEEXT_7) $(am__EXEEXT_8) +TESTS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__append_13) +@LIBMESH_ENABLE_KOKKOS_TRUE@am__append_2 = -I$(top_srcdir)/include $(KOKKOS_CPPFLAGS) +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@am__append_3 = unit_tests-kokkos-dbg +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@am__append_4 = unit_tests-kokkos-dbg +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@am__append_5 = unit_tests-kokkos-opt +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@am__append_6 = unit_tests-kokkos-opt # our GLIBC debugging preprocessor flags seem to potentially conflict # with libcppunit binaries. Some cppunit versions work fine for us, # others segfault and/or hang. By default we will not run # GLIBCXX-debugging builds with cppunit unless specifically # configured to. -@ACSM_ENABLE_GLIBCXX_DEBUGGING_CPPUNIT_TRUE@@ACSM_ENABLE_GLIBCXX_DEBUGGING_TRUE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_2 = unit_tests-dbg -@ACSM_ENABLE_GLIBCXX_DEBUGGING_FALSE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_3 = unit_tests-dbg -@LIBMESH_DEVEL_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_4 = unit_tests-devel -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_PROF_MODE_TRUE@am__append_5 = unit_tests-prof -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPROF_MODE_TRUE@am__append_6 = unit_tests-oprof -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@am__append_7 = unit_tests-opt -@LIBMESH_VPATH_BUILD_TRUE@am__append_8 = .linkstamp +@ACSM_ENABLE_GLIBCXX_DEBUGGING_CPPUNIT_TRUE@@ACSM_ENABLE_GLIBCXX_DEBUGGING_TRUE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_7 = unit_tests-dbg +@ACSM_ENABLE_GLIBCXX_DEBUGGING_FALSE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_8 = unit_tests-dbg +@LIBMESH_DEVEL_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_9 = unit_tests-devel +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_PROF_MODE_TRUE@am__append_10 = unit_tests-prof +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPROF_MODE_TRUE@am__append_11 = unit_tests-oprof +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@am__append_12 = unit_tests-opt +@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_13 = run_unit_tests.sh +@LIBMESH_VPATH_BUILD_TRUE@am__append_14 = .linkstamp ###################################################################### # # Don't leave code coverage outputs lying around -@CODE_COVERAGE_ENABLED_TRUE@am__append_9 = */*.gcda */*.gcno +@CODE_COVERAGE_ENABLED_TRUE@am__append_15 = */*.gcda */*.gcno subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = \ @@ -123,6 +131,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -182,12 +191,14 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/libmesh_config.h.tmp CONFIG_CLEAN_FILES = run_unit_tests.sh CONFIG_CLEAN_VPATH_FILES = -@ACSM_ENABLE_GLIBCXX_DEBUGGING_CPPUNIT_TRUE@@ACSM_ENABLE_GLIBCXX_DEBUGGING_TRUE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_1 = unit_tests-dbg$(EXEEXT) -@ACSM_ENABLE_GLIBCXX_DEBUGGING_FALSE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_2 = unit_tests-dbg$(EXEEXT) -@LIBMESH_DEVEL_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_3 = unit_tests-devel$(EXEEXT) -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_PROF_MODE_TRUE@am__EXEEXT_4 = unit_tests-prof$(EXEEXT) -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPROF_MODE_TRUE@am__EXEEXT_5 = unit_tests-oprof$(EXEEXT) -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@am__EXEEXT_6 = unit_tests-opt$(EXEEXT) +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@am__EXEEXT_1 = unit_tests-kokkos-dbg$(EXEEXT) +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@am__EXEEXT_2 = unit_tests-kokkos-opt$(EXEEXT) +@ACSM_ENABLE_GLIBCXX_DEBUGGING_CPPUNIT_TRUE@@ACSM_ENABLE_GLIBCXX_DEBUGGING_TRUE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_3 = unit_tests-dbg$(EXEEXT) +@ACSM_ENABLE_GLIBCXX_DEBUGGING_FALSE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_4 = unit_tests-dbg$(EXEEXT) +@LIBMESH_DEVEL_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_5 = unit_tests-devel$(EXEEXT) +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_PROF_MODE_TRUE@am__EXEEXT_6 = unit_tests-prof$(EXEEXT) +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPROF_MODE_TRUE@am__EXEEXT_7 = unit_tests-oprof$(EXEEXT) +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@am__EXEEXT_8 = unit_tests-opt$(EXEEXT) am__unit_tests_dbg_SOURCES_DIST = driver.C libmesh_cppunit.h \ stream_redirector.h test_comm.h base/dof_object_test.h \ base/dof_map_test.C base/default_coupling_test.C \ @@ -601,6 +612,14 @@ unit_tests_devel_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(unit_tests_devel_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ +am_unit_tests_kokkos_dbg_OBJECTS = +am__EXTRA_unit_tests_kokkos_dbg_SOURCES_DIST = driver_kokkos.K +unit_tests_kokkos_dbg_OBJECTS = $(am_unit_tests_kokkos_dbg_OBJECTS) +unit_tests_kokkos_dbg_LDADD = $(LDADD) +am_unit_tests_kokkos_opt_OBJECTS = +am__EXTRA_unit_tests_kokkos_opt_SOURCES_DIST = driver_kokkos.K +unit_tests_kokkos_opt_OBJECTS = $(am_unit_tests_kokkos_opt_OBJECTS) +unit_tests_kokkos_opt_LDADD = $(LDADD) am__unit_tests_oprof_SOURCES_DIST = driver.C libmesh_cppunit.h \ stream_redirector.h test_comm.h base/dof_object_test.h \ base/dof_map_test.C base/default_coupling_test.C \ @@ -1876,10 +1895,18 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(unit_tests_dbg_SOURCES) $(unit_tests_devel_SOURCES) \ + $(unit_tests_kokkos_dbg_SOURCES) \ + $(EXTRA_unit_tests_kokkos_dbg_SOURCES) \ + $(unit_tests_kokkos_opt_SOURCES) \ + $(EXTRA_unit_tests_kokkos_opt_SOURCES) \ $(unit_tests_oprof_SOURCES) $(unit_tests_opt_SOURCES) \ $(unit_tests_prof_SOURCES) DIST_SOURCES = $(am__unit_tests_dbg_SOURCES_DIST) \ $(am__unit_tests_devel_SOURCES_DIST) \ + $(unit_tests_kokkos_dbg_SOURCES) \ + $(am__EXTRA_unit_tests_kokkos_dbg_SOURCES_DIST) \ + $(unit_tests_kokkos_opt_SOURCES) \ + $(am__EXTRA_unit_tests_kokkos_opt_SOURCES_DIST) \ $(am__unit_tests_oprof_SOURCES_DIST) \ $(am__unit_tests_opt_SOURCES_DIST) \ $(am__unit_tests_prof_SOURCES_DIST) @@ -2082,11 +2109,22 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_INCLUDES = @KOKKOS_INCLUDES@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ +KOKKOS_MPI_LDFLAGS = @KOKKOS_MPI_LDFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -2134,6 +2172,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -2308,6 +2347,7 @@ AM_CPPFLAGS = $(libmesh_optional_INCLUDES) -I$(top_builddir)/include \ -DLIBMESH_IS_UNIT_TESTING AM_LDFLAGS = $(libmesh_LDFLAGS) $(libmesh_contrib_LDFLAGS) +KOKKOS_TEST_CPPFLAGS = $(am__append_2) unit_tests_sources = driver.C libmesh_cppunit.h stream_redirector.h \ test_comm.h base/dof_object_test.h base/dof_map_test.C \ base/default_coupling_test.C base/getpot_test.C \ @@ -2470,7 +2510,18 @@ data = matrices/geom_1_extraction_op.h5 \ unit_tests_data = $(data) # Why isn't this working automatically? -EXTRA_DIST = $(data) +EXTRA_DIST = $(data) $(kokkos_unit_test_sources) +kokkos_unit_test_sources = \ + numerics/kokkos_numerics_oracle_test_utils.h \ + numerics/kokkos_tensor_ops_oracle_fixtures.h \ + numerics/kokkos_tensor_ops_oracle_runners.h \ + numerics/kokkos_vector_ops_oracle_fixtures.h \ + numerics/kokkos_vector_ops_oracle_runners.h + +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_dbg_SOURCES = +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@EXTRA_unit_tests_kokkos_dbg_SOURCES = driver_kokkos.K +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@unit_tests_kokkos_opt_SOURCES = +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@EXTRA_unit_tests_kokkos_opt_SOURCES = driver_kokkos.K @LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@unit_tests_dbg_SOURCES = $(unit_tests_sources) @LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@unit_tests_dbg_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS) @LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@unit_tests_dbg_CXXFLAGS = $(CXXFLAGS_DBG) @@ -2501,7 +2552,16 @@ EXTRA_DIST = $(data) @LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@unit_tests_opt_LDADD = $(top_builddir)/libmesh_opt.la @LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@unit_tests_optdir = $(datadir) @LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@unit_tests_opt_DATA = $(data) -@LIBMESH_ENABLE_CPPUNIT_TRUE@TESTS = run_unit_tests.sh +@LIBMESH_ENABLE_KOKKOS_TRUE@driver_kokkos_src = driver_kokkos.K +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_dbg_object = unit_tests_kokkos_dbg-driver_kokkos.$(OBJEXT) +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_opt_object = unit_tests_kokkos_opt-driver_kokkos.$(OBJEXT) +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_dbg_depfile = $(DEPDIR)/unit_tests_kokkos_dbg-driver_kokkos.d +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_opt_depfile = $(DEPDIR)/unit_tests_kokkos_opt-driver_kokkos.d +@LIBMESH_ENABLE_KOKKOS_TRUE@kokkos_unit_test_depfiles = $(unit_tests_kokkos_dbg_depfile) $(unit_tests_kokkos_opt_depfile) +@LIBMESH_ENABLE_KOKKOS_TRUE@kokkos_unit_test_cleanfiles = $(unit_tests_kokkos_dbg_object) $(unit_tests_kokkos_opt_object) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(kokkos_unit_test_depfiles) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ unit_tests-kokkos-dbg$(EXEEXT) unit_tests-kokkos-opt$(EXEEXT) + CLEANFILES = cube_mesh.xda slit_mesh.xda slit_solution.xda out.e \ mesh_with_soln.e elemental_from_nodal.e write_elemset_data.e \ write_sideset_data.e write_nodeset_data.e write_edgeset_data.e \ @@ -2523,10 +2583,11 @@ CLEANFILES = cube_mesh.xda slit_mesh.xda slit_solution.xda out.e \ side_discontinuous_HEX27_disc.e side_discontinuous_QUAD9.e \ side_discontinuous_QUAD9_disc.e side_discontinuous_TRI6.e \ side_discontinuous_TRI6_disc.e write_exodus_C0POLYGON.e \ - write_exodus_C0POLYHEDRON.e write_exodus_C0POLYHEDRON_HEXPRISM.e \ - write_exodus_C0POLYHEDRON_HEXPRISM_READ.e \ - write_exodus_EDGE2.e write_exodus_EDGE3.e write_exodus_EDGE4.e \ - write_exodus_HEX20.e write_exodus_HEX27.e write_exodus_HEX8.e \ + write_exodus_C0POLYHEDRON.e \ + write_exodus_C0POLYHEDRON_HEXPRISM.e \ + write_exodus_C0POLYHEDRON_HEXPRISM_READ.e write_exodus_EDGE2.e \ + write_exodus_EDGE3.e write_exodus_EDGE4.e write_exodus_HEX20.e \ + write_exodus_HEX27.e write_exodus_HEX8.e \ write_exodus_PRISM15.e write_exodus_PRISM18.e \ write_exodus_PRISM20.e write_exodus_PRISM21.e \ write_exodus_PRISM6.e write_exodus_PYRAMID13.e \ @@ -2537,8 +2598,9 @@ CLEANFILES = cube_mesh.xda slit_mesh.xda slit_solution.xda out.e \ write_exodus_QUADSHELL9.e write_exodus_TET10.e \ write_exodus_TET14.e write_exodus_TET4.e write_exodus_TRI3.e \ write_exodus_TRI6.e write_exodus_TRI7.e \ - write_exodus_TRISHELL3.e smoother.out $(am__append_8) \ - $(am__append_9) + write_exodus_TRISHELL3.e smoother.out \ + $(kokkos_unit_test_cleanfiles) $(am__append_14) \ + $(am__append_15) # need to link any data files for VPATH builds @LIBMESH_VPATH_BUILD_TRUE@BUILT_SOURCES = .linkstamp @@ -3162,6 +3224,14 @@ fparser/unit_tests_devel-autodiff.$(OBJEXT): fparser/$(am__dirstamp) \ unit_tests-devel$(EXEEXT): $(unit_tests_devel_OBJECTS) $(unit_tests_devel_DEPENDENCIES) $(EXTRA_unit_tests_devel_DEPENDENCIES) @rm -f unit_tests-devel$(EXEEXT) $(AM_V_CXXLD)$(unit_tests_devel_LINK) $(unit_tests_devel_OBJECTS) $(unit_tests_devel_LDADD) $(LIBS) + +@LIBMESH_ENABLE_KOKKOS_FALSE@unit_tests-kokkos-dbg$(EXEEXT): $(unit_tests_kokkos_dbg_OBJECTS) $(unit_tests_kokkos_dbg_DEPENDENCIES) $(EXTRA_unit_tests_kokkos_dbg_DEPENDENCIES) +@LIBMESH_ENABLE_KOKKOS_FALSE@ @rm -f unit_tests-kokkos-dbg$(EXEEXT) +@LIBMESH_ENABLE_KOKKOS_FALSE@ $(AM_V_CCLD)$(LINK) $(unit_tests_kokkos_dbg_OBJECTS) $(unit_tests_kokkos_dbg_LDADD) $(LIBS) + +@LIBMESH_ENABLE_KOKKOS_FALSE@unit_tests-kokkos-opt$(EXEEXT): $(unit_tests_kokkos_opt_OBJECTS) $(unit_tests_kokkos_opt_DEPENDENCIES) $(EXTRA_unit_tests_kokkos_opt_DEPENDENCIES) +@LIBMESH_ENABLE_KOKKOS_FALSE@ @rm -f unit_tests-kokkos-opt$(EXEEXT) +@LIBMESH_ENABLE_KOKKOS_FALSE@ $(AM_V_CCLD)$(LINK) $(unit_tests_kokkos_opt_OBJECTS) $(unit_tests_kokkos_opt_LDADD) $(LIBS) base/unit_tests_oprof-dof_map_test.$(OBJEXT): base/$(am__dirstamp) \ base/$(DEPDIR)/$(am__dirstamp) base/unit_tests_oprof-default_coupling_test.$(OBJEXT): \ @@ -14835,6 +14905,41 @@ $(top_builddir)/libmesh_prof.la: FORCE $(top_builddir)/libmesh_oprof.la: FORCE (cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) libmesh_oprof.la) +# Build the Kokkos tests with the same mode-suffixed naming as the +# original libMesh unit test executables, while still compiling with +# the Kokkos device compiler and mode-specific flags. +@LIBMESH_ENABLE_KOKKOS_TRUE@$(unit_tests_kokkos_dbg_object): $(driver_kokkos_src) +@LIBMESH_ENABLE_KOKKOS_TRUE@ @$(MKDIR_P) $(DEPDIR) +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(KOKKOS_MPI_CPPFLAGS) $(CPPFLAGS_DBG) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS_DBG) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ -MMD -MP -MF $(unit_tests_kokkos_dbg_depfile) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ -c $< -o $@ + +@LIBMESH_ENABLE_KOKKOS_TRUE@$(unit_tests_kokkos_opt_object): $(driver_kokkos_src) +@LIBMESH_ENABLE_KOKKOS_TRUE@ @$(MKDIR_P) $(DEPDIR) +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(KOKKOS_MPI_CPPFLAGS) $(CPPFLAGS_OPT) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS_OPT) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ -MMD -MP -MF $(unit_tests_kokkos_opt_depfile) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ -c $< -o $@ + +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests-kokkos-dbg$(EXEEXT): $(unit_tests_kokkos_dbg_object) $(top_builddir)/libmesh_dbg.la +@LIBMESH_ENABLE_KOKKOS_TRUE@ @rm -f $@ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(AM_V_GEN)$(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(LDFLAGS) $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) -o $@ \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(unit_tests_kokkos_dbg_object) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(top_builddir)/libmesh_dbg.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) $(LIBS) + +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests-kokkos-opt$(EXEEXT): $(unit_tests_kokkos_opt_object) $(top_builddir)/libmesh_opt.la +@LIBMESH_ENABLE_KOKKOS_TRUE@ @rm -f $@ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(AM_V_GEN)$(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(LDFLAGS) $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) -o $@ \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(unit_tests_kokkos_opt_object) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) $(LIBS) + +@LIBMESH_ENABLE_KOKKOS_TRUE@-include $(kokkos_unit_test_depfiles) + @LIBMESH_VPATH_BUILD_TRUE@.linkstamp: @LIBMESH_VPATH_BUILD_TRUE@ -rm -f solutions && $(LN_S) -f $(srcdir)/solutions . @LIBMESH_VPATH_BUILD_TRUE@ -rm -f meshes && $(LN_S) -f $(srcdir)/meshes .