View previous topic :: View next topic |
Author |
Message |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Tue Nov 29, 2011 2:03 am Post subject: Debug version working but release version not working |
|
|
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 |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Tue Nov 29, 2011 2:21 am Post subject: |
|
|
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 |
|
Back to top |
|
 |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Tue Nov 29, 2011 11:38 am Post subject: |
|
|
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? |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Tue Nov 29, 2011 11:38 pm Post subject: |
|
|
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
a) using array arguments to subroutines that are not suitably dimensioned.
b) addressing arrays out of bounds. The most common is to use an array subscripts that is not defined, eg =0
John |
|
Back to top |
|
 |
|