PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

not a single-entry single-exit region

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
chris.sl.lim



Joined: 11 Jan 2013
Posts: 15

PostPosted: Fri Jan 11, 2013 9:12 am    Post subject: not a single-entry single-exit region Reply with quote

Hi,

My compiler is giving me an error "not a single-entry single-exit region". When I check the region that its pointing to, the code is

Code:

   !$acc kernels loop
      DO 1525 K=1,KMM1
      DO 1525 J=1,JMM1
      DO 1525 I=1,IMM1
      DELTA         = STORE(I,J,K)
      ABSCHG        = ABS(DELTA)
      STORE(I,J,K)  = DELTA/(1+ ABSCHG/AVGCHG)
 1525 CONTINUE


I'm struggling to see why this isn't a single-entry, single-exit region? If its obvious, please forgive me as I'm just starting out with Fortran!

Thanks,

Chris
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Jan 11, 2013 10:33 am    Post subject: Reply with quote

Hi Chris,

Sorry, but I don't see anything obvious. Can you either post or send to PGI Customer Service (trs@pgroup.com) a reproducing example?

I tried to reproduce the error with a simple test case, but was unable.

- Mat

Code:
% cat test.f90

      subroutine foo(STORE,KMM1,JMM1,IMM1,AVGCHG)

      integer KMM1,JMM1,IMM1
      real STORE(IMM1,JMM1,KMM1)
      integer I,J,K
      real DELTA,ABSCHG,AVGCHG
     
!$acc kernels loop
      DO 1525 K=1,KMM1
      DO 1525 J=1,JMM1
      DO 1525 I=1,IMM1
         DELTA         = STORE(I,J,K)
         ABSCHG        = ABS(DELTA)
         STORE(I,J,K)  = DELTA/(1+ ABSCHG/AVGCHG)
 1525 CONTINUE

      end subroutine foo
% pgf90 -c test.f90 -acc -Minfo=accel
foo:
      9, Generating present_or_copy(store(:imm1,:jmm1,:kmm1))
         Generating NVIDIA code
         Generating compute capability 1.0 binary
         Generating compute capability 2.0 binary
         Generating compute capability 3.0 binary
     10, Loop is parallelizable
     11, Loop is parallelizable
     12, Loop is parallelizable
         Accelerator kernel generated
         11, !$acc loop gang ! blockidx%y
         12, !$acc loop gang, vector(128) ! blockidx%x threadidx%x
Back to top
View user's profile
chris.sl.lim



Joined: 11 Jan 2013
Posts: 15

PostPosted: Fri Jan 11, 2013 10:48 am    Post subject: Reply with quote

Hi Mat,

I've sent an email to customer service.

Thanks,

Chris
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Jan 11, 2013 11:30 am    Post subject: Reply with quote

Hi Chris,

It's the GOTO that's used to jump around this section. Somehow when you use the "kernels loop" where looking ahead and see the where the goto jumps in. I'll write-up a report since we should be able to handle this case.

The work around is define the start and end of the kernels region:
Code:

      IF(FACDAMP.LT.1.0.OR.FACDAMP.GT.99.9) GO TO 1530
      AVGCHG = FACDAMP*SUMCHG/NPOINTS

!$acc kernels
      DO 1525 K=1,KMM1
      DO 1525 J=1,JMM1
      DO 1525 I=1,IMM1
      DELTA         = STORE(I,J,K)
      ABSCHG        = ABS(DELTA)
      STORE(I,J,K)  = DELTA/(1. + ABSCHG/AVGCHG)
 1525 CONTINUE
!$acc end kernels
 1530 CONTINUE


Hope this helps,
Mat
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