I have this C++ project built in release mode (see the compiler and linker options below) but I get some strange behaviour. Running the program from WITHIN the IDE, that is, using either "Start Debugging" or "Start Without Debugging" - it works fine. But if I try running the program by just using the executable file produced - it gives a different result (in my case, a matrix is not positive-definite). This happens only in a few test cases. I am using Visual Studio 2008 Professional SP 1 with Intel C++ Compiler 11.1.054. Here are the compiler options (I have removed the includes):
/c /O3 /Og /Ob2 /Oi /Ot /Oy /GT /Qipo /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "QT_DLL" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /GF /EHsc /MD /GS- /fp:strict /fp:except /GR- /Fo".\\Release/" /W0 /nologo /Qfp-speculation:off /QaxSSE2 /QxSSE2 -Qoption,cpp,--extended_float_type
The linker options (again without libraries anddirs):
/INCREMENTAL:NO /nologo /MANIFEST /MANIFESTFILE:".\\Release\\prog.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /NODEFAULTLIB:"LIBCMT" /TLBID:1 /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /DYNAMICBASE:NO /MACHINE:X86
What am I missing? I was thinking it might have something to do with floating point speculation, but as you see I have turned it off and changed the fp model to strict.
When running the .exe from a cmd window, make sure to to use the "build environment" from the intel C++ compiler menu from "Start->all programs -> intel software development tools-> Intel C++ Compiler... -> Build env....". So the correct DLLs will be loaded.
If you just run the .exe from Explorer by double clicking it, you need to make sure the "path" env is set to the correct IntelC bin directory.
Or you can copy/paste the DLLs from the intelc-bin-dir to the folder where .exe exists.