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