home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / vms / 14247 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  2.1 KB

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