Hi,
While I compile my CUDA Fortran code with the switches -G, -gencode, and --maxrregcount=256; it gives the errors:
nvfortran-Error-Unknown switch: -G
nvfortran-Error-Unknown switch: -gencode
nvfortran-Error-Unknown switch: --maxrregcount=256.
On the system, cuda-gdb is installed and I can use it yet still the compiler cannot capture the switches. Why does it not capture the switches?
Thank you,
Yunus
Yes, you’re using nvcc (CUDA C) flags. You need to use the equivalent nvfortran flags.
“-G”: Device debugging. Nvfortran enables this when “-g” is used. Though can also be enabled via “-gpu=debug”
“-gencode”: Use “-gpu=ccXX” where “XX” is the compute capability of the device you wish to generate code for. Note that this flag is optional if compiling on the same system as you’re targeting as the compiler will auto-detect the device.
“–maxregcount=256”: Use “-gpu=maxregcount:256”. Though “256” is the max limit already so this flag isn’t needed.
Hope this helps,
Mat
Thank you Mat, It actually helped. I could not find the documentation for the Fortran on web. Is it available?
Best regards,
Yunus