Hi all,
I tried with a simple code to compute parallel. My code is
module simple
contains
attributes(global) subroutine increment(a,b)
implicit none
integer, intent(inout)::a(:)
integer,intent(in)::b
integer::i
i=threadIdx%x
a(i)=a(i)+b
return
end subroutine increment
end module simple
program incrementtest
use cudafor
use simple
implicit none
integer,parameter::n=256
integer::a(n),b
integer,device::a_d(n)
a=1
b=3
a_d=a
call increment<<<1,n>>>(a_d,b)
a=a_d
if (any(a.ne.4)) then
write(,) ‘program failed’
else
write(,) ‘program passed’
endif
end program incrementtest
I got an error
PGF90-S-0528-Argument number 2 to increment: device attribute mistach, line28… I got the same error for another program.
Thank for avance