Hi,
I’m new on this forum and I hope I’ll explain correctly.
I’m working with PGI Visual Fortran. Recently I made a project using the library cuFFT. There’s no error while compiling but when I run my project (“start debugging”) I have the message : “pgdebug.exe” has stopped working".
I’ve kept the default parameters for compiling except that I’ve enabled cuda, and added link to the library “cuFFT.lib” from “…\PGI\win64\17.9\bin”.
Here is my code :
program main
real, device :: x_d(3,3,3)
x_d = 2.
end program
module cuFFT_m
integer, parameter, public :: CUFFT_C2C = Z'29'
interface cufftPlan3d
subroutine cufftPlan3d(plan, nx, ny, nz, type) bind(C,name='cufftPlan3d')
use iso_c_binding
integer(c_int) :: plan
integer (c_int), value :: nx, ny, nz, type
end subroutine cufftPlan3d
end interface
interface cufftDestroy
subroutine cufftDestroy(plan) bind(C,name='cufftDestroy')
use iso_c_binding
integer(c_int), value :: plan
end subroutine cufftDestroy
end interface
contains
subroutine FFT3d_GPU(Nx,Ny,Nz)
implicit none
integer :: Nx,Ny,NZ
integer :: plan
call cufftPlan3d(plan, nz, ny, nx, CUFFT_C2C)
end subroutine
end module
If I delete the call to cuFFTPlan3d or the copy in the device, the problem disappear.
Thank you for your help !
Yohan