Results can change between Debug and Release mode? 
Author Message
 Results can change between Debug and Release mode?

Hi,

I am running a numerical program made in VC++ and some
parts in Visual fortran. I don't know what's going on but
I got different results when I compile in DEBUG mode and in
RELEASE mode. how is that possible ?

maybe the optimisations can change things in a wrong way?

Thanks
Pedro Cobas



Tue, 20 Jul 2004 02:09:39 GMT  
 Results can change between Debug and Release mode?
You can try making a "Release Build" with optimizations disabled to find
out.

More likeky, your code is relying on undefined behavior - probably the
value(s) of uninitialized variable(s), which are initialized in a Debug
build but not in a Release build.

-cd


Quote:
> Hi,

> I am running a numerical program made in VC++ and some
> parts in Visual Fortran. I don't know what's going on but
> I got different results when I compile in DEBUG mode and in
> RELEASE mode. how is that possible ?

> maybe the optimisations can change things in a wrong way?

> Thanks
> Pedro Cobas




Tue, 20 Jul 2004 02:16:53 GMT  
 Results can change between Debug and Release mode?

Quote:

> I am running a numerical program made in VC++ and some
> parts in Visual Fortran. I don't know what's going on but
> I got different results when I compile in DEBUG mode and in
> RELEASE mode. how is that possible ?

If the changes are small in magnitude, you may wish to make sure the
floating point consistency flag is enabled for the release build.


Tue, 20 Jul 2004 03:41:40 GMT  
 Results can change between Debug and Release mode?

Quote:


> > I am running a numerical program made in VC++ and some
> > parts in Visual Fortran. I don't know what's going on but
> > I got different results when I compile in DEBUG mode and in
> > RELEASE mode. how is that possible ?

> If the changes are small in magnitude, you may wish to make sure the
> floating point consistency flag is enabled for the release build.

Yes, it works now setting this flag in the release mode. The results are
not exactly the same, there are small differences in the truncations but
at least the convergence problems I had they work now.

I have remove as well some other optimisations. I have the feeling that they
change a little bit the floating point precision.

Many thanks for your help.
Pedro Cobas

www.ecosimpro.com



Fri, 23 Jul 2004 17:47:35 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. link error after changing from debug mode to release mode

2. Helps need on adding debug info to release mode so to debug release code

3. Works in Debug mode but not in Release mode

4. MIDL compiler fails during release mode but works fine in debug mode

5. Works in Debug Mode crahses in Release Mode

6. Run time Release mode error but no Debug mode error

7. Quiet NaNs, release mode and debug mode

8. Complining one project in release mode and another in debug mode

9. Program not work at release mode but work at debug mode

10. Page fault when compile using Release mode but not Debug mode

11. Program runs fine in debug mode, but crashes in release mode

12. Release Mode vs Debug Mode

 

 
Powered by phpBB® Forum Software