Re: Structure of large link libraries in f95



Walter Spector wrote:
Charles Russell wrote:

..
I asked approximately this same question about five years ago, but
perhaps less clearly, and perhaps there has been some progress in the
interim.


I think the real answer is the same as it was 5 years ago. Don't
worry about it.

Hard not to worry when the conversion is irreversible.

If 95-99% of the executable code is unused, how does that affect the compile-link-execute time? Since my user interface is to edit the source code, I rebuild for each run.

I use fortran even for really tiny problems, for which my younger colleagues use tools like spreadsheets. (When I learned fortran, the only alternatives were slide rule or electromechanical calculator, and I like its flexibility, readability, and re-usability.) Should I link in my whole math library each time? Hard for me to believe that makes sense.

If the size of your executables really bothers you,
then learn how to use shared libraries.

With only one instance running on a single-user machine, will this help?
Won't memory use and build time be about the same? Granted, it would save some disk space.

(BTW, I saw 250 gbyte drives
on sale for $90 at the local computer store last week...)

It is handy being able to work on my wife's laptop when we are away from home. With cygwin/g77, no problem.

Besides the simple size of the executable on disk, you may wonder
about memory space while the program is running. Again, don't worry
about it. Modern virtual memory systems only 'page in' portions of
the code, as needed, so wasting a lot of time worrying about it
is again somewhat fruitless in reality.

OK, I should try.

If you really want to save space in your old F77 programs, you *should*
worry about large statically-sized data arrays - which are typically set
'as big as I'll ever need them'.

I usually isolate the critical dimensions in an include file, and adjust as needed. Since I recompile for each run, no problem.

Throw your F77 compiler away.

I'll soon have to, with the end of support for g77.

Use
Fortran-90 ALLOCATABLE arrays, and never look back.

I had the iimpression that automatic arrays were safer and easier for the casual scientific user than ALLOCATABLE.
.