Explicit and Implicit Parallel Functional Programming: Concepts and Implementation

Total Page:16

File Type:pdf, Size:1020Kb

Explicit and Implicit Parallel Functional Programming: Concepts and Implementation Explicit and Implicit Parallel Functional Programming: Concepts and Implementation Dissertation zur Erlangung des Doktorgrades der Naturwissenschaften (Dr. rer.nat.) dem Fachbereich Mathematik und Informatik der Philipps-Universitat¨ Marburg vorgelegt von Jost Berthold aus Kassel Marburg/Lahn, 2008 Vom Fachbereich Mathematik und Informatik der Philipps-Universit¨at Marburg als Dissertation am 6.6.2008 angenommen. Erstgutachter: Prof. Dr. Rita Loogen Zweitgutachter: Prof. Dr. Greg Michaelson Tag der m¨undlichen Pr¨ufung am 16.6.2008 Zusammenfassung (deutsch) Die vorliegende Arbeit beschreibt Konzepte zur parallelen Programmierung mit funktionalen Sprachen und deren Implementierung, insbesondere parallele Haskell- Dialekte und die Sprache Eden. Wir gehen der Frage nach, welche grundlegenden Koordinationskonstrukte und welcher Grad an expliziter Ausf¨uhrungskontrolle n¨otig und n¨utzlich f¨ur eine funktionale Implementierung paralleler Koordination sind. In der heutigen Zeit von globaler Vernetzung und Mehrkernprozessoren wird die parallele Programmierung immer wichtiger. Dennoch sind nach wie vor Programmiermodelle verbreitet, die kaum von den Hardwareeigenschaften ab- strahieren und sich daher zwangsl¨aufig in technischen Details verlieren. Funk- tionale Sprachen erlauben aufgrund ihrer Abstraktion und mathematischen Natur, die gegen¨uber sequenziellen Programmen erheblich h¨ohere Komplexit¨at paralleler Programme zu erfassen, sie erm¨oglichen ein abstrakteres Nachdenken ¨uber paral- lele Programme. Dabei taucht unvermeidlich die oben formulierte Leitfrage auf, zu welchem Grad explizite Kontrolle der Ausf¨uhrung n¨otig und n¨utzlich ist, um effiziente parallele Programme zu schreiben, wenn diese wiederum abstraktere Kontrollkonstrukte implementieren und insbesondere in der sog. skelettbasierten Programmierung, welche g¨angige Muster der Parallelverarbeitung abstrakt als Funktionen h¨oherer Ordnung beschreibt. Wir beschreiben unsere Implementierung f¨ur die Sprache Eden, welche hier- archisch in Schichten organisiert ist. Die unterste, direkt implementierte Schicht stellt nur sehr einfache Primitive f¨ur Parallelverarbeitung bereit, komplexere Kon- trollkonstrukte werden in der funktionalen Sprache Haskell implementiert. Neben der Implementierung von Eden stellen die implementierten Primi- tive f¨ur sich genommen bereits Kontrollkonstrukte zur Parallelverarbeitung dar. Aus der Implementierung abgeleitet wird die funktionale Sprache EdI (‘ED’en- ’I’mplementierungssprache) vorgeschlagen, die auf niedrigem Abstraktionsniveau Haskell um orthogonale, grundlegend notwendige Konstrukte zur Koordination paralleler Berechnungen erweitert: Auswertungskontrolle, Nebenl¨aufigkeit, Pro- zesserzeugung, Kommunikation und Information ¨uber verf¨ugbare Ressourcen. Die grundlegende Systemunterst¨utzung von EdI und das Implementierungs- konzept lassen sich mit nur geringen Modifikationen auf andere Implementierun- gen (und Berechnungssprachen) ¨ubertragen. Aufgrund seiner Flexibilit¨at und der funktionalen Basis bietet unser Ansatz großes Potenzial f¨ur modellgest¨utzte Ans¨atze zur automatischen Verwaltung paralleler Berechnungen und f¨ur die Ve- rifikation von Systemeigenschaften. Wir beschreiben das allgemeine Design eines generischen Systems zur hierarchischen Implementierung paralleler Haskell-Er- weiterungen, eine Prototyp-Implementierung f¨ur adaptive Scheduling-Konzepte und eine Machbarkeitsstudie f¨ur virtuellen globalen Speicher. Anwendungsgebiet f¨ur die Evaluation der Sprache EdI ist die Implemen- tierung abstrakterer Konstrukte, insbesondere paralleler Skelette, auf die wir uns iii in einem weiteren Teil der Dissertation konzentrieren. Skelette beschreiben paral- lelisierbare Algorithmen und parallele Verarbeitungsmuster abstrakt als Funktio- nen h¨oherer Ordnung und verbergen ihre parallele Implementierung. Somit bieten sie ein (gegen¨uber der Programmierung mit Eden oder EdI) h¨oheres Abstrak- tionsniveau, entziehen aber dem Programmierer die explizite Parallelit¨atskontrolle. F¨ur einen Vergleich der Ausdrucksst¨arke und Pragmatik werden exemplarisch Implementierungen f¨ur verschiedene parallele Skelette in der Sprache Eden und ihrer Implementierungssprache EdI beschrieben. Wir untersuchen neben ein- schl¨agigen Vertretern dieser “algorithmischen Skelette” eine andere Art Skelette, welche anstelle der Algorithmik die Interaktion von Prozessen in regul¨arer Anord- nung beschreiben und f¨ur die wir den Begriff Topologieskelette gepr¨agt haben. Durch die zus¨atzlichen nicht-funktionalen Konstrukte in Eden haben Eden und EdI im Ergebnis die gleiche Ausdrucksst¨arke, wobei aber die abstrakteren Eden-Konstrukte essenzielle Seiteneffekte und Nebenl¨aufigkeit verbergen. Durch die in EdI (im Gegensatz zu Eden) explizite Kommunikation lassen sich Skelett- Implementierungen besser lesen und an besondere Bed¨urfnisse anpassen. Die explizitere Sprache EdI findet ihr origin¨ares Anwendungsgebiet in der Skelettim- plementierung, -anpassung und -optimierung. Demgegen¨uber ist ein klarer Plus- punkt von Eden die automatische (durch eine Typklasse und geeignete Uberladung¨ definierte) Stream- und Tupelkommunikation. Letztere kann in EdI unver¨andert ¨ubernommen werden, sollte hier aber, gem¨aß der EdI-Philosophie, explizit und gezielt vom Programmierer eingesetzt werden. Ergebnisse im Uberblick:¨ • die Definition der Sprache EdI, Haskell mit expliziten Prozesskontroll- und Kommunikationskonstrukten. EdI erweitert Haskell um orthogonale, grundlegend notwendige Konstrukte zur Koordination paralleler Berech- nungen: Auswertungskontrolle, Nebenl¨aufigkeit, Prozesserzeugung, Kom- munikation und Information ¨uber verf¨ugbare Ressourcen. Einsatzgebiet der Sprache ist die Implementierung komplexerer Koordinationskonstrukte. • eine strukturierte Implementierung von Eden, deren Konzepte in einem allgemeineren Kontext tragf¨ahig sind. • das Design und eine Prototypimplementierung f¨ur ein generisches System zur Implementierung abstrakterer Kontrollkonstrukte, insbesondere f¨ur eine automatisierte dynamische Steuerung paralleler Berechnungen. • neu entwickelte bzw. alternative Skelett-Implementierungen f¨ur algorith- mische und Topologie-Skelette, f¨ur einen Vergleich von EdI und Eden. • der exemplarische Nachweis, dass funktionale Sprachen ein ad¨aquates Ab- straktionsniveau bieten, um Strukturen der Parallelverarbeitung zu erfassen. iv Abstract This thesis investigates the relation between the two conflicting goals of explicit- ness and abstraction, for the implementation of parallel functional languages and skeletons. Necessary and useful coordination features for implementing parallel coordination in a functional implementation language will be identified, leading to the proposal of a Haskell extension for explicit low-level coordination, and to a concept of structuring implementations for parallel functional languages in layers of increasing abstraction. The first main part concentrates on implementation techniques and require- ments. We are describing the layered implementation of the parallel functional language Eden, pointing out advantages of its layer structure and deriving the coordination features of the proposed explicit low-level language, named EdI. Subsequently, the presented implementation concept is generalised to the design and a prototype implementation of a generic parallel runtime system for man- agement of parallel functional computations, major parts of which are encoded in Haskell. In a second main part, we concentrate on implementations of parallel skele- tons, thereby investigating expressiveness and pragmatics of the proposed low- level language EdI in comparison to the language Eden. Exemplarily, a range of implementations is presented for data parallel skeletons implementing map, map-reduce, and the Google-MapReduce programming model. Furthermore, we present and discuss a new skeleton category: topology skeletons, which describe interaction and communication patterns in regularly structured process networks. In a broader context, the implementation concepts and skeleton implemen- tations which we present underline that functional languages provide a suitable abstraction level to reason about parallel programming and to circumvent its complexity. v Thank You! First of all, I would like to thank my supervisor, Prof. Dr. Rita Loogen for her support and inspirations over the last years, which gave me the chance to develop the ideas I am going to present. I appreciate the opportunity to use the Beowulf clusters of the Heriot-Watt University for my series of tests. Personal acknowledgements go to people who I enjoyed working with and who provided important impulses for my research: Hans-Wolfgang Loidl (formerly Heriot-Watt, now LMU Munich), Phil Trinder and Greg Michaelson (Heriot-Watt), Kevin Hammond (St.Andrews), Abyd Al Zain (Heriot-Watt), and my new colleague Mischa Dieterle. I also would like to thank many nice people who are working in related areas and which I have met at conferences and workshops. It has been a pleasure to meet you, and some of you have become more than just professional colleagues. Furthermore, I may thank other good friends and former friends for the personal support and new perspectives they offered. You know who you are! Last, but not least, hugs to my parents for their support, especially to my mother, who repeatedly struggled with my computer science slang and my english skills – and who would surely spot a number of flaws on this page. Dedicated to µ, D., and β – who should know. vi Contents I Introduction and background
Recommended publications
  • The Importance of Data
    The landscape of Parallel Programing Models Part 2: The importance of Data Michael Wong and Rod Burns Codeplay Software Ltd. Distiguished Engineer, Vice President of Ecosystem IXPUG 2020 2 © 2020 Codeplay Software Ltd. Distinguished Engineer Michael Wong ● Chair of SYCL Heterogeneous Programming Language ● C++ Directions Group ● ISOCPP.org Director, VP http://isocpp.org/wiki/faq/wg21#michael-wong ● [email protected][email protected] Ported ● Head of Delegation for C++ Standard for Canada Build LLVM- TensorFlow to based ● Chair of Programming Languages for Standards open compilers for Council of Canada standards accelerators Chair of WG21 SG19 Machine Learning using SYCL Chair of WG21 SG14 Games Dev/Low Latency/Financial Trading/Embedded Implement Releasing open- ● Editor: C++ SG5 Transactional Memory Technical source, open- OpenCL and Specification standards based AI SYCL for acceleration tools: ● Editor: C++ SG1 Concurrency Technical Specification SYCL-BLAS, SYCL-ML, accelerator ● MISRA C++ and AUTOSAR VisionCpp processors ● Chair of Standards Council Canada TC22/SC32 Electrical and electronic components (SOTIF) ● Chair of UL4600 Object Tracking ● http://wongmichael.com/about We build GPU compilers for semiconductor companies ● C++11 book in Chinese: Now working to make AI/ML heterogeneous acceleration safe for https://www.amazon.cn/dp/B00ETOV2OQ autonomous vehicle 3 © 2020 Codeplay Software Ltd. Acknowledgement and Disclaimer Numerous people internal and external to the original C++/Khronos group, in industry and academia, have made contributions, influenced ideas, written part of this presentations, and offered feedbacks to form part of this talk. But I claim all credit for errors, and stupid mistakes. These are mine, all mine! You can’t have them.
    [Show full text]
  • Concurrent Cilk: Lazy Promotion from Tasks to Threads in C/C++
    Concurrent Cilk: Lazy Promotion from Tasks to Threads in C/C++ Christopher S. Zakian, Timothy A. K. Zakian Abhishek Kulkarni, Buddhika Chamith, and Ryan R. Newton Indiana University - Bloomington, fczakian, tzakian, adkulkar, budkahaw, [email protected] Abstract. Library and language support for scheduling non-blocking tasks has greatly improved, as have lightweight (user) threading packages. How- ever, there is a significant gap between the two developments. In previous work|and in today's software packages|lightweight thread creation incurs much larger overheads than tasking libraries, even on tasks that end up never blocking. This limitation can be removed. To that end, we describe an extension to the Intel Cilk Plus runtime system, Concurrent Cilk, where tasks are lazily promoted to threads. Concurrent Cilk removes the overhead of thread creation on threads which end up calling no blocking operations, and is the first system to do so for C/C++ with legacy support (standard calling conventions and stack representations). We demonstrate that Concurrent Cilk adds negligible overhead to existing Cilk programs, while its promoted threads remain more efficient than OS threads in terms of context-switch overhead and blocking communication. Further, it enables development of blocking data structures that create non-fork-join dependence graphs|which can expose more parallelism, and better supports data-driven computations waiting on results from remote devices. 1 Introduction Both task-parallelism [1, 11, 13, 15] and lightweight threading [20] libraries have become popular for different kinds of applications. The key difference between a task and a thread is that threads may block|for example when performing IO|and then resume again.
    [Show full text]
  • (CITIUS) Phd DISSERTATION
    UNIVERSITY OF SANTIAGO DE COMPOSTELA DEPARTMENT OF ELECTRONICS AND COMPUTER SCIENCE CENTRO DE INVESTIGACION´ EN TECNOLOX´IAS DA INFORMACION´ (CITIUS) PhD DISSERTATION PERFORMANCE COUNTER-BASED STRATEGIES TO IMPROVE DATA LOCALITY ON MULTIPROCESSOR SYSTEMS: REORDERING AND PAGE MIGRATION TECHNIQUES Author: Juan Angel´ Lorenzo del Castillo PhD supervisors: Prof. Francisco Fernandez´ Rivera Dr. Juan Carlos Pichel Campos Santiago de Compostela, October 2011 Prof. Francisco Fernandez´ Rivera, professor at the Computer Architecture Group of the University of Santiago de Compostela Dr. Juan Carlos Pichel Campos, researcher at the Computer Architecture Group of the University of Santiago de Compostela HEREBY CERTIFY: That the dissertation entitled Performance Counter-based Strategies to Improve Data Locality on Multiprocessor Systems: Reordering and Page Migration Techniques has been developed by Juan Angel´ Lorenzo del Castillo under our direction at the Department of Electronics and Computer Science of the University of Santiago de Compostela in fulfillment of the requirements for the Degree of Doctor of Philosophy. Santiago de Compostela, October 2011 Francisco Fernandez´ Rivera, Profesor Catedratico´ de Universidad del Area´ de Arquitectura de Computadores de la Universidad de Santiago de Compostela Juan Carlos Pichel Campos, Profesor Doctor del Area´ de Arquitectura de Computadores de la Universidad de Santiago de Compostela HACEN CONSTAR: Que la memoria titulada Performance Counter-based Strategies to Improve Data Locality on Mul- tiprocessor Systems: Reordering and Page Migration Techniques ha sido realizada por D. Juan Angel´ Lorenzo del Castillo bajo nuestra direccion´ en el Departamento de Electronica´ y Computacion´ de la Universidad de Santiago de Compostela, y constituye la Tesis que presenta para optar al t´ıtulo de Doctor por la Universidad de Santiago de Compostela.
    [Show full text]
  • Intel® Oneapi Programming Guide
    Intel® oneAPI Programming Guide Intel Corporation www.intel.com Notices and Disclaimers Contents Notices and Disclaimers....................................................................... 5 Chapter 1: Introduction oneAPI Programming Model Overview ..........................................................7 Data Parallel C++ (DPC++)................................................................8 oneAPI Toolkit Distribution..................................................................9 About This Guide.......................................................................................9 Related Documentation ..............................................................................9 Chapter 2: oneAPI Programming Model Sample Program ..................................................................................... 10 Platform Model........................................................................................ 14 Execution Model ...................................................................................... 15 Memory Model ........................................................................................ 17 Memory Objects.............................................................................. 19 Accessors....................................................................................... 19 Synchronization .............................................................................. 20 Unified Shared Memory.................................................................... 20 Kernel Programming
    [Show full text]
  • Executable Modelling for Highly Parallel Accelerators
    Executable Modelling for Highly Parallel Accelerators Lorenzo Addazi, Federico Ciccozzi, Bjorn¨ Lisper School of Innovation, Design, and Engineering Malardalen¨ University -Vaster¨ as,˚ Sweden florenzo.addazi, federico.ciccozzi, [email protected] Abstract—High-performance embedded computing is develop- development are lagging behind. Programming accelerators ing rapidly since applications in most domains require a large and needs device-specific expertise in computer architecture and increasing amount of computing power. On the hardware side, low-level parallel programming for the accelerator at hand. this requirement is met by the introduction of heterogeneous systems, with highly parallel accelerators that are designed to Programming is error-prone and debugging can be very dif- take care of the computation-heavy parts of an application. There ficult due to potential race conditions: this is particularly is today a plethora of accelerator architectures, including GPUs, disturbing as many embedded applications, like autonomous many-cores, FPGAs, and domain-specific architectures such as AI vehicles, are safety-critical, meaning that failures may have accelerators. They all have their own programming models, which lethal consequences. Furthermore software becomes hard to are typically complex, low-level, and involve explicit parallelism. This yields error-prone software that puts the functional safety at port between different kinds of accelerators. risk, unacceptable for safety-critical embedded applications. In A convenient solution is to adopt a model-driven approach, this position paper we argue that high-level executable modelling where the computation-intense parts of the application are languages tailored for parallel computing can help in the software expressed in a high-level, accelerator-agnostic executable mod- design for high performance embedded applications.
    [Show full text]
  • Parallel Computing a Key to Performance
    Parallel Computing A Key to Performance Dheeraj Bhardwaj Department of Computer Science & Engineering Indian Institute of Technology, Delhi –110 016 India http://www.cse.iitd.ac.in/~dheerajb Dheeraj Bhardwaj <[email protected]> August, 2002 1 Introduction • Traditional Science • Observation • Theory • Experiment -- Most expensive • Experiment can be replaced with Computers Simulation - Third Pillar of Science Dheeraj Bhardwaj <[email protected]> August, 2002 2 1 Introduction • If your Applications need more computing power than a sequential computer can provide ! ! ! ❃ Desire and prospect for greater performance • You might suggest to improve the operating speed of processors and other components. • We do not disagree with your suggestion BUT how long you can go ? Can you go beyond the speed of light, thermodynamic laws and high financial costs ? Dheeraj Bhardwaj <[email protected]> August, 2002 3 Performance Three ways to improve the performance • Work harder - Using faster hardware • Work smarter - - doing things more efficiently (algorithms and computational techniques) • Get help - Using multiple computers to solve a particular task. Dheeraj Bhardwaj <[email protected]> August, 2002 4 2 Parallel Computer Definition : A parallel computer is a “Collection of processing elements that communicate and co-operate to solve large problems fast”. Driving Forces and Enabling Factors Desire and prospect for greater performance Users have even bigger problems and designers have even more gates Dheeraj Bhardwaj <[email protected]>
    [Show full text]
  • Programming Multicores: Do Applications Programmers Need to Write Explicitly Parallel Programs?
    [3B2-14] mmi2010030003.3d 11/5/010 16:48 Page 2 .......................................................................................................................................................................................................................... PROGRAMMING MULTICORES: DO APPLICATIONS PROGRAMMERS NEED TO WRITE EXPLICITLY PARALLEL PROGRAMS? .......................................................................................................................................................................................................................... IN THIS PANEL DISCUSSION FROM THE 2009 WORKSHOP ON COMPUTER ARCHITECTURE Arvind RESEARCH DIRECTIONS,DAVID AUGUST AND KESHAV PINGALI DEBATE WHETHER EXPLICITLY Massachusetts Institute PARALLEL PROGRAMMING IS A NECESSARY EVIL FOR APPLICATIONS PROGRAMMERS, of Technology ASSESS THE CURRENT STATE OF PARALLEL PROGRAMMING MODELS, AND DISCUSS David August POSSIBLE ROUTES TOWARD FINDING THE PROGRAMMING MODEL FOR THE MULTICORE ERA. Princeton University Keshav Pingali Moderator’s introduction: Arvind in the 1970s and 1980s, when two main Do applications programmers need to write approaches were developed. Derek Chiou explicitly parallel programs? Most people be- The first approach required that the com- lieve that the current method of parallel pro- pilers do all the work in finding the parallel- University of Texas gramming is impeding the exploitation of ism. This was often referred to as the ‘‘dusty multicores. In other words, the number of decks’’ problem—that is, how to
    [Show full text]
  • Control Replication: Compiling Implicit Parallelism to Efficient SPMD with Logical Regions
    Control Replication: Compiling Implicit Parallelism to Efficient SPMD with Logical Regions Elliott Slaughter Wonchan Lee Sean Treichler Stanford University Stanford University Stanford University SLAC National Accelerator Laboratory [email protected] NVIDIA [email protected] [email protected] Wen Zhang Michael Bauer Galen Shipman Stanford University NVIDIA Los Alamos National Laboratory [email protected] [email protected] [email protected] Patrick McCormick Alex Aiken Los Alamos National Laboratory Stanford University [email protected] [email protected] ABSTRACT 1 for t = 0, T do We present control replication, a technique for generating high- 1 for i = 0, N do −− Parallel 2 for i = 0, N do −− Parallel performance and scalable SPMD code from implicitly parallel pro- 2 for t = 0, T do 3 B[i] = F(A[i]) grams. In contrast to traditional parallel programming models that 3 B[i] = F(A[i]) 4 end 4 −− Synchronization needed require the programmer to explicitly manage threads and the com- 5 for j = 0, N do −− Parallel 5 A[i] = G(B[h(i)]) munication and synchronization between them, implicitly parallel 6 A[j] = G(B[h(j)]) 6 end programs have sequential execution semantics and by their nature 7 end 7 end avoid the pitfalls of explicitly parallel programming. However, with- 8 end (b) Transposed program. out optimizations to distribute control overhead, scalability is often (a) Original program. poor. Performance on distributed-memory machines is especially sen- F(A[0]) . G(B[h(0)]) sitive to communication and synchronization in the program, and F(A[1]) . G(B[h(1)]) thus optimizations for these machines require an intimate un- .
    [Show full text]
  • An Outlook of High Performance Computing Infrastructures for Scientific Computing
    An Outlook of High Performance Computing Infrastructures for Scientific Computing [This draft has mainly been extracted from the PhD Thesis of Amjad Ali at Center for Advanced Studies in Pure and Applied Mathematics (CASPAM), Bahauddin Zakariya University, Multan, Pakitsan 60800. ([email protected])] In natural sciences, two conventional ways of carrying out studies and reserach are: theoretical and experimental.Thefirstapproachisabouttheoraticaltreatmment possibly dealing with the mathematical models of the concerning physical phenomena and analytical solutions. The other approach is to perform physical experiments to carry out studies. This approach is directly favourable for developing the products in engineering. The theoretical branch, although very rich in concepts, has been able to develop only a few analytical methods applicable to rather simple problems. On the other hand the experimental branch involves heavy costs and specific arrangements. These shortcomings with the two approaches motivated the scientists to look around for a third or complementary choice, i.e., the use of numerical simulations in science and engineering. The numerical solution of scientific problems, by its very nature, requires high computational power. As the world has been continuously en- joying substantial growth in computer technologies during the past three decades, the numerical approach appeared to be more and more pragmatic. This constituted acompletenewbranchineachfieldofscience,oftentermedasComputational Science,thatisaboutusingnumericalmethodsforsolvingthemathematicalformu- lations of the science problems. Developments in computational sciences constituted anewdiscipline,namelytheScientific Computing,thathasemergedwiththe spirit of obtaining qualitative predictions through simulations in ‘virtual labora- tories’ (i.e., the computers) for all areas of science and engineering. The scientific computing, due to its nature, exists at the overlapping region of the three disciplines, mathematical modeling, numerical mathematics and computer science,asshownin Fig.
    [Show full text]
  • Performance Tuning Workshop
    Performance Tuning Workshop Samuel Khuvis Scientifc Applications Engineer, OSC February 18, 2021 1/103 Workshop Set up I Workshop – set up account at my.osc.edu I If you already have an OSC account, sign in to my.osc.edu I Go to Project I Project access request I PROJECT CODE = PZS1010 I Reset your password I Slides are the workshop website: https://www.osc.edu/~skhuvis/opt21_spring 2/103 Outline I Introduction I Debugging I Hardware overview I Performance measurement and analysis I Help from the compiler I Code tuning/optimization I Parallel computing 3/103 Introduction 4/103 Workshop Philosophy I Aim for “reasonably good” performance I Discuss performance tuning techniques common to most HPC architectures I Compiler options I Code modifcation I Focus on serial performance I Reduce time spent accessing memory I Parallel processing I Multithreading I MPI 5/103 Hands-on Code During this workshop, we will be using a code based on the HPCCG miniapp from Mantevo. I Performs Conjugate Gradient (CG) method on a 3D chimney domain. I CG is an iterative algorithm to numerically approximate the solution to a system of linear equations. I Run code with srun -n <numprocs> ./test_HPCCG nx ny nz, where nx, ny, and nz are the number of nodes in the x, y, and z dimension on each processor. I Download with: wget go . osu .edu/perftuning21 t a r x f perftuning21 I Make sure that the following modules are loaded: intel/19.0.5 mvapich2/2.3.3 6/103 More important than Performance! I Correctness of results I Code readability/maintainability I Portability -
    [Show full text]
  • Regent: a High-Productivity Programming Language for Implicit Parallelism with Logical Regions
    REGENT: A HIGH-PRODUCTIVITY PROGRAMMING LANGUAGE FOR IMPLICIT PARALLELISM WITH LOGICAL REGIONS A DISSERTATION SUBMITTED TO THE DEPARTMENT OF COMPUTER SCIENCE AND THE COMMITTEE ON GRADUATE STUDIES OF STANFORD UNIVERSITY IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY Elliott Slaughter August 2017 © 2017 by Elliott David Slaughter. All Rights Reserved. Re-distributed by Stanford University under license with the author. This work is licensed under a Creative Commons Attribution- Noncommercial 3.0 United States License. http://creativecommons.org/licenses/by-nc/3.0/us/ This dissertation is online at: http://purl.stanford.edu/mw768zz0480 ii I certify that I have read this dissertation and that, in my opinion, it is fully adequate in scope and quality as a dissertation for the degree of Doctor of Philosophy. Alex Aiken, Primary Adviser I certify that I have read this dissertation and that, in my opinion, it is fully adequate in scope and quality as a dissertation for the degree of Doctor of Philosophy. Philip Levis I certify that I have read this dissertation and that, in my opinion, it is fully adequate in scope and quality as a dissertation for the degree of Doctor of Philosophy. Oyekunle Olukotun Approved for the Stanford University Committee on Graduate Studies. Patricia J. Gumport, Vice Provost for Graduate Education This signature page was generated electronically upon submission of this dissertation in electronic format. An original signed hard copy of the signature page is on file in University Archives. iii Abstract Modern supercomputers are dominated by distributed-memory machines. State of the art high-performance scientific applications targeting these machines are typically written in low-level, explicitly parallel programming models that enable maximal performance but expose the user to programming hazards such as data races and deadlocks.
    [Show full text]
  • Cyclerank, Or There and Back Again: Personalized Relevance Scores
    CycleRank, or There and Back Again: Personalized rspa.royalsocietypublishing.org Relevance Scores from Cyclic Research Paths on Directed Graphs Cristian Consonni2; , David Laniado2 and Article submitted to journal Alberto Montresor1 ∗ 1 Subject Areas: DISI, University of Trento, Trento 2 Algorithmic Information Theory, Eurecat - Centre Tecnògic of Catalunya, Barcelona Graph Theory This work was developed while the author was at DISI,∗ University of Trento. Keywords: Graph algorithms, Wikipedia link Surfing the links between Wikipedia articles constitutes network, Relevance ranking, a valuable way to acquire new knowledge related to Personalized PageRank a topic by exploring its connections to other pages. In this sense, Personalized PageRank is a well-known option to make sense of the graph of links between Author for correspondence: pages, and identify the most relevant articles with e-mail: [email protected] respect to a given one; its performance, however, is hindered by pages with high indegree that function as hubs and obtain high scores regardless of the starting point. In this work, we present CycleRank, a novel algorithm based on cyclic paths aimed at finding the most relevant nodes related to a topic. To compare the results of CycleRank with those of Personalized PageRank and other algorithms derived from it, we perform three experiments based on different ground truths. We find that CycleRank aligns better with readers’ behavior as it ranks in higher positions the articles corresponding to links that receive more clicks; it tends to identify in higher position related articles highlighted by editors in the “See also” section; and it is more robust to global hubs of the network having high indegree.
    [Show full text]