Hello again. I’m running into a strange error, for some reason trying to print the contents of an integer(8) that contains the results of a call to clock64() from inside a kernal causes an out of bounds error. More specifically it outputs
0: copyout Memcpy (host=0x0x3615420, dev=0x0x2300b20a00, size=8) FAILED: 4(unspecified launch failure)
/software/pgi-el7-x86_64/linux86-64/17.3/lib/libpgf90_rpm1.so(__fort_abortx+0x17) [0x7fd9b7d28af7]
/software/pgi-el7-x86_64/linux86-64/17.3/lib/libpgf90.so(__fort_abort+0x5e) [0x7fd9b810799e]
/software/pgi-el7-x86_64/linux86-64/17.3/lib/libcudafor.so(+0x5d142) [0x7fd9c026a142]
/software/pgi-el7-x86_64/linux86-64/17.3/lib/libcudafor.so(pgf90_dev_copyout+0x53) [0x7fd9c026a431]
CRAFT_GPU_Nt() [0x404457]
CRAFT_GPU_Nt() [0x4018d4]
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.so.6(__libc_start_main+0xf5) [0x7fd9b669f545]
CRAFT_GPU_Nt() [0x401799]
and when using memcheck it outputs
========= Invalid (underscore)global(underscore) read of size 1
========= at 0x000034b8 in /project2/astroplasmas/alberto/CRAFT/TestingFolder/GPU/CRAFT_GPU_Nt-1.f90:143:gpufunctions_launchtogpu_
========= by thread (0,0,0) in block (0,0,0)
========= Address 0x00000054 is out of bounds
========= Saved host backtrace up to driver entry point at kernel launch time
========= Host Frame:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/…/…/…/…/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x2af0b6]
========= Host Frame:/software/pgi-el7-x86_64/linux86-64/2017/cuda/7.5/lib64/libcudart.so.7.5 [0x146ad]
========= Host Frame:/software/pgi-el7-x86_64/linux86-64/2017/cuda/7.5/lib64/libcudart.so.7.5 (cudaLaunch + 0x143) [0x2ece3]
========= Host Frame:CRAFT_GPU_Nt [0x1bf9]
========= Host Frame:CRAFT_GPU_Nt [0x4272]
========= Host Frame:CRAFT_GPU_Nt [0x18d4]
========= Host Frame:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/…/…/…/…/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22545]
========= Host Frame:CRAFT_GPU_Nt [0x1799]
I’m compiling it with the following call
pgfortran -Mcuda=lineinfo -o CRAFT_GPU_Nt CRAFT_GPU_Nt-1.f90 -v
Export PGI=/software/pgi-el7-x86_64
This also occurs with the test code that was helpfully provided to me by Robert Crovella in this thread.
Printing has never caused issues like this before, although I’ve only ever printed real*8 and integer, never integer(8).