2014-10-28 57 views
0

我想在諾亞MP上運行make。***沒有規則來製作'driver.exe'所需的目標`module_netcdf_io.o'。停止。錯誤

但是,我不斷收到此錯誤。 (***沒有規則,使目標module_netcdf_io.o', needed by 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 

的user_build - 選項,這是需要鏈接文件與netcdf目錄這樣讀取:

# 
# 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 

在運行代碼之前,我已經刪除了哈希標記。

+1

是任何除了一個編譯的其他文件,你所提到的? – 2014-10-28 13:23:48

+0

'make module_netcdf_io.o'是否會產生相同的錯誤?那麼'make module_model_constants.o'呢?那麼'make '怎麼辦? – 2014-10-28 14:22:24

+0

@SantoshA不,沒有任何文件已被編譯。他們都顯示兩個錯誤之一,或者是無規則錯誤或者這個: ** rm -f driver.f90 cpp -C -traditional -D__GFORTRAN__ -D_SIMPLE_DRIVER_/home/tirtha/libs/netcdf/include/driver .f> driver.f90 cc1:error:/ home/tirtha/libs/netcdf/include /:沒有這樣的文件或目錄 make:*** [driver.o]錯誤1 ** – user3410308 2014-10-29 04:50:48

回答

0

(答案在評論見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.

相關問題