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

Debug mode - Release Mode

TinTin_9
Beginner
993 Views

Hi all,

I have a strange problem. I have a big code (20k lines, hecne cant paste here) which compiles and runs well on debug mode. But as soon as I switch to release mode the console just flashes and program quits, like nothn happens. Any one has any idea why this is the case ?

I am using a stack size as follows:

stack researve size: 2000000000

stace commit size: 2000000000

Maybe this mite be the problem, am not sure though.

Any help or comments will be very helpful.

Thanks

0 Kudos
4 Replies
anthonyrichards
New Contributor III
993 Views
Dare I suggest that the console program runs to completion and exits?
Or do you expect it to stop and ask for input?

0 Kudos
Steve_Nuchia
New Contributor I
993 Views
Quoting - anthonyrichards
Dare I suggest that the console program runs to completion and exits?
Or do you expect it to stop and ask for input?

Anthony's suggestion is not as flippant as it sounds. For console mode programs I often have to set a breakpoint at the end to preserve the output window when using F5 to run it. In release mode, the optimization may be making the code move around enough that the debugger can't set the breakpoint.

We need more information to be able to help here. The most likely scenario is a bug in your program being exposed by the optimizer. No way to tell with what you've given us so far.

0 Kudos
Les_Neilson
Valued Contributor II
993 Views
You could put a PAUSE statement immediately before the end of the program. This will retain the console window for you to see what is happening.
Les

0 Kudos
Steven_L_Intel1
Employee
993 Views

What happens if you run it from a console window?

0 Kudos
Reply