I have a module that declares types as below:
MODULE ABC IMPLICIT NONE TYPE B INTEGER, ALLOCATABLE, DIMENSION(:,:) :: USA END TYPE B TYPE A INTEGER, ALLOCATABLE, DIMENSION(:,:) :: BRI TYPE (B), ALLOCATABLE, DIMENSION(:) :: GER END TYPE A TYPE (A), ALLOCATABLE, DIMENSION(:) :: TUR END MODULE MOD_ABC
Then I use this module in a main program and call the derived-data types from device as follows:
!$acc enter data copyin(TUR(1)) !$acc data copyin(FUN(:,:,:),ELFUN(:,:,:,:)) create(NO,I0) copy(PPV(:,:,:)) !$acc parallel loop default(present) DO NUC = 1,Z DO EL = K,L DO J = 1T NO = TUR(1)%GER(J_P)%USA(EL,J) I0 = TUR(1)%BRI(NO) ! extra calculations END DO !J END DO ! EL END DO !$acc end parallel loop !$acc end data
I included “deepcopy” flag on the Makefile.
When I run this program, it gives the error that
Failing in Thread:1 call to cuStreamSynchronize returned error 700: Illegal address during kernel execution
I looked at the manuals of NVIDIA. Yet I could not understand how to manage derived-data types.
I could not find a whole sample code that shows such an example. I am also open to online recommendations for sample codes.
Thanks for your attention!