Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Annonces
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

OpenMP Collapse

fah10
Nouveau contributeur I
550 Visites
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
0 Compliments
2 Réponses
TimP
Contributeur émérite III
550 Visites
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.
0 Compliments
fah10
Nouveau contributeur I
550 Visites
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.

0 Compliments
Répondre