home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / arch / 9347 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  6.7 KB

  1. Xref: sparky comp.arch:9347 sci.math:11238 comp.lang.misc:3012 comp.lang.fortran:3508 comp.edu:1618
  2. Newsgroups: comp.arch,sci.math,comp.lang.misc,comp.lang.fortran,comp.edu
  3. Path: sparky!uunet!mcsun!dxcern!dscomsa.desy.de!zeus02.desy.de!hallam
  4. From: hallam@zeus02.desy.de (Phill Hallam-Baker)
  5. Subject: Re: Scientists as Programmers (was Re: Small Language Wanted)
  6. Message-ID: <1992Sep10.234239.19820@dscomsf.desy.de>
  7. Sender: news@dscomsf.desy.de (USENET News System)
  8. Nntp-Posting-Host: zws006.desy.de
  9. Reply-To: Hallam@zeus02.desy.de
  10. Organization: Deutsches Elektronen Synchrotron, Experiment ZEUS bei HERA
  11. References: <Btx4vF.Jx6@mentor.cc.purdue.edu> <92Sep1.205116edt.669@neuron.ai.toronto.edu> <1992Sep4.162938.29237@dscomsf.desy.de> <Bu2r42.5xr@mentor.cc.purdue.edu>
  12. Date: Thu, 10 Sep 1992 23:42:39 GMT
  13. Lines: 136
  14.  
  15. In article <Bu2r42.5xr@mentor.cc.purdue.edu>, hrubin@pop.stat.purdue.edu (Herman
  16. Rubin) writes:
  17.  
  18. |>In article <1992Sep4.162938.29237@dscomsf.desy.de> Hallam@zeus02.desy.de
  19. |>writes:
  20.  
  21. |>>This is just the generic language war taken to root. Of course no language
  22. |>can
  23. |>>provide more capabilities than machine code. However this is irrelevant
  24. |>since
  25. |>>working at such a low level of abstraction is too error prone to be feasible
  26. |>for
  27. |>>anything like a large project.
  28. |>
  29. |>None of the features I have mentioned are at "such a low level of
  30. |>abstraction."
  31. |>These are naturally occurring operations and conditions.  There are many more
  32. |>of them.  If the language does not permit these things, one has to work
  33. |>around
  34. |>them, and these workarounds are likely to be less portable than the
  35. |>constructs.
  36. |>
  37. |>The constructs of the language do need translation into machine code, and of
  38. |>course this is non-portable.  But it should be possible to use these
  39. |>constructs
  40. |>without necessarily translating them clumsily into the machinery which the
  41. |>language designers decided was "adequate."  A major reason for the success
  42. |>of English is that there is no attempt to keep the language "pure."
  43.  
  44. Yeah, I tend to spend most of my time using an assembly language that can be
  45. ported to any machine, it has quite a few HLL features too you know, its called
  46. C.
  47.  
  48. |>>The machine instruction set is of very little relevance since it is very
  49. |>rarely
  50. |>>the case that the target machine is known. I can predict the machines we will
  51. |>be
  52. |>>using for the next 18 months/2 years, no more. We will certainly have at
  53. |>least 3
  54. |>>major manufacturers involved. People who piddle about optimising their code
  55. |>to a
  56. |>>particular machine end up stuck with it. This is OK for embedded controllers
  57. |>>which we rarely change but not for general purpose stuff.
  58. |>
  59. |>Again, there can be improvement by using machine-independent constructs, 
  60. |>implemented in a machine-dependent manner.  
  61.  
  62. Generally if we are that desperate for speed we use a DSP, forget machine code,
  63. lets go for the microcode level.
  64.  
  65.  
  66. |>>We run massively parrallel machines and have a massive data rate to cope
  67. |>with.
  68. |>>Thats why we *have* to use high level languages, the complexity of the
  69. |>problem
  70. |>>is too great to allow use of machine code.
  71. |>
  72. |>Wrong again!  Massively parallel machines require, for efficiency, the
  73. |>elimination of branches as much as possible.
  74.  
  75. Bollocks (to put it politiely).
  76.  
  77. Massively parallel machines are very rarely compute bound, the big problem is
  78. being communications bound.
  79.  
  80. |>  This calls for really CISC
  81. |>architecture, and quite a few tricks not envisioned by the HLL designers.
  82.  
  83. Nope, we run RISC architecture, 1000 processors, 2000 DSPs. Since the HLL
  84. designers also designed our chip I guess they anticipated themselves.
  85.  
  86. |>A switch operator is likely to end up taking every branch, so every
  87. |>processor spends the time for every branch.  It is more important that
  88. |>massively parallel machines find a way to reduce this than to avoid
  89. |>machine instructions, especially if the machine instructions can eliminate
  90. |>branches, as is often the case.
  91.  
  92. Only if you are hung up on vector machines. I never saw anyone get one of those
  93. things really cranked up well except when they had a problem that fitted nicely
  94. into rectangular boxes. Ours does not fit into such boxes and branches like
  95. crazy. In any case we require substantialy more than any vector machine ever
  96. built can deliver. If you consider Amdahls law for a moment you will recall that
  97. for n processors you must parallelize at least an (n-1)/n th of the code. This
  98. is why it is worth constructing a control system per processing unit.
  99.  
  100. I will agree that on a SIMD machine you will have problems, probably requiring
  101. you to get into deep machine code. For MIMD you can get good efficiency from
  102. compilers and translators, well at any rate I can. This is one reason why I
  103. think that SIMD is pretty much finished and that the future is more in the MIMD
  104. field. Connection machine LISP was interesting though...
  105.  
  106.  
  107. >>|>This would occasionally be useful. I sometimes look at the output of
  108. >>|>the compiler to see if it is generating reasonable code, and to find
  109. >>|>out if there's any point in my doing certain optimizations at the
  110. >>|>source level (e.g. loop unrolling). This is reasonable for me to do
  111. >>|>because I have years of experience at this sort of thing. It probably
  112. >>|>isn't reasonable for you to do it.
  113.  
  114. |>>If we needed that type of optimisation we would either buy a compiler which
  115. |>did
  116. |>>it or write our own.
  117. |>
  118. |>Not all of us have this option.  Those of us who are in American universities
  119. |>rarely have either choice.  Also, I doubt if one could buy such a compiler at
  120. |>this time.
  121.  
  122. There are several approaches to loop unrolling, one is to take such great tools
  123. as AWK or PERL and use them to unroll the loop. Alternatively write a parser for
  124. C with yacc and splice in a back end that writes out C with loops unwound. The
  125. meta language Goedel can be used to produce the same effect although it's not
  126. yet avaliable outside ZEUS.
  127.  
  128. It is a sad fact but most people when they "optimise" code work by applying a
  129. set of rules. Generalising these into a compiler is not that difficult to do.
  130.  
  131.  
  132. |>>We shiould stop calling it Computer Science and call it engineering.
  133. |>
  134. |>>Machine code is important, CS graduates should know how to build compilers
  135. |>and
  136. |>>processors.
  137.  
  138. I'll agree to that! But the point of learning machine code is that without
  139. knowing what it is you can't form a meaningful idea of how the machines work and
  140. how to optimize code for them. Having to understand machine code is not however
  141. the same as having to use it to solve every problem.
  142.  
  143. One thing computer scientists should know is the sort of approach that is most
  144. likely to solve the problem (the best will also be able to recognise what the
  145. problem is, these are called politicians). This means building tools,
  146. assemblers, compilers translators etc.
  147.  
  148. --
  149.  
  150. Phill Hallam-Baker
  151.