您的位置:首页 > 其它

WRF compile errors

2016-02-07 09:14 836 查看
The errors met in WRF/Chem compile process and solution.

Error 1:

Situation: ./compile em_real

Error: wrf_io.f:(.text 0x16a2): undefined reference to `nf_inq_varid_’



Solution: vim configure.wrf

change the line

LIB_EXTERNAL    = \
$(WRF_SRC_ROOT_DIR)/external/io_netcdf/libwrfio_nf.a -L/home/kfu/netcdf/lib  -lnetcdff -lnetcdf


to

LIB_EXTERNAL    = \
$(WRF_SRC_ROOT_DIR)/external/io_netcdf/libwrfio_nf.a -L/home/kfu/netcdf/lib  -lnetcdf


Another solution:

Check if the NETCDFPATH in configure.wrf is right or not:

NETCDFPATH      =    /usr/intel/netcdf/


Error 2

ifort catastrophic error **internal compiler error segmentation violation signal raised**

Solution

Change to the directory where the compile error file locates, and run the compile command in the compile.log file with replacement of -O3 by -O2.

Ref: https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/559320

“It fails on the -O3 optimization, run the compile using -O3 and then change to -O2 in configure.wrf and compile the rest with that. Or update your compiler.”
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息