How to debug inside user subroutines in Abaqus

Ask for help or share your Abaqus knowledge here

How to debug inside user subroutines in Abaqus

Postby Fer » Thu Sep 20, 2012 8:43 am

This is how I could debug a user subroutine in Abaqus:

Locate the environment file (C:\SIMULIA\Abaqus\6.10-2\site\abaqus_v6.env) and make a backup
Next add this command line argument to the fortran compiler:
Code: Select all
/debug


so you will have something like this:

Code: Select all
compile_fortran=['ifort', '/Qmkl:sequential', '/c','/DABQ_WIN86_64', '/debug' ....


Next, change the link_sl variable to this:

Code: Select all
link_sl='cmd /c "LINK /nologo /INCREMENTAL:NO /subsystem:console /machine:AMD64 /DEBUG ....


and link_exe to this

Code: Select all
link_exe='cmd /c "LINK /nologo /INCREMENTAL:NO /subsystem:console /machine:AMD64 /DEBUG


Now we need to be sure that abaqus will be able to find visual studio, for that add this to the path:

Code: Select all
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\


or whatever your path is to devenv.exe

The only way I could debug is with an input file, not with CAE. So you probably want to do your model in Abaqus/CAE and then in the job module, Job->Manager ... Write input

So you now have an input file

Then you want to execute these lines:

Code: Select all
call "C:\Program Files (x86)\Intel\Compiler\11.1\048\bin\ifortvars.bat" intel64
call abaqus -j Job -user UGENS -debug -standard


Visual studio will pop-up, open the source code of your subroutine put a break point (we call it red dot among friends) wherever you want and hit F5.

Voila you can debug user subroutines!

Debugging.png
Debugging a user subroutine in abaqus
Fer
Site Admin
 
Posts: 76
Joined: Mon Apr 30, 2012 1:58 pm

Re: How to debug inside user subroutines in Abaqus

Postby tuando » Thu Sep 12, 2013 8:42 am

I followed the instruction and try to run a sample user subroutine. The errors I got from Fortran compiler is:

standardU_static.lib(SMAStsStdU_IF.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with 'standardU_static.lib(SMAStsStdU_IF.obj)'

I found the vc100.pdb in temporary folder instead. Is that because of I'm using the wrong version of VS. But I'm sure ABAQUS 6.12 compatible with VS10.0
I searched for a while but could not find any solution for that. Any advice on this would be highly appreciated.

My system:
Intel Fortran Compiler 11.1 Build 20101201
Microsoft Visual C++ 10.0.30319.1
Windows 7 Enterprise (Build 7600) (x64)
ABAQUS 6.12-3
tuando
 
Posts: 1
Joined: Thu Sep 12, 2013 8:01 am


Return to Abaqus

Who is online

Users browsing this forum: No registered users and 1 guest