compiling problem with flag -Mcuda=ptxinfo using 15.3

Hi,

I’ve just upgrade my PGI compiler from 14.6 to 15.3
But I find that my code can not be compiled with 15.3
The compile command I used is:

pgcc -I ./ -O4 -acc -Mpreprocess -Minfo=accel -mp=allcores -Minline -DITHREADS=16 -DJTHREADS=8 -ta=tesla:cc35 -tp=penryn -Mcuda=ptxinfo -lgomp setup.o fileio.o solver_c.o ldc.o -o ldc

This command works fine with 14.6. But if I use 15.3, it can not be compiled. This is the part of the error message:


/opt/pgi/linux86-64/15.3/lib/libcudafor60.so: undefined reference to _iso_c_binding_10_' /opt/pgi/linux86-64/15.3/lib/libcudafor.so: undefined reference to pgf90_alloc03’
/opt/pgi/linux86-64/15.3/lib/libcudafor.so: undefined reference to pgf90io_print_init' /opt/pgi/linux86-64/15.3/lib/libcudafor.so: undefined reference to iso_c_binding_compare_ne_cptrs_’
/opt/pgi/linux86-64/15.3/lib/libcudafor.so: undefined reference to iso_c_binding_compare_eq_cptrs_' /opt/pgi/linux86-64/15.3/lib/libcudafor60.so: undefined reference to pgf90_template1_i8’
/opt/pgi/linux86-64/15.3/lib/libcudafor60.so: undefined reference to __hpf_free' /opt/pgi/linux86-64/15.3/lib/libcudafor.so: undefined reference to pgf90io_sc_l_fmt_write’
/opt/pgi/linux86-64/15.3/lib/libcudafor.so: undefined reference to pgf90io_fmtw_end' /opt/pgi/linux86-64/15.3/lib/libcudafor60.so: undefined reference to pgf90_template_i8’
/opt/pgi/linux86-64/15.3/lib/libcudafor.so: undefined reference to __hpf_allocated_i8' /opt/pgi/linux86-64/15.3/lib/libcudafor.so: undefined reference to pgf90io_sc_l_ldw’
/opt/pgi/linux86-64/15.3/lib/libcudafor60.so: undefined reference to `pgf90_template1’

And also if I do not use flag -Mcuda, it can be compiled. And the performance is slower than the 14.6.
But I need the -Mcuda flag. How can I fix this problem?
(My machine has CUDA6.0 installed and When I install the 15.3, I just follow the instructions and install all the things )

Thank you very much!
Harry

Hi Harry,

“-Mcuda” is implying CUDA Fortran which has references to the Fortran runtime routines. Hence, the fix here is to add the flag “-pgf90libs” to the link.

Hope this helps,
Mat