- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to parallelize 3 nested loops with OpenMP. I use
the collapse(3) statement. The code works, but the collapse
statement has no effect. If the size of the outermost loop is 1,
the program runs with only one thread.
Is this a bug? Is there a way to get it working with the collapse
statement? Merging the loops 'by-hand' is unfortunately no option.
Cheers, Fabian
I'm trying to parallelize 3 nested loops with OpenMP. I use
the collapse(3) statement. The code works, but the collapse
statement has no effect. If the size of the outermost loop is 1,
the program runs with only one thread.
Is this a bug? Is there a way to get it working with the collapse
statement? Merging the loops 'by-hand' is unfortunately no option.
Cheers, Fabian
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The current compilers have always warned me when they ignored collapse. If an outer loop of length 1 were suitable for collapse(), I don't see why you wouldn't remove it yourself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
The current compilers have always warned me when they ignored collapse. If an outer loop of length 1 were suitable for collapse(), I don't see why you wouldn't remove it yourself.
I don't get any warnings. Even if the outer loop has a length >1, the collapse does not produce the expected speedup. The collapse feature would make life much easier and I just don't understand why it's not working.

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