You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Abaqus 2020与Intel OneAPI Fortran编译器链接错误求助

Abaqus 2020 自定义UMAT链接错误解决求助

环境配置步骤

  • 安装Visual Studio Community 2019,勾选桌面C++开发组件
  • 安装Intel OneAPI Basic及HPC套件
  • 安装Abaqus 2020,将ifort路径添加至系统环境变量,确保CMD中可调用ifort
  • 在abq2020.bat中添加语句:@call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" intel64 vs2019

问题现象

执行Abaqus verify -user_std验证通过,但运行自定义Fortran UMAT时,编译通过但链接失败,错误信息如下:

Begin Linking Abaqus/Standard User Subroutines
libifcoremt.lib(for_vm.obj) : error LNK2005: for_allocate already defined in LIBIFCOREMD.LIB(libifcoremd.dll)
libifcoremt.lib(for_vm.obj) : error LNK2005: for_deallocate already defined in LIBIFCOREMD.LIB(libifcoremd.dll)
libifcoremt.lib(for_close.obj) : error LNK2005: for_close already defined in LIBIFCOREMD.LIB(libifcoremd.dll)
libifcoremt.lib(for_open.obj) : error LNK2005: for_open already defined in LIBIFCOREMD.LIB(libifcoremd.dll)
   Creating library standardU.lib and object standardU.exp
standardU_static.lib(SMAStsStdU_IF.obj) : warning LNK4204: 'C:\Users\zf1005.AD\AppData\Local\Temp\zf1005_test_1172\vc140.pdb' is missing debugging information for referencing module; linking object as if no debug info
standardU_static.lib(SMAStsUsubs_IF.obj) : warning LNK4204: 'C:\Users\zf1005.AD\AppData\Local\Temp\zf1005_test_1172\vc140.pdb' is missing debugging information for referencing module; linking object as if no debug info
standardU_static.lib(contactperm.obj) : warning LNK4204: 'C:\Users\zf1005.AD\AppData\Local\Temp\zf1005_test_1172\vc140.pdb' is missing debugging information for referencing module; linking object as if no debug info
standardU_static.lib(creep.obj) : warning LNK4204: 'C:\Users\zf1005.AD\AppData\Local\Temp\zf1005_test_1172\vc140.pdb' is missing debugging information for referencing module; linking object as if no debug info
standardU_static.lib(dflow.obj) : warning LNK4204: 'C:\Users\zf1005.AD\AppData\Local\Temp\zf1005_test_1172\vc140.pdb' is missing debugging information for referencing module; linking object as if no debug info
standardU_static.lib(dflux.obj) : warning LNK4204: 'C:\Users\zf1005.AD\AppData\Local\Temp\zf1005_test_1172\vc140.pdb' is missing debugging information for referencing module; linking object as if no debug info
standardU_static.lib(disp.obj) : warning LNK4204: 'C:\Users\zf1005.AD\AppData\Local\Temp\zf1005_test_1172\vc140.pdb' is missing debugging information for referencing module; linking object as if no debug info
standardU.dll : fatal error LNK1169: one or more multiply defined symbols found
standardU_static.lib(dload.obj) : warning LNK4204: 'C:\Users\zf1005.AD\AppData\Local\Temp\zf1005_test_1172\vc140.pdb' is missing debugging information for referencing module; linking object as if no debug info
Abaqus Error: Problem during linking - Abaqus/Standard User Subroutines.

当前链接库配置

怀疑问题和链接库选项有关,当前使用的链接配置(多Abaqus版本通用)如下:

link_sl=['LINK',
         '/nologo', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64',#'/NOENTRY',
         '/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB',
         '/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB', '/DEFAULTLIB:LIBIFPORTMD.LIB', '/DEFAULTLIB:LIBMMD.LIB',
         '/DEFAULTLIB:kernel32.lib', '/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib',
         '/FIXED:NO', '/dll',
         '/debug', # <-- Debugging
         '/def:%E', '/out:%U', '%F', '%A', '%L', '%B', 
         'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib', 'advapi32.lib']

link_exe=['LINK',
          '/nologo', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64', '/STACK:20000000',
          '/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB', '/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB',
          '/DEFAULTLIB:LIBIFPORTMD.LIB', '/DEFAULTLIB:LIBMMD.LIB', '/DEFAULTLIB:kernel32.lib',
          '/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib',
          '/FIXED:NO', '/LARGEADDRESSAWARE',
           '/debug', # <-- Debugging
          '/out:%J', '%F', '%M', '%L', '%B', '%O',
          'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib', 'advapi32.lib']

解决方案建议

1. 排除重复链接库

错误显示libifcoremt.lib(静态多线程库)和LIBIFCOREMD.LIB(动态多线程调试库)存在符号冲突,二者不能同时链接。在link_sl和link_exe配置中添加/NODEFAULTLIB:libifcoremt.lib,强制排除静态库,只保留动态库LIBIFCOREMD.LIB。

2. 统一运行时库版本

确保编译UMAT时使用的运行时库与Abaqus链接配置一致:编译Fortran代码时指定动态多线程调试运行时库,通过编译选项/MDd实现(Release版本则用/MD)。

3. 检查环境变量加载顺序

确认abq2020.bat中加载Intel OneAPI环境的语句放在调用Abaqus之前,避免系统中其他版本的Fortran库干扰。

4. 清理临时文件

删除Abaqus运行时生成的临时文件(路径为C:\Users\zf1005.AD\AppData\Local\Temp\zf1005_test_1172)后,重新编译链接。


内容的提问来源于stack exchange,提问作者Jesse Feng

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.30 14:27:24