GASNet: A Portable High-Performance Communication Layer for Global Address-Space Languages Dan Bonachea In conjunction with the joint UC Berkeley and LBL.

Slides:



Advertisements
Similar presentations
Multiple Processor Systems
Advertisements

The Effect of Network Total Order, Broadcast, and Remote-Write on Network- Based Shared Memory Computing Robert Stets, Sandhya Dwarkadas, Leonidas Kontothanassis,
MINJAE HWANG THAWAN KOOBURAT CS758 CLASS PROJECT FALL 2009 Extending Task-based Programming Model beyond Shared-memory Systems.
Unified Parallel C at LBNL/UCB Implementing a Global Address Space Language on the Cray X1 Christian Bell and Wei Chen.
IBM’s X10 Presentation by Isaac Dooley CS498LVK Spring 2006.
Chapter 6: Process Synchronization
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Sensor Network Platforms and Tools
AMLAPI: Active Messages over Low-level Application Programming Interface Simon Yau, Tyson Condie,
Using DSVM to Implement a Distributed File System Ramon Lawrence Dept. of Computer Science
Computer Systems/Operating Systems - Class 8
Unified Parallel C at LBNL/UCB The Berkeley UPC Compiler: Implementation and Performance Wei Chen, Dan Bonachea, Jason Duell, Parry Husbands, Costin Iancu,
1 Presentation at the 4 th PMEO-PDS Workshop Benchmark Measurements of Current UPC Platforms Zhang Zhang and Steve Seidel Michigan Technological University.
GASNet: A Portable High-Performance Communication Layer for Global Address-Space Languages Dan Bonachea Jaein Jeong In conjunction with the joint UCB and.
DISTRIBUTED AND HIGH-PERFORMANCE COMPUTING CHAPTER 7: SHARED MEMORY PARALLEL PROGRAMMING.
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
Unified Parallel C at LBNL/UCB UPC at LBNL/U.C. Berkeley Overview Kathy Yelick U.C. Berkeley, EECS LBNL, Future Technologies Group.
Unified Parallel C at LBNL/UCB Implementing a Global Address Space Language on the Cray X1: the Berkeley UPC Experience Christian Bell and Wei Chen CS252.
Problems with using MPI 1.1 and 2.0 as compilation targets for parallel language implementations Dan Bonachea & Jason Duell U. C. Berkeley / LBNL
OPERATING SYSTEM OVERVIEW
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
Chapter 13 Embedded Systems
GASNet: A Portable High-Performance Communication Layer for Global Address-Space Languages Dan Bonachea Jaein Jeong In conjunction with the joint UCB and.
Support for Adaptive Computations Applied to Simulation of Fluids in Biological Systems Immersed Boundary Method Simulation in Titanium Siu Man Yau, Katherine.
High Performance Communication using MPJ Express 1 Presented by Jawad Manzoor National University of Sciences and Technology, Pakistan 29 June 2015.
PRASHANTHI NARAYAN NETTEM.
UPC at CRD/LBNL Kathy Yelick Dan Bonachea, Jason Duell, Paul Hargrove, Parry Husbands, Costin Iancu, Mike Welcome, Christian Bell.
Support for Adaptive Computations Applied to Simulation of Fluids in Biological Systems Immersed Boundary Method Simulation in Titanium.
NPACI: National Partnership for Advanced Computational Infrastructure August 17-21, 1998 NPACI Parallel Computing Institute 1 Cluster Archtectures and.
Evaluation of High-Performance Networks as Compilation Targets for Global Address Space Languages Mike Welcome In conjunction with the joint UCB and NERSC/LBL.
Introduction to Symmetric Multiprocessors Süha TUNA Bilişim Enstitüsü UHeM Yaz Çalıştayı
Programming for High Performance Computers John M. Levesque Director Cray’s Supercomputing Center Of Excellence.
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
ICOM 5995: Performance Instrumentation and Visualization for High Performance Computer Systems Lecture 7 October 16, 2002 Nayda G. Santiago.
Unified Parallel C at LBNL/UCB The Berkeley UPC Compiler: Implementation and Performance Wei Chen the LBNL/Berkeley UPC Group.
The MPC Parallel Computer Hardware, Low-level Protocols and Performances University P. & M. Curie (PARIS) LIP6 laboratory Olivier Glück.
© 2010 IBM Corporation Enabling Concurrent Multithreaded MPI Communication on Multicore Petascale Systems Gabor Dozsa 1, Sameer Kumar 1, Pavan Balaji 2,
AN EXTENDED OPENMP TARGETING ON THE HYBRID ARCHITECTURE OF SMP-CLUSTER Author : Y. Zhao 、 C. Hu 、 S. Wang 、 S. Zhang Source : Proceedings of the 2nd IASTED.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
© 2008 IBM Corporation Deep Computing Messaging Framework Lightweight Communication for Petascale Supercomputing Supercomputing 2008 Michael Blocksome,
Unified Parallel C at LBNL/UCB An Evaluation of Current High-Performance Networks Christian Bell, Dan Bonachea, Yannick Cote, Jason Duell, Paul Hargrove,
HPC User Forum Back End Compiler Panel SiCortex Perspective Kevin Harris Compiler Manager April 2009.
Spring 2003CSE P5481 Issues in Multiprocessors Which programming model for interprocessor communication shared memory regular loads & stores message passing.
Kernel Locking Techniques by Robert Love presented by Scott Price.
Lecture 8 Page 1 CS 111 Online Other Important Synchronization Primitives Semaphores Mutexes Monitors.
1: Operating Systems Overview 1 Jerry Breecher Fall, 2004 CLARK UNIVERSITY CS215 OPERATING SYSTEMS OVERVIEW.
1 Qualifying ExamWei Chen Unified Parallel C (UPC) and the Berkeley UPC Compiler Wei Chen the Berkeley UPC Group 3/11/07.
Slide 1 von Eicken et al, "Active Messages: a Mechanism for Integrated Communication and Computation" CS258 Lecture by: Dan Bonachea.
Unified Parallel C Kathy Yelick EECS, U.C. Berkeley and NERSC/LBNL NERSC Team: Dan Bonachea, Jason Duell, Paul Hargrove, Parry Husbands, Costin Iancu,
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles Synchronization Emery Berger and Mark Corner University.
OpenMP for Networks of SMPs Y. Charlie Hu, Honghui Lu, Alan L. Cox, Willy Zwaenepoel ECE1747 – Parallel Programming Vicky Tsang.
Wide-Area Parallel Computing in Java Henri Bal Vrije Universiteit Amsterdam Faculty of Sciences vrije Universiteit.
IEEE Workshop on HSLN 16 Nov 2004 SCI Networking for Shared-Memory Computing in UPC: Blueprints of the GASNet SCI Conduit Hung-Hsun Su, Burton C. Gordon,
Communication Support for Global Address Space Languages Kathy Yelick, Christian Bell, Dan Bonachea, Yannick Cote, Jason Duell, Paul Hargrove, Parry Husbands,
3/12/2013Computer Engg, IIT(BHU)1 PARALLEL COMPUTERS- 2.
UDI Technology Benefits Slide 1 Uniform Driver Interface UDI Technology Benefits.
Cluster Computers. Introduction Cluster computing –Standard PCs or workstations connected by a fast network –Good price/performance ratio –Exploit existing.
Unified Parallel C at LBNL/UCB Berkeley UPC Runtime Report Jason Duell LBNL September 9, 2004.
Background Computer System Architectures Computer System Software.
Unified Parallel C at LBNL/UCB UPC at LBNL/U.C. Berkeley Overview Kathy Yelick LBNL and U.C. Berkeley.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
UPC at NERSC/LBNL Kathy Yelick, Christian Bell, Dan Bonachea,
Outline Other synchronization primitives
Other Important Synchronization Primitives
CMSC 611: Advanced Computer Architecture
Threading And Parallel Programming Constructs
Parallel programming in Java
Emulating Massively Parallel (PetaFLOPS) Machines
Presentation transcript:

GASNet: A Portable High-Performance Communication Layer for Global Address-Space Languages Dan Bonachea In conjunction with the joint UC Berkeley and LBL Berkeley UPC compiler development project

Introduction Two major paradigms for parallel programming –Shared Memory single logical memory space, loads and stores for communication ease of programming –Message Passing disjoint memory spaces, explicit communication often more scalable and higher-performance Another Possibility: Global-Address Space (GAS) Languages –Provide a global shared memory abstraction to the user, regardless of the hardware implementation –Make distinction between local & remote memory explicit –Get the ease of shared memory programming, and the performance of message passing –Examples: UPC, Titanium, Co-array Fortran, …

The Case for Portability Most current UPC compiler implementations generate code directly for the target system –Requires compilers to be rewritten from scratch for each platform and network We want a more portable, but still high-performance solution –Want to re-use our investment in compiler technology across different platforms, networks and machine generations –Want to compare the effects of experimental parallel compiler optimizations across platforms –The existence of a fully portable compiler helps the acceptability of UPC as a whole for application writers

NERSC/UPC Runtime System Organization Compiler-generated C code UPC Runtime system GASNet Communication System Network Hardware Platform- independent Network- independent Language- independent Compiler- independent UPC Code Compiler

GASNet Communication System- Goals Language-independence: Compatibility with several global-address space languages and compilers –UPC, Titanium, Co-array Fortran, possibly others.. –Hide UPC- or compiler-specific details such as shared-pointer representation Hardware-independence: variety of parallel architectures & OS's –SMP: Origin 2000, Linux/Solaris multiprocessors, etc. –Clusters of uniprocessors: Linux clusters (myrinet, infiniband, via, etc) –Clusters of SMPs: IBM SP-2 (LAPI), Compaq Alphaserver, Linux CLUMPS, etc. Ease of implementation on new hardware –Allow quick implementations –Allow implementations to leverage performance characteristics of hardware Want both portability & performance

GASNet Communication System- Architecture 2-Level architecture to ease implementation: Core API –Most basic required primitives, as narrow and general as possible –Implemented directly on each platform –Based heavily on active messages paradigm Extended API –Wider interface that includes more complicated operations –We provide a reference implementation of the extended API in terms of the core API –Implementors can choose to directly implement any subset for performance - leverage hardware support for higher-level operations Compiler-generated code Compiler-specific runtime system GASNet Extended API GASNet Core API Network Hardware

Progress to Date Wrote the GASNet Specification –Included inventing a mechanism for safely providing atomicity in Active Message handlers Reference implementation of extended API –Written solely in terms of the core API Implemented a portable MPI-based core API Completed native (core&extended) GASNet implementations for several high-performance networks: –Quadrics Elan, Myrinet GM, IBM LAPI GASNet implementation under-way for Infiniband –other networks also under consideration

Extended API – Remote memory operations Orthogonal, expressive, high-performance interface –Gets & Puts for Scalars and Bulk contiguous data –Blocking and non-blocking (returns a handle) –Also have a non-blocking form where the handle is implicit Non-blocking synchronization –Sync on a particular operation (using a handle) –Sync on a list of handles (some or all) –Sync on all pending reads, writes or both (for implicit handles) –Sync on operations initiated in a given interval –Allow polling (trysync) or blocking (waitsync) Useful for experimenting with a variety of parallel compiler optimization techniques

Extended API – Remote memory operations API for remote gets/puts: void get (void *dest, int node, void *src, int numbytes) handle get_nb (void *dest, int node, void *src, int numbytes) void get_nbi(void *dest, int node, void *src, int numbytes) void put (int node, void *src, void *dest, int numbytes) handle put_nb (int node, void *src, void *dest, int numbytes) void put_nbi(int node, void *src, void *dest, int numbytes) "nb" = non-blocking with explicit handle "nbi" = non-blocking with implicit handle Also have "value" forms that are register-memory Recognize and optimize common sizes with macros Extensibility of core API allows easily adding other more complicated access patterns (scatter/gather, strided, etc) Names all prefixed by "gasnet_" to prevent naming conflicts

Extended API – Remote memory operations API for get/put synchronization: Non-blocking ops with explicit handles: int try_syncnb(handle) void wait_syncnb(handle) int try_syncnb_some(handle *, int numhandles) void wait_syncnb_some(handle *, int numhandles) int try_syncnb_all(handle *, int numhandles) void wait_syncnb_all(handle *, int numhandles) Non-blocking ops with implicit handles: int try_syncnbi_gets() void wait_syncnbi_gets() int try_syncnbi_puts() void wait_syncnbi_puts() int try_syncnbi_all() // gets & puts void wait_syncnbi_all()

Core API – Active Messages Super-Lightweight RPC –Unordered, reliable delivery –Matched request/reply serviced by "user"-provided lightweight handlers –General enough to implement almost any communication pattern Request/reply messages –3 sizes: short (<=32 bytes),medium (<=512 bytes), long (DMA) Very general - provides extensibility –Available for implementing compiler-specific operations –scatter-gather or strided memory access, remote allocation, etc. AM previously implemented on a number of interconnects –MPI, LAPI, UDP/Ethernet, Via, Myrinet, and others Started with AM-2 specification –Remove some unneeded complexities (e.g. multiple endpoint support) –Add 64-bit support and explicit atomicity control (handler-safe locks)

Core API – Atomicity Support for Active Messages Atomicity in traditional Active Messages: –handlers run atomically wrt. each other & main thread –handlers never allowed block (e.g. to acquire a lock) –atomicity achieved by serializing everything (even when not reqd) Want to improve concurrency of handlers Want to support various handler servicing paradigms while still providing atomicity –Interrupt-based or polling-based handlers, NIC-thread polling –Want to support multi-threaded clients on an SMP –Want to allow concurrency between handlers on an SMP New Mechanism: Handler-Safe Locks –Special kind of lock that is safe to acquire within a handler HSL's include a set of usage constraints on the client and a set of implementation guarantees which make them safe to acquire in a handler –Allows client to implement critical sections within handlers

Why interrupt-based handlers cause problems App. Thread Time lock acquire lock release Critical section AM Handler lock acquire lock release Async Interrupt Analogous problem if app thread makes a synchronous network call (which may poll for handlers) within the critical section DEADLOCK

Handler-Safe Locks HSL is a basic mutex lock –imposes some additional usage rules on the client –allows handlers to safely perform synchronization HSL's must always be held for a "bounded" amount of time –Can't block/spin-wait for a handler result while holding an HSL –Handlers that acquire them must also release them –No synchronous network calls allowed while holding –AM Interrupts disabled to prevent asynchronous handler execution Rules prevent deadlocks on HSL's involving multiple handlers and/or the application code –Allows interrupt-driven handler execution –Allows multiple threads to concurrently execute handlers

No-Interrupt Sections Problem: –Interrupt-based AM implementations run handlers asynchronously wrt. main computation (e.g. from a UNIX signal handler) –May not be safe if handler needs to call non-signal-safe functions (e.g. malloc) Solution: –Allow threads to temporarily disable interrupt-based handler execution: hold_interrupts(), resume_interrupts() –Wrap any calls to non-signal safe functions in a no-interrupt section –Hold & resume can be implemented very efficiently using 2 simple bits in memory (interruptsDisabled bit, messageArrived bit)

Experimental Results

Experiments Micro-Benchmarks: ping-pong and flood Latency Total Time REQ ACK Ping-pong round-trip test Round-trip Latency = Total time / iterations Inv. throughput Total Time REQ ACK Inv. throughput = Total time / iterations BW = msg size * iter / total time Flood test

GASNet Configurations Tested Quadrics (elan): –mpi-refext - AMMPI core, AM-based puts/gets –elan-refext - Elan core, AM-based puts/gets –elan-elan - pure native elan implementation Myrinet (GM): –mpi-refext - AMMPI core, AM-based puts/gets –gm-gm - pure native GM implementation

System Configurations Tested Quadrics - falcon (ORNL) –Compaq Alphaserver SC 2.0, ES40 Elan3, single-rail –64-node, 4-way 667 MHz Alpha EV67, 2GB, libelan1.2, OSF 5.1 Quadrics - lemieux (PSC) –Compaq Alphaserver SC, ES45 Elan3, double-rail (only tested w/single) –750-node, 4-way 1GHz Alpha, 4GB, libelan1.3, OSF 5.1 Myrinet - Millennium (UCB) –x86-Linux Cluster, 33Mhz 64-bit Myrinet 2000 PCI64B, 133 MHz Lanai 9.0 –~85-node, 2/4-way Mhz P3, 2-4GB, GM 1.5.1, Redhat Linux 7.2 –Empirical PCI bus bandwidth: 133MB/sec read, 245 MB/sec write Myrinet - Alvarez (NERSC) –x86-Linux Cluster, 33Mhz 64-bit Myrinet 2000 PCI64C, 200 MHz Lanai 9.2 –80-node, 2-way 866 Mhz P3, 1GB, GM –Empirical PCI bus bandwidth: 229MB/sec read, 245 MB/sec write

gets puts

gets puts

gets puts

Conclusions GASNet provides a portable & high-performance interface for implementing GAS languages two-level design allows rapid prototyping & careful tuning for hardware-specific network capabilities Handler-safe locks provide explicit atomicity control even with handler concurrency & interrupt-based handlers We have a fully portable MPI-based implementation of GASNet, several native implementations (Myrinet, Quadrics, LAPI) and other implementations on the way (Infiniband) Performance results are very promising –Overheads of GASNet are low compared to underlying network –Interface provides the right primitives for use as a compilation target, to support advanced compiler communication scheduling

Future Work Further tune our native GASNet implementations Implement GASNet on new interconnects –Infiniband, Cray T3E, Dolphin SCI, Cray X-1… Implement GASNet on other portable interfaces –UDP/Ethernet, ARMCI? Augment Extended API with other useful functions –Collective communication (broadcast, reductions) –More sophisticated memory access ops (strided, scatter/gather, etc.)