Silverfrost Forums

Welcome to our forums

Debug version working but release version not working

29 Nov 2011 1:03 #9312

Hi-

I have a serious problem.

My code is ready for shipping. However, in a particular test case of an example (obviously am using FORTRAN as I'm here- its integrated with Visual studio) the code works perfect in the debug version but falls over in release version.

Please help as I have whole day (16 hours) trying to solve but couldn't. Please helo\p

29 Nov 2011 1:21 #9313

I would suggest your program is not ready for release !

I would estimate there are still bugs in your program, and changing the .exe file may assist in locating these bugs.

You have (at least) 4 compilation options you could use to test the program: 'ftn95 xxx /check' will give you good debug and identify errors 'ftn95 xxx /debug' will give less debug but still give an informative callback message if it fails 'ftn95 xxx' provides no messages (release mode) 'ftn95 xxx /opt' provides no messages and can change the program runing (other release mode)

By running the program in the 4 different modes, the changes to the .exe file may assist in locating where the program is runing differently. If there are no bugs, the 4 should produce the same results.

A likely cause is un-initialised varibles, or values being lost. Check what the options /zero and /save mean and see if using these changes the run. Using these options should not be seen as the solution, but indicate where the problem is, as uninitialised or lost values should be fixed.

You have not indicated how it 'falls over', but you need to identify the cause. You can use SDBG to test variables, or go back to the old methods of writing out key variables, as the program runs.

Good luck

John

29 Nov 2011 10:38 #9322

Finding it hard to find where itt falls as the behaviour is different as more write statements are introduced to see the values of the variables.What could this indicate?

29 Nov 2011 10:38 #9328

Make sure you are compiling with /checkmate ( /full_undef) as I think you are having problems with array sizes. This type of error is typical of

  1. using array arguments to subroutines that are not suitably dimensioned.
  2. addressing arrays out of bounds. The most common is to use an array subscripts that is not defined, eg =0

John

Please login to reply.