I am working with CUDA-Fortran and am trying to debug some code containing arrays in shared memory. I read that values of shared memory variables are printed in CUDA-GDB as in the following example:
(cuda-gdb) print &array
$1 = (@shared int (*)) 0x20
(cuda-gdb) print *(@shared int*)0x20
However, when trying to invoke the address of any shared memory variable I get the message “No symbol ‘’ in current context.”
Is this happening because I use CUDA-Fortran? Is there any other way to access shared memory variables?
Could you tell me more information? Like
- which version of cuda you used.
- which version of PGI you used.
- according to https://devblogs.nvidia.com/parallelforall/using-shared-memory-cuda-fortran/, there are several ways to use shared memory, which one you used.
- If you can show me more your src, it will be easier for me to reproduce this issue.
PS: As I know, you can just simply use “print array(index)” to view the variable in array, no matter it’s shared or not.
I got the same error, “No symbol “a_s” in current context” when I tried “print a_s” in cuda-gdb.
It’s a very simple CUDA FORTRAN program. I am using CUDA 8.0 and pgfortran 17.4-0 64-bit target on x86-64 Linux -tp haswell.