Difference between Release & Debug mode, and ifort for Linux

Difference between Release & Debug mode, and ifort for Linux

I have a program that is compiling fine in both Windows Visual Fortran 2013 (package 2013.3.171), and Linux ifort (package 2013.3.163); however when I compile it in debug mode, it hits an array bounds error partway through execution, something that does not happen when it is compiled in release mode. When it is compiled on Linux, it likewise hits a segfault at (what appears to be) the same point in the program. It uses both IMSL and MKL. 

What aspects of the compilation would cause this difference in debug/release? My ultimate goal is to get it working on Linux - what compilation switches should I apply to get the Linux compiler to best emulate Windows' release mode?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

On Windows, the Debug configuration sets run-time bounds checking *on* by default.   In your Debug run, it showed a run-time bounds violation.   You were simply lucky that the run-time bounds violation did not cause a problem on Windows in your release version.

On Linux, assuming the program is the same, you still have the run-time bounds violation, but you weren't so lucky, and it caused a problem.

Is there a reason why you can't fix the bounds violation?


PS: To confirm the array bounds violation on Linux too, use -check bounds (or -check all).

Leave a Comment

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