interface assignment (=)
module procedure gg
attributes(device) subroutine gg(qa, db)
implicit real*8 (d),type (dd_real) (q)
intent (out):: qa
intent (in):: db
qa%ddr(1) = db
qa%ddr(2) = 0.d0
I can’t call the subroutine,what’s wrong? Is there any wrong in my code?
Please hele me thank you!
“device” routines can only be called from “global” routines or other “device” routines. You’re trying call it from host code.
Thank you I understand it.
But I want to know why “device” routines can’t be called from “global” routines or other “device” routines when they are in different modules.
There’s no linker for the GPU code, hence no way to associate symbols from different objects. Also, there are no calls so all device routines are inlined by the compiler, hence need to be within the same module.
Hope this helps,