You are here
Adding static/dynamic library to an Abaqus user subroutine
I want to use an external subroutine in my umat but I have not been able to do that so far. Having created a dynamic library project in Visual Studio 2008, I have created a .dll and .lib files and copied the .lib file into the working directory of my abaqus job and the .dll file to exec folder. I have also added the directory of the .lib file in the LIB environmental variable. But I get these errors from ABAQUS:
[quote]LINK : fatal error LNK1181: cannot open input file 'Dll2.lib'
Abaqus Error: Problem during linking - Abaqus/Standard User Subroutines.
This error may be due to a mismatch in the Abaqus user subroutine arguments.
These arguments sometimes change from release to release, so user subroutines
used with a previous release of Abaqus may need to be adjusted.
Abaqus/Analysis exited with errors[/quote]
These are the changes I have made to the Environment file abaqus_v6 for Dll2.lib:
link_sl='cmd /c "LINK /nologo /INCREMENTAL:NO /subsystem:console /machine:X86 /NODEFAULTLIB:LIBC.LIB /NODEFAULTLIB:LIBCMT.LIB /DEFAULTLIB:OLDNAMES.LIB /DEFAULTLIB:LIBIFCOREMD.LIB /DEFAULTLIB:LIBIFPORTMD.LIB /DEFAULTLIB:LIBMMD.LIB /DEFAULTLIB:MSVCRT.LIB /DEFAULTLIB:kernel32.lib /DEFAULTLIB:user32.lib /DEFAULTLIB:advapi32.lib /FIXED:NO /dll /def:%E /out:%U %F %A %B Dll2.lib &&mt /manifest %U.manifest /outputresource:%U;2 && del %U.manifest"'
compile_fortran=['ifort', '/c', '/Gm', '/recursive', '/nologo', '/heap-arrays:1', '/include:%I','Dll2.lib']
One step backward, the weird thing is when I copied the .lib file to another directory like:
link_sl='cmd /c "LINK /nologo /INCREMENTAL:NO /subsystem:console /machine:X86 /NODEFAULTLIB:LIBC.LIB /NODEFAULTLIB:LIBCMT.LIB /DEFAULTLIB:OLDNAMES.LIB /DEFAULTLIB:LIBIFCOREMD.LIB /DEFAULTLIB:LIBIFPORTMD.LIB /DEFAULTLIB:LIBMMD.LIB /DEFAULTLIB:MSVCRT.LIB /DEFAULTLIB:kernel32.lib /DEFAULTLIB:user32.lib /DEFAULTLIB:advapi32.lib /FIXED:NO /dll /def:%E /out:%U %F G:\\lib\\Dll2.lib %A %B &&mt /manifest %U.manifest /outputresource:%U;2 && del %U.manifest"'
compile_fortran=['ifort', '/c', '/Gm', '/recursive', '/nologo', '/heap-arrays:1', '/include:%I','G:\\lib\\Dll2.lib']
I get this error which means the compiler or the linker do not recognize the .lib file I think:
Creating library standardU.lib and object standardU.exp
aba_test.obj : error LNK2019: unresolved external symbol _IDENTITY@8 referenced in function _UMAT
standardU.dll : fatal error LNK1120: 1 unresolved externals
Abaqus Error: Problem during linking - Abaqus/Standard User Subroutines.
This error may be due to a mismatch in the Abaqus user subroutine arguments.
These arguments sometimes change from release to release, so user subroutines
used with a previous release of Abaqus may need to be adjusted.
Abaqus/Analysis exited with errors
where subroutine identity is what I use in umat subroutine. I would appreciate if you all can help me. And can you introduce a source where the process is explained in details? Thank you.
I am using intel, version 11.1.048, VS2008 and Abaqus 6.11. I have also taken care of !dec$ statements in both subroutines UMAT and IDENTITY.
- salingerv's blog
- Log in or register to post comments
- 7957 reads

Comments
Why cannot you include the
Why cannot you include the Identity subroutine in your Master UMAT file?