Loop to deeply nested

Loop not vectorized/parallelized: too deeply nested
81, Loop not vectorized/parallelized: too deeply nested

When a program compiling renders the error shown above what can be done to vectorize/parallelize this loop that is “too deeply nested”.

Any help appreciated. Thanks in advance.

THX 1138

How many loop levels are you using? You can increase the default number of levels via the “-Mvect=levels:n” and “-Mconcur=levels:n” flags, however, we max out at around 7 levels deep since the dependency analysis required gets too compute and memory intensive beyond this point.

  • Mat

Zombie thread, reactivate!

Mat,

A question about this. I have a code that I’m compiling with -fast that has a 3d and 4d interface and inside those two are nested loops that in the former case are three-deep and in the latter four-deep. So, when the 3d interface is compiled, not much info, but in the 4d case:

Loop not vectorized/parallelized: too deeply nested

So, I was wondering, how could I try telling it to go deeper? Would the FOPT be ‘-fast -Mvect=levels:4’ (or 5, 6…something)? Or would doing that remove the -Mvect=sse that seems to be part of -fast?

Matt

Hi Matt,

Use the “-Mvect=levels:n” flag to go beyond the default of three loop levels. Your compilation time may increase though. No need to remove SSE vectorization.

  • Mat

Oh, I wasn’t going to remove it. I was just worried that the “-Mvect=levels:n” flag might supersede whatever “-Mvect” flags that might be inside the “-fast” flag. But, the info output didn’t seem to make any changes, so I’m guessing it’s an append rather than clobber operation.

Thanks,
Matt