PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Fatal Error in ACC kernels
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
nchlsearl



Joined: 13 Jun 2013
Posts: 6

PostPosted: Fri Aug 02, 2013 12:54 am    Post subject: Fatal Error in ACC kernels Reply with quote

Hello,

I've having an issue where I've wrapped some code with the ACC kernels directive, but upon compiling (seemingly successfully), I get this error:

Code:
FATAL ERROR: data in PRESENT clause was not found on device 1: name=ytop2horiz
 file:/home/nearl/ELC/loopELC.f90 diskvisib line:13003


However, when I look at the ACC Minfo output, it shows that ytop2horiz was presumably loaded on the device:

Code:
Generating present_or_copyin(ytop2horiz(:ntop2))


Any direction with this issue would be greatly appreciated!

Nick
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Aug 02, 2013 10:32 am    Post subject: Reply with quote

Hi Nick,

I would double check that the Minfo message is form the same spot as the error at line 13003 of loopELC.f90. It's possible that there is a present clause there. Note that the data clauses are address associated not name associated, so the variable may not have the same name if being passed in to a subroutine or is a pointer.

Otherwise, I'll need more details about the code and the directives you're using. Ideally, a reproducing example would be very helpful.

- Mat
Back to top
View user's profile
nchlsearl



Joined: 13 Jun 2013
Posts: 6

PostPosted: Fri Aug 02, 2013 11:38 am    Post subject: Reply with quote

Unfortunately, I can't post the code itself. However, Minfo displays the line number 13003 as well:

Code:
  13003, Generating present_or_copy(xskydisk(:nradius,:ntheta))
         Generating present_or_copy(yskydisk(:nradius,:ntheta))
         Generating present_or_copy(zskydisk(:nradius,:ntheta))
         Generating present_or_copyin(dtopy(:ndtop))
         Generating present_or_copyin(dtopx(:ndtop))
         Generating present_or_copyin(ytop2horiz(:ntop2))


To give some idea of how the code is setup:

Code:

subroutine mainsubroutine(xtop2horiz, ytop2horiz, x2darray, y2darray, x2d, y2d, ntop2)

dimension xtop2horiz(ntop2), ytop2horiz(ntop2), x2darray(x2d, y2d), y2darray(x2d, y2d)

!$acc kernels
do j = 1, N
    do i = 1, N
        if (numb.ge.100) then
            returnedint = someint
            returnedfloat = somefloat
            call somesubroutine(xtop2horiz, ytop2horiz, x2darray, y2darray, returnedint, returnedfloat)
        endif
    enddo
endo
!$acc end kernels

return
end


The compiler inlines all functions, which seems to work great for the other parts of the code that I've done this for. It's only when I add the kernels and end kernels directives around that particular piece of code that the program presents the error (after compiling without any).

I realize this isn't very useful, but if you have any ideas I'd greatly appreciate it.
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Aug 02, 2013 3:50 pm    Post subject: Reply with quote

Hi Nick,

What happens if you use an explicit data clause?

Code:
!$acc kernels copyin(dtopy(:ndtop), dtopx(:ndtop),  ytop2horiz(:ntop2)), &
!$acc         copy(xskydisk(:nradius,:ntheta), yskydisk(:nradius,:ntheta), zskydisk(:nradius,:ntheta))
do j = 1, N
    do i = 1, N


- Mat
Back to top
View user's profile
nchlsearl



Joined: 13 Jun 2013
Posts: 6

PostPosted: Sat Aug 03, 2013 9:34 pm    Post subject: Reply with quote

Thanks for your help, Mat. Unfortunately, explicitly using the data clauses seems to make no difference. Fortunately, I believe I found the issue. Ntop2 at one point has a value of zero. I'm guessing that perhaps the allocation on the device for ytop2horiz is disregarded if its length is zero?
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
Goto page 1, 2, 3  Next
Page 1 of 3

 
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