PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Conditional loop

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
AROM



Joined: 03 Apr 2013
Posts: 39

PostPosted: Fri Nov 22, 2013 2:21 am    Post subject: Conditional loop Reply with quote

Hello!

Here is a part of "acc kernels" section:
Code:
1164           IF (variable /= 'u' .and. variable /= 'x' ) THEN
1165             DO j = jts-bdyzone, MIN(jte,jde+jstag)+bdyzone
1166             DO k = kts, k_end
1167               dat(ide ,k,j) = dat(ide-1,k,j)
1168               dat(ide+1,k,j) = dat(ide-1,k,j)
1169               dat(ide+2,k,j) = dat(ide-1,k,j)
1170             ENDDO
1171             ENDDO
1172           ELSE
1173             DO j = MAX(jds,jts-1)-bdyzone, MIN(jte+1,jde+jstag)+bdyzone
1174             DO k = kts, k_end
1175               dat(ide+1,k,j) = dat(ide,k,j)
1176               dat(ide+2,k,j) = dat(ide,k,j)
1177               dat(ide+3,k,j) = dat(ide,k,j)
1178             ENDDO
1179             ENDDO
1180           END IF

There is no outer loop for the above mentioned loops.

Compiler tells that:
Code:
   1165, Conditional loop will be executed in scalar mode
         Accelerator kernel generated
   1173, Conditional loop will be executed in scalar mode
         Accelerator kernel generated


I used PGI 13.9 and 13.10

What does it means? How can I solve it?

Alexey
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6119
Location: The Portland Group Inc.

PostPosted: Fri Nov 22, 2013 2:36 pm    Post subject: Reply with quote

Hi Alexey,

Interesting. I was able to reproduce the error here. Looks like a problem with a character data being used as the IF conditional variable. If you change this to be a logical or integer, then the two loops will get accelerated. Another work around would be to accelerate each loop individually by using a "!$acc kernels loop" directive.

I've added a problem report (TPR#19689) and sent it on to engineering.

Thanks,
Mat
Back to top
View user's profile
AROM



Joined: 03 Apr 2013
Posts: 39

PostPosted: Sun Nov 24, 2013 9:21 pm    Post subject: Reply with quote

Thank you Mat!

In my case it would be easier to move "acc kernels" inside IFs
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group