Como depurar o erro de compilação do Fortran 90 “Não existe uma sub-rotina específica para o genérico 'foo' em (1)”?

Estou tentando gravar ligações do Fortran 2003 na biblioteca CUFFT usando o módulo iso_c_bindings, mas tenho problemas com ocufftPlanMany sub-rotina (semelhante asfftw_plan_many_dft na biblioteca FFTW

As ligações em si ficam assim:


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! cufftResult cufftPlanMany(cufftHandle *plan, int rank, int *n,
!                           int *inembed, int istride, int idist,
!                           int *onembed, int ostride, int odist,
!                           cufftType type, int batch)
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

interface cufftPlanMany
subroutine cufftPlanMany(plan, rank, n, &
                         inembed, istride, idist, &
                         onembed, ostride, odist, &
                         type, batch) &
& bind(C,name='cufftPlanMany')
use iso_c_binding
integer(c_int):: plan
integer(c_int),value:: rank, type, batch
integer(c_int):: n(*)
integer(c_int),value:: istride, idist, ostride, odist
integer(c_int):: inembed(*), onembed(*)
end subroutine cufftPlanMany
end interface cufftPlanMany

A parte de chamada é assim:


  integer(c_int):: plan
  integer(c_int):: batch
  integer(c_size_t):: size

! ...

    call cufftPlanMany(plan, 1, size,&
                       0, 1, size,&
                       0, 1, size,&
                       CUFFT_C2C, batch)

Infelizmente, tentando compilar isso resulta em

Erro: Não existe uma sub-rotina específica para o 'cufftplanmany' genérico em (1)

Erro de compilação. Tentar usar variáveis no lugar de constantes também não ajudou. Você poderia ajudar na depuração disso?

O compilador usado é gfortran: GNU Fortran (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5

questionAnswers(2)

yourAnswerToTheQuestion