I am trying to use cuda fortran in a project. But i have a problem during the compilation. When i compile a dynamic library I get the following error :
ld: Base/FldFortranVecCUF.o: relocation R_X86_64_PC32 against symbol `kernel_operatordivcu__entry’ can not be used when making a shared object; recompile with -fPIC
ld: final link failed: Bad value
I use this command to compile :
pgf90 -Mcuda=cc13 -fast -fPIC -o Base/FldFortranVecCUF.o -c Base/FldFortranVecCUF.cuf
When i compile in static, with -Mcuda=emu or without cuda kernel, i have no trouble. I am looking for an error for some time now but didn’t find it yet. Is there something special about cuda fortran and dynamic libraries?