home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 20203 < prev    next >
Encoding:
Internet Message Format  |  1993-01-02  |  4.0 KB

  1. Xref: sparky comp.os.vms:20203 comp.lang.fortran:4884
  2. Path: sparky!uunet!usc!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!aun.uninett.no!ugle.unit.no!alf.uib.no!dsfys1.fi.uib.no!iversen
  3. From: iversen@dsfys1.fi.uib.no (Per Steinar Iversen)
  4. Newsgroups: comp.os.vms,comp.lang.fortran
  5. Subject: Re: ballooning EXE size
  6. Message-ID: <1993Jan2.102259.29723@alf.uib.no>
  7. Date: 2 Jan 93 10:22:59 GMT
  8. Sender: iversen@vsfys1.fi.uib.no (Per Steinar Iversen)
  9. Reply-To: iversen@vsfys1.fi.uib.no
  10. Followup-To: comp.os.vms
  11. Organization: Department of Physics, University of Bergen, Norway
  12. Lines: 61
  13.  
  14.  
  15. In article <1992Dec30.142249.21319@e2big.mko.dec.com>, lionel@quark.enet.dec.com (Steve Lionel) writes:
  16.  
  17. >A number of people have replied to Loren Buhle's question about "Balooning
  18. >EXE size" with the suggestion to increase the linker's cutoff point for 
  19. >creating new demand-zero image sections using the ISD_MAX linker option
  20. >statement.  Though that "fix" often will shrink the image size, it has a hidden
  21. >cost; the reason for the limit in the first place.
  22. >
  23. >As the number of image sections grows, the image activation time also grows;
  24. >an image with 100 or more image sections can take a long time to activate.
  25. >Sometimes this isn't a problem, but sometimes it is.  The ideal solution, which
  26. >I described in my previous posting, is to reduce the number of image sections to
  27. >the absolute minimum by using the linker COLLECT option statement.  If possible,
  28. >get it down such that there are no two image sections of the same type
  29. >(read-only, demand-zero, copy-on-ref, etc.).  I would only recommend adjusting
  30. >ISD_MAX if you haven't succeeded using the COLLECT method.
  31. >
  32. >Some additional tips - use COMMON instead of large local variables; even a 
  33. >COMMON which is only used by one routine.  Each COMMON has its own PSECT name 
  34. >and thus you can use COLLECT to put all the uninitialized COMMONs together.
  35. >Reserve local variables for non-arrays and initialized storage.  Even better,
  36. >put all your data-initialized storage into their own set of COMMONs and 
  37. >COLLECT them into their own image section.  The VAX FORTRAN and VAX FORTRAN-HPO
  38. >Release Notes contain additional details on how to use COLLECT in a linker
  39. >options file.
  40. >
  41. >At present, there is a limit of 250 named COMMONs in VAX FORTRAN, and no way
  42. >to allocate arrays on the stack (which would be ideal for large local arrays).
  43. >In DEC Fortran for OpenVMS VAX V6.0, which we expect to be shipping by March,
  44. >this limit is raised to 508, plus you can allocate arrays on the stack by
  45. >using the AUTOMATIC statement.
  46. >--
  47. >
  48. >Steve Lionel                    lionel@quark.enet.dec.com
  49. >SDT Languages Group
  50. >Digital Equipment Corporation
  51. >110 Spit Brook Road
  52. >Nashua, NH 03062
  53.  
  54. The "exploding EXE size" problem is familiar to me, and I have always treated it
  55. by modifying ISD_MAX upwards until the EXE size decreased again. I have also
  56. tried to follow the advice in the VAX FORTRAN release notes, but the problem is
  57. that one must analyze a MAP file produced by the linker to make this
  58. work. If this approach is beneficial, why is there no linker options to do the
  59. COLLECTs automatically? My programs must link to libraries which I have no 
  60. control over and each new update of the libraries or change in my code may drag
  61. in different COMMON blocks. Are there any tools around to extract the 
  62. information from the MAP files and automatically create suitable linker option
  63. files?
  64.  
  65. -psi
  66.  
  67. +------------------------------------------------------------------------------+
  68. ! Per Steinar Iversen    ! Internet:     iversen@vsfys1.fi.uib.no              !
  69. ! Fysisk Institutt       ! BITnet:       iversen@cernvm.bitnet                 !
  70. ! Universitetet i Bergen ! HEPnet:       VSFYS::IVERSEN (VSFYS=21.341=21845)   !
  71. ! Allegaten 55           ! Phone:       +47 5212770                            !
  72. ! N-5007 Bergen          ! Fax:         +47 5318334                            !
  73. ! NORWAY                 !                                                     !
  74. +------------------------------------------------------------------------------+
  75.