Cannot seem to print integer(8)

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/ [0x7fd9b7d28af7]
  /software/pgi-el7-x86_64/linux86-64/17.3/lib/ [0x7fd9b810799e]
  /software/pgi-el7-x86_64/linux86-64/17.3/lib/ [0x7fd9c026a142]
  /software/pgi-el7-x86_64/linux86-64/17.3/lib/ [0x7fd9c026a431]
  CRAFT_GPU_Nt() [0x404457]
  CRAFT_GPU_Nt() [0x4018d4]
  /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/ [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/ (cuLaunchKernel + 0x346) [0x2af0b6]
========= Host Frame:/software/pgi-el7-x86_64/linux86-64/2017/cuda/7.5/lib64/ [0x146ad]
========= Host Frame:/software/pgi-el7-x86_64/linux86-64/2017/cuda/7.5/lib64/ (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_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).

I’m not sure why this was failing, but it no longer appears as of the 20.1 release. Can you try installing our latest 21.3 release? High Performance Computing (HPC) SDK | NVIDIA

% pgfortran -V19.10 -fast t11a.cuf ; a.out
0: DEV_MKDESC: allocate FAILED:719(unspecified launch failure)
% pgfortran -V20.1 -fast t11a.cuf ; a.out

I shall let the folks upstairs know there is an update

Forgive my asking, but I just want to double check for clarities’ sake, it doesn’t say pgfortran in the list of things included in the HPC SDK package, but that is what you and I are using, is that seperate or just not listed on that page? I just need to make sure I’ve gotten this squared away before I make an update request.

“pgfortran” is just the older PGI name for the rebranded “nvfortran”. They’re the same complier.

We keep in the package so we don’t break makefile but don’t highlight it the docs. You should consider switching to using “nvfortran”, but it’s not a problem to containing using “pgfortran”