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?