Libraries compiled modules
From: Pierre Asselin (pa_at_see.signature.invalid)
Date: 02/13/04
- Next message: Richard Maine: "Re: Something on CVF 6.6C"
- Previous message: Vladimir V.Vasilchenko: "Something on CVF 6.6C"
- Next in thread: Richard Maine: "Re: Libraries compiled modules"
- Reply: Richard Maine: "Re: Libraries compiled modules"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 13 Feb 2004 16:31:50 +0000 (UTC)
Is it possible to create and install libraries of Fortran modules?
This would be for modules that are sufficiently useful and mature to
be pre-compiled (pax, Jan!) and installed where other projects can
make use of them.
I realize that "install" is platform dependent, but I am more
concerned with compiler dependencies.
Example: Consider a file "toto.f90" on a Unix box, with
module extremely_useful
! blah, blah, blah
end module
module very_handy
! blah
end modle
! and so on
If I compile such a file with Portland, I get an object "toto.o" and
a bunch of module files "extremely_useful.mod", etc. The object files
can be bunched into a static or dynamic library (.a, .so) and copied
to /usr/local/lib and the .mod files can go in /usr/local/include/toto/ .
When I compile a main that USEs extremely_useful, I have to give a
flag like "-I/usr/local/include/toto -L/usr/local/lib" and everything works.
On Windows, Compaq Visual Fortran does much the same thing (.obj files
instead of .o) and the visual wizard gizmo lets me create static
libraries or dll's . Same deal, I would copy the libraries and
module files somewhere and specify "/I" flags in client projects.
On Linux, I seem to remember that Intel Fortran creates one module
file *per source file*, not per module, that is: a single file
"toto.mod" . It uses a few "work" files to keep track of what .mod
files to search when it encounters a "use" statement. The "work"
files are created by compiling the modules, do they go in
/usr/local/include/ as well? they are also updated when compiling
client programs so they seem to belong in the compilation directory
as well. What to do? (and, of course, someone correct me if what
I just said is wrong).
I realize that creating libraries lies outside of the scope of the
standard. My question is: do compilers support the process in
practice, when modules are involved?
-- pa at panix dot com
- Next message: Richard Maine: "Re: Something on CVF 6.6C"
- Previous message: Vladimir V.Vasilchenko: "Something on CVF 6.6C"
- Next in thread: Richard Maine: "Re: Libraries compiled modules"
- Reply: Richard Maine: "Re: Libraries compiled modules"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|