爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 101|回复: 0

CESM移植最后一步报错relocation truncated to fit

[复制链接]
发表于 昨天 15:33 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
昨天在移植CESM1.2.2到另一个平台,build case到最后一步的时候报错,cesm.bldlog显示relocation truncated to fit: R_X86_64_PC32的错误信息,即已经成功完成了前面的 MCT、PIO、GPTL、组件库(atm/lnd/ice/ocn 等)编译,最终在链接阶段(link stage)失败
  1. libifcoremt.a(for_diags_intel.o): In function `for__this_image_number_or_zero':
  2. for_diags_intel.c:(.text+0x18a): relocation truncated to fit: R_X86_64_PC32 against `icaf_check_done.1285.0.12'
  3. for_diags_intel.c:(.text+0x199): relocation truncated to fit: R_X86_64_PC32 against `ptr_to_THIS_IMAGE'
  4. for_diags_intel.c:(.text+0x1a0): relocation truncated to fit: R_X86_64_PC32 against `ptr_to_ICAF_ABORT'
  5. for_diags_intel.c:(.text+0x1ab): relocation truncated to fit: R_X86_64_PC32 against `ptr_to_ICAF_PROB'
  6. for_diags_intel.c:(.text+0x1ba): relocation truncated to fit: R_X86_64_PC32 against `is_icaf_application'
  7. for_diags_intel.c:(.text+0x1c9): relocation truncated to fit: R_X86_64_PC32 against `this_image_number'
  8. for_diags_intel.c:(.text+0x1d1): relocation truncated to fit: R_X86_64_PC32 against `this_image_number'
  9. for_diags_intel.c:(.text+0x1d7): relocation truncated to fit: R_X86_64_PC32 against `icaf_check_done.1285.0.12'
  10. for_diags_intel.c:(.text+0x1e3): relocation truncated to fit: R_X86_64_PC32 against `this_image_number'
复制代码
问题原因(参考GPT回答):这是一个链接器地址空间截断错误,即:目标文件和静态库之间的地址寻址范围不兼容。
解决办法:
1.在config_compilers.xml文件中的LDFLAGS添加"-shared-intel"某些机器默认静态链接 Intel runtime (libifcoremt.a),可以改成动态链接以避免 relocation 溢出:
2.替换pio和netcdf版本
之前好像有次安装的时候碰到类似的这个问题,通过替换netcdf和pio版本解决了,可以参考https://bb.cgd.ucar.edu/cesm/thr ... ntel-compiler.3389/
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表