- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried to create an example finding the minimum of values in an array using the __sec_reduce_min()-reducer. However, i got various error messages that i believe point out some bugs. I used the latest version of the cilk-branch (downloaded today, 21:00 EST) only with the flags -lcilkrts and -fcilkplus. I am running a Fedora 16 x86-64.
[cpp]using namespace std; int main(int argc, char** argv) { double* A = new double[5]; for (int i = 0; i < 5; i++) A = i; __sec_reduce_min(A[0:5]); return 0; }[/cpp]
This code produces the following error:
test.cpp: In function ‘int main(int, char**)’:
test.cpp:18:1: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2055
}
^
test.cpp: In function ‘int main(int, char**)’:test.cpp:18:1: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2055 } ^
If you change the line with the reducer to
[cpp]double myvar = __sec_reduce_min(A[0:5]);[/cpp]
The error message becomes:
test.cpp: In function ‘int main(int, char**)’:
test.cpp:15:1: internal compiler error: in get_expr_operands, at tree-ssa-operands.c:1001
}
^
I actually got a third error message in another function. I was trying to build a k-means implementation. Unfortunately, i can't reproduce the error; i used an older version of cilk to compile; now, when i use the latest version, it produces the second error message i wrote. I assume, that the third bug is already fixed. If i find it, i will post it.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Leif,
I have reproduced the problem. I will get back to you as soon as I fix it.
Thanks,
Balaji V. Iyer.
I have reproduced the problem. I will get back to you as soon as I fix it.
Thanks,
Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- double* A = new double[5];
- for (int i = 0; i < 5; i++) A = i;
- __sec_reduce_min(A[0:5]);
Sorry, I still find the notation difficult to remember, particularly with plain C99 or C++ next to CEAN. In the notations of other languages, you would exceed the array bounds in this reduction. Of course, in CEAN this means 5 elements, ending with A[4].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Tim,
I am sorry, but I do not understand how we will exceed array bounds..
A[0:5] implies we start at A[0] and access 5 elements starting at A[0], so in essence, we are trying to find the min of A[0], A[1], A[2], A[3] and A[4].
Thanks,
Balaji V. Iyer.
I am sorry, but I do not understand how we will exceed array bounds..
A[0:5] implies we start at A[0] and access 5 elements starting at A[0], so in essence, we are trying to find the min of A[0], A[1], A[2], A[3] and A[4].
Thanks,
Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Leif,
I have fixed the problem and checked in a patch to Cilk Plus gcc. Please let me know if you have further issues.
Thanks,
Balaji V. Iyer.
I have fixed the problem and checked in a patch to Cilk Plus gcc. Please let me know if you have further issues.
Thanks,
Balaji V. Iyer.

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