forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Advice on Compiler Options

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
BILLDOWS



Joined: 22 Jul 2005
Posts: 86
Location: Swansea, UK

PostPosted: Wed May 24, 2006 9:16 am    Post subject: Advice on Compiler Options Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed May 24, 2006 12:30 pm    Post subject: Advice on Compiler Options Reply with quote

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
View user's profile Send private message AIM Address
BILLDOWS



Joined: 22 Jul 2005
Posts: 86
Location: Swansea, UK

PostPosted: Tue May 30, 2006 11:51 pm    Post subject: Advice on Compiler Options Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed May 31, 2006 12:24 am    Post subject: Advice on Compiler Options Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group