Hello.
I got an error at last operation, cudaMemcpy.
My program work as follow:
-
Allocate matrix for host and device.
-
Allocate space for pseudo random number generator (PRNG) //I imitate from matrix allocation.
-
Launch setup_kernel by passing the state matrix.
-
Fill the matrix in the device.
-
Copy result back to host.
Result from prgram.
sarit@AH64D:~/AH64D$ ./a.out
============CPU===============
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0
2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0
4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0
5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0
6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0
7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 Error at 2Dcurand.cu:123
I wonder, I must missing something, but I can not figure out.
Regards.
2Dcurand.cu (3.5 KB)