Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

How to debug object file?

GeekVampi
Beginner
1,143 Views
I am a graduate student at the University of Akron, and I have been using Intel Visual Fortran (IVF) Compiler 9.1 (requirement for Abaqus 6.7). I have a material model which I link (as an object file) with Abaqus solver. I want to debug this material model's source code.

I checked Intel document for debugging, and I followed the procedure during compilation ( /debug:full /Od). When I tried to link this compiled object file with Abaqus, I received a (pop up) message "The procedure entry point _powr8i4 could not be located in the dynamic link library libmmd.dll."

Also, I am having difficulty in linking this object file with MS Visual Studio 2005 debugger. The procedure described in the IVF manual involves creating .exe file, but in my case I can not create an exe file since there is no main program subroutine in the source code. The subroutines described in my material's model will be used by Abaqus solver (standard.exe or explicit.exe).

I would be very grateful if you could guide me how to debug my source code for which I can only create obejct file. If it requires some special debugger, please let me know.

Thank you.
0 Kudos
5 Replies
TimP
Honored Contributor III
1,143 Views

The missing math run-time function probably means you are linking with an older version of Intel libraries than what you or Abaqus used during compilation. You should have available messages to tell you whether the references came from your own code or from Abaqus.

The .exe file expected by the debugger is in fact the Abaqus standard or explicit which you build. The main program compilation is included in the Abaqus components which you use in the link. It may be difficult to debug, if the Abaqus supplied components don't include debug symbols. You could attempt debugging by setting a break point in your own function, running to that break point, and stepping and analyzing from there.

Otherwise, you may need to write your own Fortran main/program which exercises your material model function, compiling everything for debugging.

0 Kudos
GeekVampi
Beginner
1,143 Views

Abaqus product requirement says IVF 9.1 or 10.1. So I am using 9.1. Does that mean I need to install additional math libraries (like IMSL)? Also, the standard.exe or explicit.exe are supplied by Abaqus. So is it possible to link the debugger with these?

Thank you for the reply.

0 Kudos
TimP
Honored Contributor III
1,143 Views

In principle, the math function library unsatisfied symbol would arise from an ifort library version mis-match. If that symbol is coming from Abaqus code, it means they used a newer version of ifort than the library which is linked. If it comes from something you built with a newer version of ifort than the math library which is linked, you must make sure that the most recent libraries from your compiler installation are in use.

Perhaps a build log might help.

0 Kudos
Greg_T_
Valued Contributor I
1,143 Views

Hello,

Are you using the Abaqus command line parameter "user=" to specify the Fortran file when running the Abaqus analysis that uses the material model user subroutine? It sounds like you may be using a different approach to compile and link the user subroutine to Abaqus.

I think there is syntax in the abaqus_v6.env file (typically in the Abaqus\6.x-x\site directory) that specifies file paths for this built-in feature of Abaqus, which will compile and link your user subroutine to Abaqus for you. It may also help to check that the command window is correctly initialized for Fortran. It has been useful for me to open the command window for the Fortran environment. For example, I open this window:

Start/All Programs/Intel Software Development Tools/Intel Visual Fortran Compiler 11.1.046/Fortran Build Environment for applications running on IA-32

(select a specific available version).

We typically test our user subroutines by writing a main Fortran program to run the user subroutine, as tim18 suggested, separately from Abaqus. The next useful test is to run the Abaqus analysis with a very small mesh, even a single element, to check that the Abaqus command is compiling and linking to the specified user subroutine. Then you are ready to run the actual analysis.

If you would like to get output from the user subroutine while Abaqus is running for debugging, you can write values from the user subroutine to the Abaqus *.msg message file using file unit=7 (see the Abaqus analysis user's manual section 3.6.1).

Regards,

Greg

0 Kudos
GeekVampi
Beginner
1,143 Views

Hi,

Yes I use Abaqus command window to compile and run the analysis. I have set the command window shortcut such that it runs "C:/Program Files/Intel/Compilers/9.1/Bin/ifortvars.bat" as soon as it is started (i.e. the enviorment variables are registered temporarily). I link the material model as object file (since other users will not get the source code). Another reason is that the linking process is faster with object file (though not noticible). Als compilation is not done in every submittal of run, thus time is saved there.

I always do most of the debugging using single element mesh (mostly by printing some values in msg/dat/log files). Now recently I am facing with machine overflow, and I am not getting any clue which subroutine/line/variable it is coming from. That's the reason I needed a debugger. My agony is increased by the fact that it's a 10000 line code, and no matter how many times I go through it, some bug will still remain hidden.

I have heard of debugging subroutines on unix system, but I don't have access to it. So I was looking for a solution on windows system. Adding a main program sounds great. Do you have any such main subroutine, that you can provide me. I will be very grateful for that.

Thank you very much for all the guidances.

Kumar

0 Kudos
Reply