gpt4 book ai didi

linux - *** 没有规则可以创建 `module_netcdf_io.o' 目标,而 `driver.exe' 需要该目标。停止。错误

转载 作者:太空宇宙 更新时间:2023-11-04 03:50:10 25 4
gpt4 key购买 nike

我正在尝试在 Noah-MP 上运行 make。

但是,我不断收到此错误。 (*** 没有规则可以生成目标 module_netcdf_io.o',driver.exe' 需要的。停止。)

这是生成文件:

.SUFFIXES:
.SUFFIXES: .o .F

include user_build_options

OBJS = module_sf_noahmplsm.o \
module_model_constants.o \
module_sf_myjsfc.o \
module_sf_sfclay.o \
module_sf_noahlsm.o \
module_ascii_io.o \
module_netcdf_io.o \
module_io.o \
kwm_date_utilities.o \
module_sf_noahutl.o \
driver.o

CMD = driver.exe

FFLAGS = $(FREESOURCE) $(F90FLAGS)

all: $(CMD)

driver.exe: $(OBJS)
$(COMPILERF90) -o $(@) $(OBJS) $(NETCDFLIB)

.F.o:
$(RM) $(*).f90
$(CPP) $(CPPMACROS) $(NETCDFINC) $(*).F > $(*).f90
$(COMPILERF90) -c $(FFLAGS) $(NETCDFINC) $(*).f90
$(RM) $(*).f90

clean:
$(RM) $(OBJS) $(CMD) *.mod *~

driver.exe: driver.o
driver.exe: module_sf_noahmplsm.o
driver.exe: module_sf_noahutl.o
driver.exe: module_io.o
module_io.o: module_ascii_io.o
module_io.o: module_netcdf_io.o
module_ascii_io.o: kwm_date_utilities.o
module_sf_noahmplsm.o: module_sf_myjsfc.o module_sf_sfclay.o module_sf_noahlsm.o
module_sf_myjsfc.o: module_model_constants.o

该文件夹包含以下文件:

graphics
bondville.dat
bondville.val
driver.F
GENPARM.TBL
kwm_date_utilities.F
Makefile
module_ascii_io.F
module_io.F
module_model_constants.F
module_netcdf_io.F
module_sf_myjsfc.F
module_sf_noahlsm.F
module_sf_noahmplsm.F
module_sf_noahutl.F
module_sf_sfclay.F
MPTABLE.TBL
README
SOILPARM.TBL
user_build_options
VEGPARM.TBL

将文件与 netcdf 目录链接所需的 user_build-options 如下所示:

#
# Options for Linux with Intel Fortran
#

# COMPILERF90 = ifort
# FREESOURCE = -free
# CPPMACROS = -D_SIMPLE_DRIVER_
# F90FLAGS = -convert big_endian -g -O0 -check all,noshape,nopointer,noarg_temp_created -fp-model precise -fpe0 #-fp-model strict
# CPP = cpp -C -P -traditional
# LIBS =
# NETCDFDIR = /home/tirtha/libs/netcdf/
# NETCDFINC = /home/tirtha/libs/netcdf/include/
# NETCDFLIB = /home/tirtha/libs/netcdf/lib/
# NCARG_ROOT = /home/tirtha/NCARG/ncl6.1/
# RM = rm -f
# CC = cc

我在运行代码之前删除了哈希标签。

最佳答案

(在评论中回答。参见Question with no answers, but issue solved in the comments (or extended in chat))

OP 写道:

I managed to solve the problem. It was a netcdf issue.

The main problem was that the compiler I had used to compile netcdf was not the same as the one I had used to compile Noah. Moreover, even when I was linking to a different netcdf directory (compiled with the same compiler), I wasn't using make clean. Doing that solved the problem.

关于linux - *** 没有规则可以创建 `module_netcdf_io.o' 目标,而 `driver.exe' 需要该目标。停止。错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26608221/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com