Use of declare create for a structured variable

OpenACC and CUDA Fortran
mkcolg
Posts: 8137
Joined: Jun 30 2004

Re: Use of declare create for a structured variable

Post by mkcolg » Tue Dec 03, 2019 8:57 am

I'm assuming fill_ptab doesn't have an interface and isn't in a module? In that case F77 style calling conventions are used so the compiler has no information about fill_ptab. To fix, add another routine directive in the main program so that knows it has a device version of the routine, something like:

Code: Select all

PROGRAM TEST_OACC

USE MODPI

IMPLICIT NONE

INTEGER :: i
!$ACC ROUTINE(FILL_PITAB) SEQ

!$ACC PARALLEL LOOP
DO i=1,10
CALL FILL_PITAB
ENDDO

END PROGRAM TEST_OACC
Hope this helps,
Mat

sl06
Posts: 6
Joined: Nov 13 2019

Re: Use of declare create for a structured variable

Post by sl06 » Tue Dec 03, 2019 11:43 am

Hi Mat,

Yes it helps, thanks!

Stéphane

Post Reply