Hpc 22.7,linux,cuda fortran,nvfortran

I am using HPC SDK 22.7 compiling code with NVFORTRAN, I am getting the following error:
senl@senl-computer:~/wepcuda/cudadaima$ make
nvfortran -Mcuda -c init_Weplspace.f90 -o init_Weplspace.o
NVFORTRAN-S-0155-sum is use associated and cannot be redeclared (init_Weplspace.f90: 5130)
0 inform, 0 warnings, 1 severes, 0 fatal for reads_sediment_para
make: *** [Makefile:40:init_Weplspace.o] error 2

where line 5130 is:
real sum

I don’t know how to solve it. Can you help me

Do you have any modules called sum?

The CUDA Fortran module includes a device callable version of the Fortran ‘sum’ intrinsic. Hence you can’t redeclare a ‘sum’ in your code. To fix, either rename your ‘sum’ to something else, or rename the module intrinsic. For example:

use cudafor,only: cuf_sum=>sum

Hope this helps,

thank you,I’ve solved it

yes,that’s the problem. I’ve deleted it.

Mat,I have some problems,I hope to have a case written with cuda fortran to guide me to get familiar with how to complete a compilation, run and debug, but I can’t find it. Do you have a case package that uses cuda fortran to write code?

We do ship examples in “<base_dir>/<arch>/<release>/examples/CUDA-Fortran” that may help.

Of course, the actual path to the specifics of your installation, for example “/opt/nvhpc/Linux_x86_64/22.7/examples/CUDA-Fortran/”.

I find it,thank you Mat.