View previous topic :: View next topic |
Author |
Message |
stfark1
Joined: 02 Sep 2008 Posts: 210
|
Posted: Mon Sep 08, 2008 11:06 pm Post subject: OVERLAY, ETC. |
|
|
Was using Microsoft Fortran on a large Fortran Program. Two things that are different from Microsoft Fortran to SilverFrost Fortran:
1.) I had to specify overlays in the Microsoft Fortran or the program ran out of memory(DOS), in SilverFrost, doesn't seem to be the case, why?
2.) Microsoft set all variables to zero before execution. Now, SilverFrost Fortran doesn't, I am continually having to set variables to zero or I get an UNDEFINED variable error! Is there a command or compiler/link option that sets all variables to zero so they are defined?
Thanks in advance, Sid Kraft |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Tue Sep 09, 2008 7:33 am Post subject: |
|
|
1) In the past, with 16 bit operating systems, it was often necessary to use overlaying because of memory limitations. 32 bit systems provide a 4GB virtual memory space and memory limitations are relatively rare. Actual memory usage depends on the amount of RAM, the size of the paging file and how the OS uses part of the address space.
2) The Fortran standard does not require that variables be automatically preset to zero. If you want this with FTN95 then you need to use /ZEROISE on the FTN95 command line but this is not a recommended practise. |
|
Back to top |
|
|
JayTee1947
Joined: 22 Dec 2008 Posts: 8 Location: Inverclyde
|
Posted: Mon Dec 22, 2008 7:17 pm Post subject: Fortran Overlays |
|
|
Paul,
Being new to this forum, forgive me if I'm going over old ground.
Your comments re the need for overlays (with up to 4Gb of memory space) were very interesting. However, I'm look to converting a series of standalaone F80 programs to run 'interactively (via Clearwin?). Won't I hav to call in the code sequentially (depensing on menu choices),as well as freeing up unneeded working space (presently managed by separate COMMON blocks)? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Mon Dec 22, 2008 7:55 pm Post subject: |
|
|
There should be no need to use overlaying.
If the code is written in standard conforming Fortran then you should be able to compile and run it using FTN95. After that you can consider adding a graphical user interface. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sun Jan 11, 2009 8:01 pm Post subject: |
|
|
This brought all the old overlay stuff back to mind. Early computers were memory-limited, and what you used for code, you couldn't use for data. Even if you use many megabytes for code, you make little impact on the available RAM for data. Hence, you don't need overlaying.
I used to use computers with under 100 kb - and quite successfully. By the time I was using a PC with 1000 kb or 16000 kb I had abandoned overlaying. Now, even a cheap computer is likely to have 2,000,000 kb!
I just finished (is one ever finished?) putting three old programs together with a ClearWin+ GUI. The three programs all retain their complete original data structures, and the GUI operates with a fourth data structure that is independent of the others. When it comes time to run one of the constituent programs, I simply map the GUI data structure to that of the relevant program, copy the data over, and call the old program's main routine as a subroutine. Instead of printing the results, I hand them back to the GUI for plotting. The whole shebang operates in Fortran 77 mode (none of the newfangled stuff) with dozens of COMMON blocks. Works like a dream.
In order to be in trouble over space now, you would have to be looking at solving problems many times larger than anything you ever did with MS Fortran.
Jimmie the one - I'm doing exactly what you are asking about. The only downside, as far as I can see, is that you lock yourself into FTN95/Clearwin.
Eddie |
|
Back to top |
|
|
JayTee1947
Joined: 22 Dec 2008 Posts: 8 Location: Inverclyde
|
Posted: Sun Jan 11, 2009 10:28 pm Post subject: |
|
|
I feel I've stumbled across the geek-equivalent of Jurassic Park!
LitusSaxonicum (man of the saxon shore?): yep, when I was doing loadflows in 16k Fortran, overlays were a must. But now I've got 4Gb to play with...
I suspect I'm trying to do what you have already done (so prepare to have your brains picked!). I've developed a suite (ragbag?) of programs that let me step through some very esoteric power system analyses, the chosen route depending on what the problem is and how the sums progress, but all working off two basic datasets (used to be Access-based, but now just binary flat files). I had thought of calling in subroutines as and when needed, and I suppose my instinct is to be economical with memory.
I don't think I mind being locked into FTN95 & ClearWin, not if it does the business. My main hurdle is initally cracking the barrrier to understanding the process: how to go about it. the FTN55 tutorial doesn't seem to do it for me. Should I be buying some S/frost products? |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Jan 15, 2009 12:38 am Post subject: |
|
|
JimmieThe 1,
Are you really starting from scratch? Send me an e mail address via the "private message" facility, and I'll send you some code to get you started.
Eddie |
|
Back to top |
|
|
JayTee1947
Joined: 22 Dec 2008 Posts: 8 Location: Inverclyde
|
Posted: Tue Jan 20, 2009 6:02 pm Post subject: Private messages? |
|
|
Administrator: I can't see how to send a private message. Accoring to the FAQ on this, there are 3 poss reassns:
(i) you are not registered and/or not logged on (I'm logged on: am I registered?),
(ii) the board administrator has disabled private messaging for the entire board (have you?), or
(iii) the board administrator has prevented you individually from sending messages (or is just me that's paranoid?).
Can you cast any light thereon? |
|
Back to top |
|
|
JayTee1947
Joined: 22 Dec 2008 Posts: 8 Location: Inverclyde
|
Posted: Tue Jan 20, 2009 6:48 pm Post subject: OK, I'm dumb |
|
|
Adminstrator.
Plse gnr prvys pst: ddnt rls that "pm" mn "private message". Or that you were saving vowels. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Jan 21, 2009 10:38 pm Post subject: |
|
|
Jimmie,
Can you read private messages? I sent you my Uni e mail address so you can make contact.
Eddie |
|
Back to top |
|
|
|