Skip to content

Commit

Permalink
Intel ICE Sacado: turn off support for nested OpenMP with ICPC
Browse files Browse the repository at this point in the history
This turns off support for calling parallel_for inside a OpenMP parallel
region if nesting is not enabled actually.
  • Loading branch information
crtrott committed Jan 27, 2023
1 parent 6701772 commit 2b5c31a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,12 @@ class ParallelFor<FunctorType, Kokkos::MDRangePolicy<Traits...>,

public:
inline void execute() const {
#ifndef KOKKOS_COMPILER_INTEL
if (execute_in_serial(m_iter.m_rp.space())) {
exec_range(0, m_iter.m_rp.m_num_tiles);
return;
}
#endif

#ifndef KOKKOS_INTERNAL_DISABLE_NATIVE_OPENMP
execute_parallel<Policy>();
Expand Down Expand Up @@ -543,6 +545,7 @@ class ParallelReduce<FunctorType, Kokkos::MDRangePolicy<Traits...>, ReducerType,
typename Analysis::Reducer final_reducer(
&ReducerConditional::select(m_iter.m_func, m_reducer));

#ifndef KOKKOS_COMPILER_INTEL
if (execute_in_serial(m_iter.m_rp.space())) {
const pointer_type ptr =
m_result_ptr
Expand All @@ -560,6 +563,7 @@ class ParallelReduce<FunctorType, Kokkos::MDRangePolicy<Traits...>, ReducerType,

return;
}
#endif

enum {
is_dynamic = std::is_same<typename Policy::schedule_type::type,
Expand Down

0 comments on commit 2b5c31a

Please sign in to comment.