在编译WRF的时候,ndown.exe、real.exe、tc.exe都编译成功了,但wrf.exe编译失败,且显示:
/data/home/shensn/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/libifcoremt.a(for_vm.o): In function `for_allocate':
for_vm.c:(.text+0x43b): undefined reference to `__kmpc_global_thread_num'
for_vm.c:(.text+0x4a9): undefined reference to `__kmpc_global_thread_num'
for_vm.c:(.text+0x4c7): undefined reference to `__kmpc_global_thread_num'
……
……
make[1]: [em_wrf] Error 1 (ignored)
解决方法:查看configure.wrf,找到
OMPCPP = # -D_OPENMP
OMP = #-qopenmp -fpp -auto
OMPCC = #-qopenmp -fpp -auto
修改为
OMPCPP = -D_OPENMP
OMP = -qopenmp -fpp -auto
OMPCC = -qopenmp -fpp -auto
然后重新运行编译程序即可。