Re: Structure of large link libraries in f95



Charles Russell wrote:
...
If 95-99% of the executable code is unused, how does that affect the
compile-link-execute time?
... Should I link in
my whole math library each time? Hard for me to believe that makes sense.

How big is your math library?

And is it possible that you'd want some of your routines in different
modules than others? No one says you need (or should) use one 'ginormous'
module. And remember that you get .o files for modules, just like you get
for non-module files. And you can place all of them in libraries.

Consider the case of a .a library that contains MODULE_A, MODULE_B, and
MODULE_C. If you USE MODULE_A and call a routine in it, the linker needn't
place the other modules into your executable file. Unless, of course,
someone in MODULE_A calls someone in one of the other modules. This works
jut like what you are used to in F77, except a bit coarser.

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.

Shared libs are neat for a variety of reasons. You may see *better* link
times. (Less disk I/O, less relocating.)

(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.

Laptop drives are getting larger all the time too.

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.

ALLOCATABLEs are also safe and easy.

F90 POINTERs are another story.

Walt
.