home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / edu / 1343 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.8 KB

  1. Xref: sparky comp.edu:1343 comp.lang.fortran:3178
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!gumby!wupost!waikato.ac.nz!aukuni.ac.nz!ecmtwhk
  3. Newsgroups: comp.edu,comp.lang.fortran
  4. Subject: Re: scientists as programmers 
  5. Message-ID: <1992Aug26.082555.8222@ccu1.aukuni.ac.nz>
  6. From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
  7. Date: Wed, 26 Aug 1992 08:25:55 GMT
  8. References: <1992Aug26.022458.12622@wl.com>
  9. Organization: University of Auckland, New Zealand.
  10. Keywords: supercomputer Fortran
  11. Lines: 33
  12.  
  13. schuette@wl.com (Wade Schuette) writes:
  14.  
  15. >For that matter, does anyone know if the current supercomputer
  16. >compilers are bright enough to watch their own output actually run
  17. >and learn from it so on their NEXT pass they can stop guessing and 
  18. >make better decisions as to how to optimize the data-dependent sections
  19. >of code?  Or are humans still supposed to do THAT as well?
  20.  
  21. Current supercomputer compilers still depend to a large extent on
  22. local compiler options, like the C$DIR IVDEP - lines for the Crays.
  23. Some of them are a bit more sophisticated; a Fujistu VP will vectorize
  24. code like
  25.  
  26.       K = 1
  27.       DO 10 I=1, N
  28.      IF (A(I).GT.0.) THEN
  29.         A(K) = A(I)
  30.         K = K+1
  31.          ENDIF
  32.  10   CONTINUE
  33.  
  34. if you assert that I.GE.K for the whole body of the loop. This kind of
  35. assertion can be pretty dangerous, however; if you get it wrong, your
  36. program will give you wrong results.
  37.  
  38. FORTRAN 90 will hopefully eliminate most of the need for sprinkling a
  39. program with options, once it comes into widespread use. One thing it
  40. will not eliminate, however, is the need to choose data structures
  41. carefully before ever writing the first line of code.
  42. -- 
  43. Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
  44. The joy of engineering is to find a straight line on a double logarithmic
  45. diagram.
  46.