simple code 如下:
module kernel
use cudafor
implicit none
contains
interface dgemm
attributes(device) subroutine cublasdgemm(transa,transb,
$m,n,k,alpha,a,lda,b,ldb,beta,c,ldc) bind(c,name='cublasDgemm')
use iso_c_binding
integer(c_int), value :: m, n, k, lda, ldb, ldc
real(c_double ),device,dimension(m,n):: a, b, c
real(c_double),value::alpha, beta
character(kind=c_char), value :: transa,transb
end subroutine cublasdgemm
end interface
attributes(device) subroutine ddd(...........)
……
call cublasdgemm(……)
……
end subroutine
end kernel
program main
……
call ddd(……)
……
end
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
编译时
编译命令如下: pgfortran -Mcuda=cuda3.0 -o <file> file.for -L/opt/cuda-4.1.28/cuda/lib64 -lcublas
但是总会出现顺序有误的提醒:PGF90-S-0070-Incorrect sequence of statements (file.for: 黑体所在的行数)
0 inform, 0 warnings, 1 severes, 0 fatal for file
………………………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………………………
请问是什么原因造成的?如何解决这个问题?谢谢!
|