- 积分
- 75
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2023-4-24
- 最后登录
- 1970-1-1
|
10金钱
我在编译hrldas时,遇到下面的错误,我使用的是Intel Fortran
COMPILERF90 = ifort
FREESOURCE = -free
F90FLAGS = -convert big_endian -g -O0 -fpe0
MODFLAG = -I
LDFLAGS =
CPP = cpp
CPPFLAGS = -P -traditional -D_GFORTRAN_
LIBS =
LIBJASPER = -L/apps/lib -ljasper
INCJASPER = -I/apps/include
NETCDFMOD = -I/apps/include
NETCDFLIB = -L/apps/lib -lnetcdf -lnetcdff
BZIP2 = NO
BZIP2_INCLUDE = -I/usr/include
BZIP2_LIB = -L/usr/lib64 -lbz2
RM = rm -f
CC = cc
-------------------------------------------------------------------
报错如下::::
rm -f module_hrldas_netcdf_io.f90
cpp -P -traditional -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ -I/apps/include module_hrldas_netcdf_io.F > module_hrldas_netcdf_io.f90
ifort -o module_hrldas_netcdf_io.o -c -convert big_endian -g -O0 -fpe0 -free -I../MPP -I../Utility_routines -I/apps/include module_hrldas_netcdf_io.f90
module_hrldas_netcdf_io.f90(16): error #7013: This module file was not generated by any release of this compiler. [NETCDF]
use netcdf
------^
module_hrldas_netcdf_io.f90(203): error #6404: This name does not have a type, and must have an explicit type. [NF90_NOWRITE]
ierr = nf90_open(wrfinput_flnm, NF90_NOWRITE, ncid)
---------------------------------------^
module_hrldas_netcdf_io.f90(203): error #6404: This name does not have a type, and must have an explicit type. [NF90_OPEN]
ierr = nf90_open(wrfinput_flnm, NF90_NOWRITE, ncid)
--------------^
module_hrldas_netcdf_io.f90(205): error #6404: This name does not have a type, and must have an explicit type. [NF90_INQ_DIMID]
ierr = nf90_inq_dimid(ncid, "west_east", dimid)
--------------^
module_hrldas_netcdf_io.f90(208): error #6632: Keyword arguments are invalid without an explicit interface. [LEN]
ierr = nf90_inquire_dimension(ncid, dimid, len=ix)
--------------------------------------------------^
module_hrldas_netcdf_io.f90(208): error #6404: This name does not have a type, and must have an explicit type. [NF90_INQUIRE_DIMENSION]
ierr = nf90_inquire_dimension(ncid, dimid, len=ix)
--------------^
module_hrldas_netcdf_io.f90(214): error #6632: Keyword arguments are invalid without an explicit interface. [LEN]
ierr = nf90_inquire_dimension(ncid, dimid, len=jx)
--------------------------------------------------^
module_hrldas_netcdf_io.f90(258): error #6404: This name does not have a type, and must have an explicit type. [NF90_OPEN]
ierr = nf90_open(wrfinput_flnm, NF90_NOWRITE, ncid)
-----------^
module_hrldas_netcdf_io.f90(262): error #6404: This name does not have a type, and must have an explicit type. [NF90_INQ_DIMID]
ierr = nf90_inq_dimid(ncid, "west_east", dimid)
-----------^
module_hrldas_netcdf_io.f90(265): error #6632: Keyword arguments are invalid without an explicit interface. [LEN]
ierr = nf90_inquire_dimension(ncid, dimid, len=ix)
-----------------------------------------------^
module_hrldas_netcdf_io.f90(265): error #6404: This name does not have a type, and must have an explicit type. [NF90_INQUIRE_DIMENSION]
ierr = nf90_inquire_dimension(ncid, dimid, len=ix)
-----------^
module_hrldas_netcdf_io.f90(271): error #6632: Keyword arguments are invalid without an explicit interface. [LEN]
ierr = nf90_inquire_dimension(ncid, dimid, len=jx)
-----------------------------------------------^
module_hrldas_netcdf_io.f90(274): error #6404: This name does not have a type, and must have an explicit type. [NF90_GLOBAL]
ierr = nf90_get_att(ncid, NF90_GLOBAL, "DX", dx)
------------------------------^
module_hrldas_netcdf_io.f90(274): error #6404: This name does not have a type, and must have an explicit type. [NF90_GET_ATT]
ierr = nf90_get_att(ncid, NF90_GLOBAL, "DX", dx)
-----------^
module_hrldas_netcdf_io.f90(343): error #6404: This name does not have a type, and must have an explicit type. [NF90_CLOSE]
ierr = nf90_close(ncid)
-----------^
module_hrldas_netcdf_io.f90(381): error #6404: This name does not have a type, and must have an explicit type. [NF90_OPEN]
ierr = nf90_open(wrfinput_flnm, NF90_NOWRITE, ncid)
-----------^
module_hrldas_netcdf_io.f90(432): error #6404: This name does not have a type, and must have an explicit type. [NF90_CLOSE]
ierr = nf90_close(ncid)
-----------^
module_hrldas_netcdf_io.f90(468): error #6404: This name does not have a type, and must have an explicit type. [NF90_OPEN]
ierr = nf90_open(wrfinput_flnm, NF90_NOWRITE, ncid)
-----------^
module_hrldas_netcdf_io.f90(487): error #6404: This name does not have a type, and must have an explicit type. [NF90_CLOSE]
ierr = nf90_close(ncid)
-----------^
module_hrldas_netcdf_io.f90(521): error #6404: This name does not have a type, and must have an explicit type. [NF90_OPEN]
ierr = nf90_open(agdata_flnm, NF90_NOWRITE, ncid)
-----------^
module_hrldas_netcdf_io.f90(530): error #6404: This name does not have a type, and must have an explicit type. [NF90_INQ_VARID]
iret = nf90_inq_varid(ncid, name, varid)
-----------^
module_hrldas_netcdf_io.f90(532): error #6632: Keyword arguments are invalid without an explicit interface. [START]
ierr = nf90_get_var(ncid, varid, irfract, start=(/xstart,ystart/), count=(/xend-xstart+1,yend-ystart+1/))
------------------------------------------------^
module_hrldas_netcdf_io.f90(532): error #6632: Keyword arguments are invalid without an explicit interface. [COUNT]
ierr = nf90_get_var(ncid, varid, irfract, start=(/xstart,ystart/), count=(/xend-xstart+1,yend-ystart+1/))
-------------------------------------------------------------------------^
module_hrldas_netcdf_io.f90(532): error #6404: This name does not have a type, and must have an explicit type. [NF90_GET_VAR]
ierr = nf90_get_var(ncid, varid, irfract, start=(/xstart,ystart/), count=(/xend-xstart+1,yend-ystart+1/))
-------------^
module_hrldas_netcdf_io.f90(541): error #6632: Keyword arguments are invalid without an explicit interface. [START]
ierr = nf90_get_var(ncid, varid, sifract, start=(/xstart,ystart/), count=(/xend-xstart+1,yend-ystart+1/))
------------------------------------------------^
module_hrldas_netcdf_io.f90(541): error #6632: Keyword arguments are invalid without an explicit interface. [COUNT]
ierr = nf90_get_var(ncid, varid, sifract, start=(/xstart,ystart/), count=(/xend-xstart+1,yend-ystart+1/))
-------------------------------------------------------------------------^
module_hrldas_netcdf_io.f90(550): error #6632: Keyword arguments are invalid without an explicit interface. [START]
ierr = nf90_get_var(ncid, varid, mifract, start=(/xstart,ystart/), count=(/xend-xstart+1,yend-ystart+1/))
------------------------------------------------^
module_hrldas_netcdf_io.f90(550): error #6632: Keyword arguments are invalid without an explicit interface. [COUNT]
ierr = nf90_get_var(ncid, varid, mifract, start=(/xstart,ystart/), count=(/xend-xstart+1,yend-ystart+1/))
-------------------------------------------------------------------------^
module_hrldas_netcdf_io.f90(559): error #6632: Keyword arguments are invalid without an explicit interface. [START]
ierr = nf90_get_var(ncid, varid, fifract, start=(/xstart,ystart/), count=(/xend-xstart+1,yend-ystart+1/))
------------------------------------------------^
module_hrldas_netcdf_io.f90(559): error #6632: Keyword arguments are invalid without an explicit interface. [COUNT]
ierr = nf90_get_var(ncid, varid, fifract, start=(/xstart,ystart/), count=(/xend-xstart+1,yend-ystart+1/))
-------------------------------------------------------------------------^
module_hrldas_netcdf_io.f90(6876): catastrophic error: Too many errors, exiting
compilation aborted for module_hrldas_netcdf_io.f90 (code 1)
Makefile:37: recipe for target 'module_hrldas_netcdf_io.o' failed
make: *** [module_hrldas_netcdf_io.o] Error 1
请问这是netcdf 安装的问题吗,但是我确认了netcdf 安装路径就在 /apps下
请教各位大佬有遇到过这个问题的吗
|
最佳答案
查看完整内容
This module file was not generated by any release of this compiler.
看着像是说,netcdf是用其他编译器编译的比如gcc gfortran/pgi等,交叉编译必须严格使用同一类型的编译器编译,不能外部库用a编译器,主程序用b编译器这种。
|