home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!agate!ucbvax!IPG.PH.KCL.AC.UK!SYSMGR
- From: SYSMGR@IPG.PH.KCL.AC.UK
- Newsgroups: comp.os.vms
- Subject: re: re: PROBLEM Linking shareable image library :HELP
- Message-ID: <2060031B_00057EE8.0095FB8B9E70B460$6_1@UK.AC.KCL.PH.IPG>
- Date: 27 Aug 92 11:21:05 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 42
-
- > >I am trying to convert a Fortran program I wrote a while back
- > >into a shareable image but I am having trouble getting the linker
- > >to give the psect attributes I want to some common blocks.
- >
- > I have not been that successful in making FORTRAN sharable
- > libraries because FORTRAN modules are not normally
- > reentrant and sharable (parameter lists, temporary
- > variables). You might be able to create sharable code if
- > there is no FORTRAN I/O, modified call parameter lists, all
- > variables are either optomized out, in common, or are call
- > parameters.
-
- No flame intended, but this is just plain WRONG, and most of
- the rest of the posting wasn't relevant.
-
- There is absolutely no requirement that shareable libraries
- contain re-entrant code. FORTRAN routines can be packaged into
- shareable images perfectly easily. The one requirement is that
- you override the default attributes of each and every COMMON
- block when you link, with linker options statements of the form
-
- PSECT=commonblockname,NOSHR
-
- (If you don't do this, the shareable image generated assumes that
- common blocks are shared as ONE copy in memory between multiple
- cooperating processes. Not impossible, but most of the time you want
- a local common block in each process, and only the readonly code
- sections shared).
-
- I have a software package that I wrote to make this, and the
- generation of a transfer vector, close to automatic. I wouldn't
- claim that its perfect, but it works for me, and I'm willing to
- send a copy on request. (its unique? point is that it parses object
- files rather than linker .MAP files, so it doesn't break across
- VMS releases so easily)
-
- Nigel Arnot
-
- NRA%ipg.ph.kcl.ac.uk@nsfnet-relay.ac.uk (internet)
- NRA%uk.ac.kcl.ph.ipg@ukacrl.bitnet (bitnet)
-
-
-