Path: utzoo!attcan!uunet!jarthur!usc!zaphod.mps.ohio-state.edu!swrinde!emory!hubcap!rjc From: rjc@cs.ucla.edu (Robert Collins) Newsgroups: comp.parallel Subject: Re: Ease of programming (was Re: Acceptable efficiency factors) Message-ID: <9554@hubcap.clemson.edu> Date: 3 Jul 90 17:22:16 GMT Sender: fpst@hubcap.clemson.edu Lines: 67 Approved: parallel@hubcap.clemson.edu In article <9549@hubcap.clemson.edu> philip@Minnie.Stanford.EDU (Philip Machanick) writes: > >In article <9521@hubcap.clemson.edu>, argosy!ian@decwrl.dec.com (Ian L. >Kaplan) writes: >> Perhaps the difference in the execution efficiency between the Intel >> cube (an MIMD machine) and the CM-2 (a SIMD machine) is due to the >> fact (not doubt hotly contested) that SIMD systems are easier to >> program. [...] >I have recently had an experience of porting a program originally >written for a vector architecture to a shared-memory (MIMD) architecture. >Although the original program was written in C, [editted] . My remodelled >program was written in C++, using object-oriented programming [editted] > There were two major reasons >for this approach: objects aggregated related data, which made for >better caching performance, and object-oriented programming made the >program more easily modifiable (for example, we were modeling gases, >and it would have been a relatively trivial change to introduce >subclasses to model a multiple-specie gas). Another benefit was I used >subclassing to represent boundary conditions (a cell representing a >region of space was subclassed to represent walls etc.). Sure, I had to >worry about synchronization and load balance, but I found the resulting >program much easier to understand. Synchronization bugs were trivial >compared with the problems I had with understanding details of the >original program. Philip, you say lots about the advantages of programming in C++ vs. FORTRAN, but nothing about programming MIMD vs. SIMD. Ian is right, SIMD is very much easier to program. Imagine what would happen if you programmed a SIMD computer from C++! I have been doing this for a couple of years now, and never want to go back to C, and never want to write a MIMD program. If I ever have to write a program for a MIMD machine, I hope I can do it in a data parallel language. (I have become convinced that the best method for programming in many situations is a data parallel model, built on top of MIMD hardware. This gives us the best of both worlds: ease of programming, and fast execution of conditionals.) rob collins -- ------------------------------------------------------------------------------- rjc@cs.ucla.edu CM++ on the CM2: The only way to fly. -------------------------------------------------------------------------------