- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey all,
I tried to use the OpenMP declare reduction pragma for an implementation of an array reduction. The code compiles fine using g++ 4.9 and produces correct results. However, using icpc-16.0.038 gives an internal error 20000_0. I attached a small code example.
#include <iostream> #include <vector> #include <complex> template <const int n> struct complex_array { complex_array() : element( n, std::complex<float>(0.0f,0.0f) ) { } std::vector< std::complex<float> > element; }; template <const int n> static inline void add_complex_struct( complex_array<n> &x, complex_array<n> const &y ) { for ( int i = 0; i < n; ++i ) { x.element += y.element; } } #pragma omp declare reduction( complex_array_reduction : complex_array<10> : add_complex_struct<10>(omp_out, omp_in) ) int main() { complex_array<10> a_array, b_array; for ( int i = 0; i < 10; ++i ) { std::complex<float> cf( 1.0f+i, 1.5f+i ); a_array.element = cf; } #pragma omp parallel for schedule(static) reduction( complex_array_reduction:b_array ) for ( int i = 0; i < 100; ++i ) { add_complex_struct<10>( b_array, a_array ); } for ( int i = 0; i < 10; ++i ) { std::cout << b_array.element << std::endl; } }
I used g++ -fopenmp and icpc -qopenmp to compile the code.
Thanks,
Patrick
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Patrick,
Thanks for filing this issue which I could reproduce as well. I've escalated the issue with the developers and will touch base with you as soon as I've an update for you. Appreciate your patience till then
Thanks,
Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kittur,
do you have any updates?
regards,
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Patrick,
This is a bug and has been escalated and I'll let you know as soon as the release with a fix for this issue is out. Appreciate your patience through this.
_Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kittur,
I tried the recently released Intel Compiler 16 (icpc (ICC) 16.0.0 20150815) which still is not able to compile the code.
regards,
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Patrick, yes the 16.0 release that's out (initial release) doesn't contain the fix yet. The upcoming update release will do so and I'll keep you updated. As always, appreciate your patience through this.
_Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Patrick,
Just letting you know that the 16.0 Update 1 version of the product released contains the fix for this issue which you can download and test it out, thanks.
_Kittur

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page