WRF-CMAQ编译错误:wrf.exe编译失败:for_vm.c:(.text+0x43b): undefined reference to `__kmpc_global_thread_num‘

在编译WRF时遇到wrf.exe出错,错误涉及__kmpc_global_thread_num的未定义引用。解决方案是检查configure.wrf文件,将OMPCPP、OMP和OMPCC关于OpenMP的选项启用,然后重新运行编译。
摘要由CSDN通过智能技术生成

在编译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

然后重新运行编译程序即可。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值