program incrementTestGPU
use cudafor
implicit none
type typea
integer,a
integer,pointer :: a_d(:)
end type
type(typea),device , allocatable ::type_d(:)
allocate(type_d(2))
type_d(:)%a=1
print*,type_d(:)%a
allocate(type_d(1)%a_d(100))
pause
end program incrementTestGPU
Such like the code before. allocate(type_d(1)%a_d(100)),it can compiled but exit the program directly.
I use PGI14.10 and CUDA6.5 with the vs2010 complier.
program incrementTestGPU
use cudafor
implicit none
type typea
integer,a
integer,allocatable,device :: a_d(:)
end type
type(typea), allocatable ::type_d(:)
allocate(type_d(2))
type_d(:)%a=1
print*,type_d(:)%a
allocate(type_d(1)%a_d(100))
pause
end program incrementTestGPU
program incrementTestGPU
use cudafor
implicit none
type typea
integer,a
integer,allocatable,managed :: a_d(:)
end type
type(typea), allocatable, managed ::type_d(:)
allocate(type_d(2))
type_d(:)%a=1
print*,type_d(:)%a
allocate(type_d(1)%a_d(100))
pause
end program incrementTestGPU