nvlink error : Undefined references to pgf90 routines

I can compile a piece of code with PGI Fortran 14.10 on Windows 64, but get the following error with 15.3 on Linux 64, Centos 6.6, Cuda 7.0:

pgfortran -Mcuda=fastmath -Mbackslash -fast SRTsubCUF.f90
nvlink error   : Undefined reference to '__pgf90io_print_init' in '/tmp/pgfortranvvvb-KdRtKpu.o'
nvlink error   : Undefined reference to '__pgf90io_sc_ch_ldw' in '/tmp/pgfortranvvvb-KdRtKpu.o'
nvlink error   : Undefined reference to '__pgf90io_ldw_end' in '/tmp/pgfortranvvvb-KdRtKpu.o'
pgacclnk: child process exit status 2: /opt/pgi/linux86-64/15.3/bin/pgnvd
make: *** [build] Error 2

Any ideas what could be causing this or how to fix it?

Hi blebon,

These are calls to the PGI I/O runtime so are being generated when you have a call to print or write in your device code.

In 15.1, we switched to using a LLVM back-end to perform the device code generation. One of the few issues with this switch was that printing from device code was not yet supported until release 15.5.

Can you please try using the older CUDA C based code generator by using the flag “-Mcuda=nollvm” or using PGI 15.5 or later?

  • Mat