Accelerator restrictions: unknown condition, invalid loop

When trying to accelerate a region (using double precision), the compiler said:

   1902, Loop not vectorized: mixed data types
         Loop not vectorized: may not be beneficial
   1913, Accelerator region ignored
   1914, Accelerator restriction: invalid loop
   1915, Accelerator restriction: invalid loop
         Loop not vectorized: data dependency
   1945, Accelerator restriction: unknown condition
   2004, Loop interchange produces reordered loop nest: 2005,2004
         Loop not vectorized: mixed data types
         Unrolled inner loop 4 times

The 1902 and 2004 bits are the real->real8 and real8->real parts of the code, so they aren’t in the accelerator region. The loops I am accelerating are:

do i=1,m
   do k=1,np

so they don’t seem to be invalid (i, k, m, np all integer). The “unknown condition” line is:

if (abs(st3) < 1.0d-8) then

and st3 is real*8. And I am compiling with cc13 just to make sure it uses that.

Now, I’m guessing this part of the code I’m trying to accelerate will not take well to acceleration, but I thought I’d try and see as it is a major timesink. I suppose my first question is, what do “invalid loop” and “unknown condition” mean when you see them in the -Minfo=accel and how does one usually work around them? Then, beyond that, why do they trigger this? Is abs not implemented on the GPU (or, more specifically, dabs)?

Hi Matt,

The “invalid loop” message is a summary message meaning that something in the loop is prohibiting acceleration. I think the issue is that you’re compiling with “-Kieee”. Try removing this flag.

In asking our compiler engineers about this, it seems they are still working out what the “correct” behavior should be for conditionals within an accelerator region when “-Kieee” is used. Specifically, the behavior of NaNs.

Hope this helps,
Mat