Release/Debug configurations

Release/Debug configurations

I'm using CVF 5.0 (OK, I know it's time to upgrade, I'm pressing my boss for last 6 months, but he's pretty resistant...).

1) Is there a predefined preprocessor constant to determine whether the current project configuration is "DEBUG" or "RELEASE",
named, say, "_DEBUG" (to be examined with !DEC$IF DEFINED)? OK, I know I can (un)define one for each configuration, but I'm a bit lazy to do a "rebuild all" on 200 source files for FOUR configurations
(two languages * debug/release).

2) Is it possible to insert debug information into "Release" configuration with CVF 5.0? I turned "Full debugging" on
in ...Settings/Fortran/Debug and rebuilt, but I still get "...does
not contain debug information" message. You guess, my release
version somewhere crashes while debug doesn't and I don't have
a mild idea where. I know it's I that screwed something somewhere, just if I could easily know where...

Jugoslav

Jugoslav
www.xeffort.com
5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Jugoslav, this happens to me when I try to debug a Fortran DLL in the CVF, AND the caller is a VB-program. Then it is the VB-program that "?dose not contain debug information". You write about many subroutines coded in 2 different languages. Could it be some of your callers that are written in a language other than Fortran, which dose not contains debug information?

Regards,
Sabalan.

To get debug info in a Release configuration, you also need to check a box under the Link settings to include debug info.

There is no predefined symbol for a debug configuration.

Steve

Steve - Intel Developer Support

Thanks, it works now.
The problem was in the folowing piece of code (I removed optimisation from that source file):

 
MinObjX=MIN(MinXTSV,MinXCv)-10 
MinObjY=MIN(MinYTSV,MinYCv)-10 
MaxObjX=MAX(MaxXTSV,MaxXCv)+10 
MaxObjY=MAX(MaxYTSV,MaxYCv)+10 
mWidth=MaxObjX 
mHeight=MaxObjY 

The problem was that the code was "optimised" so that "intermediate" results MaxObjX and MaxObjY were skipped by optimizer and directly mWidth and mHeight were calculated. Only... those "intermediate" variables were global (module) variables whose value was used later... and the program crashed at that later instance, since MaxObjX and MaxObjY were zero.

Just curious... was it a known compiler bug fixed at a later CVF release or did I dig out something that survived up to the present days? I'm 99% sure it wasn't a "subtle programming error" by me, just compiler bug?

Jugoslav

Jugoslav
www.xeffort.com

Without seeing a complete example, I couldn't say one way or another.

Steve

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today