Invitation to Embarrassingly Parallel Computing Barbara J

Invitation to Embarrassingly Parallel Computing Barbara J

Invitation to embarrassingly parallel computing Barbara J. Breen and Christine E. Weidert Physics Department, The University of Portland, Portland, Oregon 97203 John F. Lindner, Lisa May Walker, Kasey Kelly, and Evan Heidtmann Physics Department, The College of Wooster, Wooster, Ohio 44691 ͑Received 2 September 2007; accepted 18 December 2007͒ A surprising number of physical systems problems are well suited to “embarrassingly parallelЉ computations which do not require complicated algorithms or specialized hardware. As faculty and students at small institutions, we are readily incorporating parallel computing in diverse levels of our curricula and are embracing the opportunity to utilize high performance computing to do cutting edge research. We describe three typical examples: spatiotemporal patterns of one-way coupled oscillators, ray-tracing in curved spacetime, and solar escape as a three-body problem. © 2008 American Association of Physics Teachers. ͓DOI: 10.1119/1.2834738͔ I. INTRODUCTION its descendants͒ that solves a piece of the problem for some parameters. To solve the entire problem, we run multiple jobs Until recently, the idea of parallel computing might have across a range of parameters on remote computers. We seemed intimidating to many physics departments with lim- automate4 the distribution of jobs using a few short scripts, ited computing resources. Specialized supercomputers were which are collections of Unix commands. To demonstrate very expensive and required their own support staff. Further- that distributing the jobs requires only a small knowledge of more, many interesting physical systems are difficult to par- Unix and shell scripting, the Appendix contains a transcript allelize, and the necessary algorithms are the subject of re- of a complete terminal session using Xgrid in a Bash shell to search in computer science. perform a parallel computation. This perception began to change about a decade ago when the first Beowulf clusters1 were developed. These were typi- cally inexpensive personal computers running a Unix oper- II. ONE-WAY COUPLING ating system and connected via Ethernet. What is perhaps still under-appreciated is the richness and diversity of inter- The dynamics of arrays of one-way coupled oscillators5,6 esting physical systems that are easily parallelizeable. There are of much interest. One-way coupling might seem impos- are many problems where inter-computer or inter-processor sible because it appears to violate Newton’s third law. How- communication is unnecessary, and the speed-up of the cor- ever, such systems can be built if the position of one oscil- responding computation can be proportional to the number lator modifies the external force acting on a neighboring of processors used. We refer to such computations as “em- oscillator.7 barrassingly parallel,” not because the technique is embar- We model the oscillators by a bistable potential energy rassing, but because it is embarrassingly simple to imple- function, ment. There is no special infrastructure, no sophisticated ͓ ͔ 1 2 1 4 ͑ ͒ parallel algorithms, and no need to use a message passing V x =− 2 ax + 4 bx , 1 interface. where a and b determine the height and width of the barrier In this article we describe how we are using embarrass- separating the two stable equilibria. Such potentials can ingly parallel computing to study a variety of interesting re- model a wide variety of systems, from a simple light switch search problems that are accessible to students and appropri- to a threshold-mitigated neuron.8 Arrays of such oscillators ate for independent study and the upper-level physics have been studied extensively because they are robust mod- ͑ ͒ curriculum. In one case Portland , we are using a dedicated els of a variety of physical systems, from mattress springs to ͑ ͒ rack-mounted computer cluster. In another case Wooster , neural networks. We add noise to make them more realistic we are using the spare cycles of otherwise idle computer and phenomenologically richer. classrooms. A well-studied equation of motion for the nth oscillator in We do have one advantage: our computers run not just such an array is Unix, but Mac OS X,2 which supports Xgrid,3 the first dis- ͓ ͔ ␥ ␬͑ ͒ ␬͑ ͒ ␰ tributed computing architecture built into a desktop operating mx¨n =−VЈ xn − x˙n + xn − xn+1 + xn − xn−1 + n, system. Xgrid enables the user to add a Mac OS X computer ͑2͒ to a cluster by clicking a checkbox in a system preferences panel. It facilitates the submission and retrieval of jobs and where an overdot denotes time differentiation and a prime can automatically lower its priority if someone else uses a denotes space differentiation, xn is the displacement of the computer in the cluster. Although Xgrid is an advantage, our nth oscillator, m is its mass, ␥ is the damping coefficient, ␬ is ␰ ͓ ͔ main message, including our distribution strategies and the coupling constant, and n t represents the noise. ␬͑ ͒ physical examples, applies to any kind of computer cluster. For one-way coupling, we eliminate the xn −xn+1 term To accomplish our parallel computation, we utilize the C in Eq. ͑2͒. For simplicity, we study the overdamped case and family of programming languages and a Unix operating sys- neglect the inertial term relative to the viscous term, so that tem. We first write a job, a computer program in C ͑or one of the equation of motion thus becomes 347 Am. J. Phys. 76 ͑4&5͒, April/May 2008 http://aapt.org/ajp © 2008 American Association of Physics Teachers 347 Fig. 2. The spacetime complexity C as a function of ␬ and D for an array of length N=161. The terrain colors represent complexity, with blue sea being Fig. 1. Matrix of spacetime plots depicting the oscillator speed S as a func- low and white mountain being high. This complexity metric reliably quan- tion of the coupling strength ␬ and noise D for an array of length N=161. In tifies the behavior in Fig. 1. each plot, time increases to the right and oscillator number increases up- ward. The spacetime behavior is complicated for small coupling and large noise, but is simple for large coupling and small noise. grate the set of stochastic differential equations at different points in their parameter space. Each calculation is indepen- dent of the other and does not require messages to be passed ␥ ͓ ͔ ␬͑ ͒ ␰ ͑ ͒ x˙n =−VЈ xn + xn − xn+1 + n. 3 between processors. We code a range of coupling values and distribute a small To implement periodic boundary conditions, we couple the range of noise values to each processor in our cluster. Each last oscillator to the first, creating a ring. processor returns a value of C for given values of ␬ and D, Ideal white noise has the same power at all frequencies. which we combine to visualize the complexity as a function However, because viscosity suppresses high frequency dy- of coupling and noise, as in Fig. 2. namics, our noise is colored. We assume it is Gaussian The complexity C quantifies our observations of the spa- shaped and exponentially correlated and characterized by tiotemporal behavior of the one-way coupled arrays. In gen- three interdependent parameters, eral, C is largest for small ␬ and large D and smallest for D = ␴2␶. ͑4͒ large ␬ and small D. Contours of constant complexity are parabolic, which is likely related to the creation and annihi- The noise intensity D is a measure of the noise power per lation of soliton pairs by intermediate values of the noise and 2 unit frequency. The variance, ␴ , is the square of the width of coupling and is the focus of ongoing research. the noise probability distribution. The correlation time, ␶,is The ability to sweep the parameter space of such a non- the time over which the noise values are closely related. linear system to assess its range of behavior is extremely For sufficiently small noise, the array of oscillators useful. Modeling this stochastic system provides an excellent evolves toward a quiescent steady state in which adjacent example for an upper-level course in nonlinear dynamics. oscillators are in opposite wells and the restoring and cou- pling forces are balanced. However, this spatially alternating III. SPINNING BLACK HOLES equilibrium is frustrated in an array with an odd number of elements, resulting in a solitary wave, or soliton, that propa- Black holes are typically formed by the collapse of mas- gates endlessly around the ring. sive stars. In general relativity, the consequent spacetime cur- We numerically integrate the stochastic equations of Eq. vature is so great that the interior of the black hole becomes ͑3͒ using the Euler–Maruyama algorithm, which is the Euler causally disconnected from the rest of the universe. Light algorithm applied to stochastic equations. For such equa- bent around but not into a black hole can cause lensing and tions, higher order algorithms must be modified.9 We gener- other visual distortions, which are a hindrance and an oppor- ate the colored noise using the algorithm of Fox et al.10 tunity for astronomers. For example, the interpretation of Figure 1 is a matrix of spacetime plots of the oscillator black hole accretion disk observations requires and reveals speed S at different coupling strengths and noise intensities, detailed knowledge of how black holes affect spacetime. with the initial transient dynamics omitted. For small D and Black holes are completely determined by their mass, large ␬, and an odd number N of elements, only a single spin, and charge. The Kerr–Newman solution12 to Einstein’s soliton propagates around the ring. The soliton speed in- equations completely describes the corresponding spacetime. creases with increasing coupling. For intermediate noise and The solution can be expressed as a generalization of the coupling, soliton pairs are created and annihilated.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us