Hello again. I’m afraid I’ve run into a strange little issue. I cannot seem to compile code containing cudaGetLastError as it says
NVFORTRAN-S-0155-Illegal call from host code to device subprogram __pgi_get_last_error
I’m using the cudafor package at the top and I’m compiling with
nvfortran -Mcuda -o exampleFile exampleFile.f90
and I’m using nvfortran 20.11-0 LLVM 64-bit target on x86-64 Linux -tp skylake
The code more or less looks like this
program exampleProgram
use cudafor
use exampleModuleinteger :: errorID
call exampleKernal<<<>>>
errorID = cudaGetLastError()
write(,) cudaGetErrorString(cudaGetLastError())
end program exampleProgram
was cudaGetLastError depreciated since 2017 and can no longer be used from host code?