home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / hp / 10162 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.6 KB  |  44 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!jato!vsnyder
  3. From: vsnyder@jato.jpl.nasa.gov (Van Snyder)
  4. Subject: Re: executable sizes in fortran
  5. Message-ID: <1992Sep8.201454.17374@jato.jpl.nasa.gov>
  6. Organization: Jet Propulsion Laboratory
  7. References: <lee.715546990@ceg.uiuc.edu> <Bu2BvF.8Aw@atl.hp.com>
  8. Date: Tue, 8 Sep 1992 20:14:54 GMT
  9. Lines: 33
  10.  
  11. In article <Bu2BvF.8Aw@atl.hp.com> aaa@hpuerca.atl.hp.com (Simon Fowler) writes:
  12. >In article <lee.715546990@ceg.uiuc.edu>, lee@ceg.uiuc.edu (Chris Lee) writes:
  13. >> One of our users has a question:
  14. >> 
  15. >> Why are the fortran executables SOOOOOO  BIIIIIIIIIIG?
  16. >> It seems that "all" of the data is being allocated at
  17. >> compile/link time, and he would like to know if there is a 
  18. >> way to force the compiler/linker to allocate it at runtime.
  19. >> 
  20. >> We are running HPUX 8.07 on 9000/700s.
  21. >
  22. >Typically this is caused by large (should say LARGE) arrays that are statically allocated.
  23. >I usually see this when code is ported from another machine and then compiled with the -K
  24. >option to force all data to static storage (instead of being put on the stack). If this is
  25. >the case, you can declare the array as being in COMMON, e.g.
  26. >
  27. >change
  28. >
  29. >       DIMENSION BIG(1000000)
  30. >to
  31. >
  32. >       DIMENSION BIG(1000000)
  33. >       COMMON /BIGCOM/BIG
  34. >
  35. >and don't compile with -K. You'll have to figure out which modules you can use this on.
  36.  
  37. It's simpler to say SAVE BIG (or SAVE LITTLE if LITTLE is really the
  38. variable that needs to stick around from one invocation to the next).
  39.  
  40. -- 
  41. vsnyder@jato.Jpl.Nasa.Gov   vsnyder@math.Jpl.Nasa.Gov  <-- preferred
  42. ames!elroy!jato!vsnyder     ames!elroy!math!vsnyder
  43. vsnyder@jato.uucp
  44.