Silverfrost Forums

Welcome to our forums

Advice on Compiler Options

24 May 2006 8:16 #688

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

24 May 2006 11:30 #689

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.

30 May 2006 10:51 #708

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 500010) which are I2, done (from the in-code comments) to cut storage requirements in the DBOS era, mixed up with lots of I4 - messy, and something I would like to standardise [subject to any specific I2 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

30 May 2006 11:24 #709

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.

Please login to reply.