PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

not parallelized : multiples exits

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



Joined: 06 Jul 2010
Posts: 8

PostPosted: Wed Aug 25, 2010 5:04 am    Post subject: not parallelized : multiples exits Reply with quote

Hi !

I am currently working on a professional code in order to parallelize it with pragmas of acceleration. It is a FORTRAN77's & FORTRAN95's code and it is out of mind to use some thing more complexe than pragmas.

When I compile it with the -Minfo=all option I get the following message :

index_line, Loop not parallelized: multiples exits

And unfortunately that is the loop that I want to paralelize ! So I've got a problem.

I would be pleased to get some helps, or guide lines in order to going through this problem.

Thanks in advance,
AGy
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Aug 25, 2010 8:27 am    Post subject: Reply with quote

Hi AGy,

Parallel regions need ot have single entry and exit point. This message typically means that your parallel region has an exit or goto statement in it. Note that they are allowed in serial portions of the code.

To fix, you either need to remove the early exit or use the schedule directives to make it serial.

For example, if you had:
Code:
!$acc region
do i=1, N
    ! do something
    if (somecondition .eq. 1) then  ! these three lines would need to be removed
          exit
    endif
enddo


For this case, we can parallelize the outer loop and have the inner loop serial. In this case the early exit from the inner loop is ok.
Code:
!$acc region
!$acc do kernel
do i=1, N
  loop2:   do j= 1, M
    ! do something
    if (somecondition .eq. 1) then
          exit loop2
    endif
enddo


If you wan tot post code, I can help you figure out the best strategy for removing the early exit.

Hope this helps,
Mat
Back to top
View user's profile
AGy



Joined: 06 Jul 2010
Posts: 8

PostPosted: Thu Aug 26, 2010 12:00 am    Post subject: Reply with quote

Thanks for reply,

unfortunately I could not post any part of code, so I will try to sort out by myself. Anyway you've been really helpful.

AGy
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