View previous topic :: View next topic |
Author |
Message |
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Wed May 24, 2006 9:16 am Post subject: Advice on Compiler Options |
|
|
Any advice on the following issue would be much appreciated:
I have a large FTN77 / Clearwin program which works fine when compiled using /zeroise together with /fullcheck or /check or /save or /debug but yields erroneous results when run with just /zeroise.
I use implicit none throughout. There are quite a mixture of Int*2 and *4 variables and arrays in the program.
I have also used my FTN95 licence to compile it (not run) and the only errors are when I call API functions. I could cut these out and try to run using checkmate and any other recommended options?
Any suggestions / explanations of behaviour would be appreciated.
Thanks, Bill Dowsland |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed May 24, 2006 12:30 pm Post subject: Advice on Compiler Options |
|
|
Bill
The options that stand out are /save and /zeroise. The others are less likely to make a difference.
I would switch off /zeroise and use /undef (and /full_undef if it is available) and initialise all variables before their use.
/save should also be avoided unless you know what it does and are sure you need it.
Assuming /undef identifies the problem, you can then switch it off for production purposes. |
|
Back to top |
|
|
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Tue May 30, 2006 11:51 pm Post subject: Advice on Compiler Options |
|
|
Many thanks Paul - it was indeed an array local to a sub which was not being completely zeroised.
COULD I JUST EXTEND THE QUESTION A LITTLE - The historic code I am working on has a lot of largish arrays (several each 5000*10) which are I*2, done (from the in-code comments) to cut storage requirements in the DBOS era, mixed up with lots of I*4 - messy, and something I would like to standardise [subject to any specific I*2 needs] to I*4.
Would I be correct in thinking that under Win32, given the virtual address space, code and data can use up to 2Gb, thus such memory considerations largely vanish?
Thanks, Bill
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed May 31, 2006 12:24 am Post subject: Advice on Compiler Options |
|
|
Bill
Yes the address space extends to 2GB. As you increase your memory requirements there may be a speed penalty as pages start to be swapped from RAM to disc. |
|
Back to top |
|
|
|