You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HPX does not compile when using -fopenmp (or -fopenmp-simd) on Clang or GCC.
Clang: Can't use pragma in constexpr function
/work/pansysk75/hpx-test/hpx/libs/core/algorithms/include/hpx/parallel/unseq/reduce_helpers.hpp:134:13: error: statement not allowed in constexpr function
HPX_VECTOR_REDUCTION(& : init)
^
/work/pansysk75/hpx-test/hpx/libs/core/config/include/hpx/config/auto_vectorization.hpp:61:38: note: expanded from macro 'HPX_VECTOR_REDUCTION'
#define HPX_VECTOR_REDUCTION(CLAUSE) HPX_PRAGMA(omp simd reduction(CLAUSE))
^
/work/pansysk75/hpx-test/hpx/libs/core/config/include/hpx/config/auto_vectorization.hpp:27:23: note: expanded from macro 'HPX_PRAGMA'
#define HPX_PRAGMA(x) _Pragma(#x)
^
Clang/GCC: Loops in non-canonical form
/work/pansysk75/hpx-test/hpx/libs/core/algorithms/include/hpx/parallel/unseq/loop.hpp:269:21: error: initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')
for (/**/; count < num; (void) ++count, ++it, ++dest)
^
/work/pansysk75/hpx-test/hpx/libs/core/algorithms/include/hpx/parallel/unseq/loop.hpp:229:78: error: expected ‘;’ before ‘)’ token
229 | for (HPX_UNUSED(count); count < num; (void) ++count, ++it)
| ^
GCC: invalid increment expression
/work/pansysk75/hpx-test/hpx/libs/core/algorithms/include/hpx/parallel/util/loop.hpp:953:49: error: invalid increment expression
953 | for (std::size_t i = 0; i < count;
@hkaiser Should we add feature tests for these, or just disable them for Clang/GCC? I suppose these were added with the Intel compiler in mind?
The text was updated successfully, but these errors were encountered:
The first error seems pretty self explanatory
second is because the variable is not initialized is loop body
third is because of 2 increments being done in the loop body
Unfortunately, openmp simd reduction is rather strict about how it wants the loop body to be Working Example
HPX does not compile when using -fopenmp (or -fopenmp-simd) on Clang or GCC.
Clang: Can't use pragma in constexpr function
Clang/GCC: Loops in non-canonical form
GCC: invalid increment expression
@hkaiser Should we add feature tests for these, or just disable them for Clang/GCC? I suppose these were added with the Intel compiler in mind?
The text was updated successfully, but these errors were encountered: