Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 81b346ec authored by Olivier COULAUD's avatar Olivier COULAUD
Browse files

scalfmm's omp options were enabled even though openmp is not available [fixed]

parent dcb054ca
Branches
No related tags found
No related merge requests found
Pipeline #1114291 skipped
...@@ -74,9 +74,13 @@ namespace scalfmm::algorithms ...@@ -74,9 +74,13 @@ namespace scalfmm::algorithms
inline auto fmm(options::settings<S...> s, TreeType& tree, FmmOperatorsType const& fmmoperators, inline auto fmm(options::settings<S...> s, TreeType& tree, FmmOperatorsType const& fmmoperators,
unsigned int op = operators_to_proceed::all) -> void unsigned int op = operators_to_proceed::all) -> void
{ {
static_assert( static_assert(options::support(s, options::_s(
options::support(s, options::_s(options::omp, options::omp_timit, options::seq, options::seq_timit)), #ifdef _OPENMP
"unsupported fmm algo options!");
options::omp, options::omp_timit,
#endif
options::seq, options::seq_timit)),
"unsupported fmm algo options!");
if constexpr(options::has(s, options::seq, options::seq_timit)) if constexpr(options::has(s, options::seq, options::seq_timit))
{ {
using inner_settings = typename decltype(s)::inner_settings; using inner_settings = typename decltype(s)::inner_settings;
...@@ -117,9 +121,12 @@ namespace scalfmm::algorithms ...@@ -117,9 +121,12 @@ namespace scalfmm::algorithms
operators::fmm_operators<NearFieldType, FarFieldType> const& fmmoperators, operators::fmm_operators<NearFieldType, FarFieldType> const& fmmoperators,
unsigned int op = operators_to_proceed::all) -> void unsigned int op = operators_to_proceed::all) -> void
{ {
static_assert( static_assert(options::support(s, options::_s(
options::support(s, options::_s(options::omp, options::omp_timit, options::seq, options::seq_timit)), #ifdef _OPENMP
"unsupported fmm algo options!"); options::omp, options::omp_timit,
#endif
options::seq, options::seq_timit)),
"unsupported fmm algo options!");
if constexpr(options::has(s, options::seq, options::seq_timit)) if constexpr(options::has(s, options::seq, options::seq_timit))
{ {
using inner_settings = typename decltype(s)::inner_settings; using inner_settings = typename decltype(s)::inner_settings;
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
// File : scalfmm/lists/lists.hpp // File : scalfmm/lists/lists.hpp
// -------------------------------- // --------------------------------
#pragma once #pragma once
#ifdef _OPENMP
#include "scalfmm/lists/omp.hpp" #include "scalfmm/lists/omp.hpp"
#endif
#include "scalfmm/lists/policies.hpp" #include "scalfmm/lists/policies.hpp"
#include "scalfmm/lists/sequential.hpp" #include "scalfmm/lists/sequential.hpp"
...@@ -114,6 +114,7 @@ namespace scalfmm::options ...@@ -114,6 +114,7 @@ namespace scalfmm::options
using inner_settings = settings<S...>; using inner_settings = settings<S...>;
static constexpr auto value() noexcept -> std::string_view { return "seq"; }; static constexpr auto value() noexcept -> std::string_view { return "seq"; };
}; };
#ifdef _OPENMP
/** /**
* @brief A specific compound option for the 'OpenMP-based' case that combines multiple settings. * @brief A specific compound option for the 'OpenMP-based' case that combines multiple settings.
...@@ -131,7 +132,7 @@ namespace scalfmm::options ...@@ -131,7 +132,7 @@ namespace scalfmm::options
using inner_settings = settings<S...>; using inner_settings = settings<S...>;
static constexpr auto value() noexcept -> std::string_view { return "omp"; }; static constexpr auto value() noexcept -> std::string_view { return "omp"; };
}; };
#endif
/** /**
* @brief A specific option to time each pass of the FMM algorithm. * @brief A specific option to time each pass of the FMM algorithm.
*/ */
...@@ -244,6 +245,7 @@ namespace scalfmm::options ...@@ -244,6 +245,7 @@ namespace scalfmm::options
* @brief Predefined static option to compress the M2L interaction matrices. * @brief Predefined static option to compress the M2L interaction matrices.
*/ */
static constexpr auto low_rank = low_rank_{}; static constexpr auto low_rank = low_rank_{};
#ifdef _OPENMP
/** /**
* @brief Predefined static option to use the OpenMP-based algorithm. * @brief Predefined static option to use the OpenMP-based algorithm.
...@@ -254,7 +256,7 @@ namespace scalfmm::options ...@@ -254,7 +256,7 @@ namespace scalfmm::options
* @brief Predefined static option to use the OpenMP-based algorithm with each pass is timed. * @brief Predefined static option to use the OpenMP-based algorithm with each pass is timed.
*/ */
static constexpr auto omp_timit = omp_<timit_>{}; static constexpr auto omp_timit = omp_<timit_>{};
#endif
/** /**
* @brief Predefined static option to use the sequential algorithm. * @brief Predefined static option to use the sequential algorithm.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment