CUDA FORTRAN runs the code using Makefile, and the result is nvlink error

nvlink error : Prototype doesn’t match for ‘fun_warning_nan1_fun_warning_nan_’ in ‘fun_warning_nan1.o’, first defined in ‘fun_warning_nan1.o’
nvlink fatal : merge_elf failed
pgacclnk: child process exit status 2: /opt/nvidia/hpc_sdk/Linux_x86_64/22.7/compilers/bin/tools/nvdd
make: *** [Makefile:45:cudadaima] error 2

My makefile:
1 #Compiler and Compile options
2 FC= nvfortran
3 #FFLAGS = -g
4 FFLAGS = -Mcuda
5
6 #Source code files, Object files and Target(Executable) file define
7 SRCS = $(wildcard *.f90)
8 OBJS = $(SRCS:.f90=.o)
9 TARGET = cudadaima
10
11 MODSRCS =
12 _para_base.f90
13 _para_sediment.f90
14 _vara_runoff.f90
15 _para_shape.f90
16 _para_status.f90
17 _vara_unit.f90
18 fun_check_dam_exist_d1.f90
19 fun_log_running_error_d1.f90
20 fun_warning_lt01.f90
21 fun_warning_nan1.f90
22 fun_warning_lt0_nan1.f90
23 greenampt_local.f90
24 _para_stat_zone.f90
25 runoff_3_local.f90
26 runoff_456_local.f90
27
28
29 MODOBJS =$(MODSRCS:.f90=.o)
30 #MODS =$(MODSRCS:.f90=.mod)
31
32 #Debug purpose.
33 #debug:
34 # @echo “SRCS = $(SRCS)”
35 # @echo “OBJS = $(OBJS)”
36 # @echo “MODSRCS = $(MODSRCS)”
37 # @echo “MODOBJS = $(MODOBJS)”
38 # @echo “TARGET = $(TARGET)”
39
40 .PHONY : all
41 all:$(MODOBJS) $(TARGET)
42
43 #Generate Target file using Object files
44 $(TARGET): $(OBJS) $(MODOBIS)
45 $(FC) $(FFLAGS) $^ -o $@
46
47 #Generate Object files using Source code files
48 %.o: %.f90
49 $(FC) $(FFLAGS) -c $< -o $@
50
51 ##Use “make run” can run the Target file
52 run:
53 cd /home/senl/wepcuda/cudadaima; ./cudadaima;
54
55 #Clean the Object files
56 .PHONY : clean
57 clean:
58 rm -f $(TARGET) $(OBJS) $(MODOBJS) $(wildcard *.mod)

Can you provide a minimal reproducing example? Not sure if the problem is with the compiler or your code, but having an example will help so I can investigate.

Thanks,
Mat

thank you Mat,I’ve solved it,It is defined multiple times, not a compiler problem,thank you very much.