Forgive me if this question is silly, but I’m afraid I’m having some strange issues that I can’t quite make out just reading the documentation on my own. I’ve switched from a machine that was running cuda/10.1 to a machine that has and 11.2 and since it’s this new machine it’s also using the newer compilers, which means I’ve switched from
pgfortran 17.3-0 64-bit target on x86-64 Linux -tp haswell
to nvfortran 20.11-0 LLVM 64-bit target on x86-64 Linux -tp skylake
which mentions that -Mcuda has been depreciated and that I should use -cuda. I’m not really sure how to do that though. When I try and type nvfortran -cuda -o exampleOutput exampleInput.f90 I get the following error
/software/nvhpc-20.11-el8-x86_64/Linux_x86_64/20.11/compilers/bin/tools/nvdd -dcuda /software/cuda-11.2-el8-x86_64 -usenvvm -reloc /home/acattan/pgcudafor5brVcRb2wK6rF.gpu -computecap 35 -ptx /home/acattan/pgcudaforjbrVcBhyd0P7a.ptx -o /home/acattan/pgcudaforrbrVcZc5M83yH.bin -cuda11020
nvvmCompileProgram error 9: NVVM_ERROR_COMPILATION.
Error: /home/acattan/pgcudafor5brVcRb2wK6rF.gpu (216, 24): parse expected comma after load’s type
ptxas /home/acattan/pgcudaforjbrVcBhyd0P7a.ptx, line 1; fatal : Missing .version directive at start of file ‘/home/acattan/pgcudaforjbrVcBhyd0P7a.ptx’
ptxas fatal : Ptx assembly aborted due to errors
NVFORTRAN-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (CRAFT_GPU_Nt-1FUNCTIONAL.f90: 1)
Doubtful this has anything to do with the transition from -Mcuda to -cuda, but rather a known issue in the 20.11 release when using CUDA 11.2. Assuming it’s the same issue, it was fixed in the 21.1 release. So if you can, please update to a newer compiler (21.5 is available at NVIDIA HPC SDK Current Release Downloads | NVIDIA Developer)
Assuming you installed the multi-CUDA package, another work around is to use CUDA 11.1, i.e. set the flag “-gpu=cuda11.1”
So removing -Mcuda and replacing it with -gpu=cuda10.2 causes all my attributes(device), attributes(global) and regular old real*8 device :: to throw up a NVFORTRAN-S-0034-Syntax error at or near attributes (CRAFT_GPU_Nt-1FUNCTIONAL.f90: 656). If I try keeping both of them it says -gpu requires a language specification
Sorry for the misunderstand. I meant you should add “-gpu”, i,e. “-cuda -gpu=cuda11.1”. Removing “-cuda” (or -Mcuda) would cause the compiler to not recognized CUDA Fortran language constructs.
Since we now support CUDA Fortran, Fortran and C++ Standard language parallelism to GPUs, OpenACC, OpenMP offload, and in a bit, CUDA C++, we decided it would be better to wrap up all the common GPU settings under one flag, “-gpu”, and simplify the model selection flag, “-cuda”, “-stdpar”, “-acc”, and “-mp”
Okay, and when I do this should I still load up Cuda/11.2? As I only have acess to cuda/10.2 and 11.2 on this machine and doing -gpu=cuda10.2 throws up a not available error.
We have two installation packages, one that includes only the most recent CUDA version, and another that include multiple CUDA versions (it’s a much bigger download package).
If you can upgrade to a more recent compiler, that would be the best path forward. Though another work around to try is using “-gpu=nonvvm” to by-pass the nvdd compilation step. It’s not ideal since you’ll then be using our older deprecated device code generator, and you might encounter other issues, but worth a try.