Many-SC Programming Model Jaejin Lee Center for Manycore Programming Seoul National University 2014.06.27 1 2014-06-27.

Slides:



Advertisements
Similar presentations
Instructor Notes This lecture describes the different ways to work with multiple devices in OpenCL (i.e., within a single context and using multiple contexts),
Advertisements

An OpenCL Framework for Heterogeneous Multicores with Local Memory PACT 2010 Jaejin Lee, Jungwon Kim, Sangmin Seo, Seungkyun Kim, Jungho Park, Honggyu.
CS Lecture 4 Programming with Posix Threads and Java Threads George Mason University Fall 2009.
POSIX threads and C++ facilities Jakub Yaghob. Low-level threading and synchronization support Pthreads POSIX threads IEEE POSIX c (1995) C library.
Threads. What do we have so far The basic unit of CPU utilization is a process. To run a program (a sequence of code), create a process. Processes are.
Pthreads & Concurrency. Acknowledgements  The material in this tutorial is based in part on: POSIX Threads Programming, by Blaise Barney.
PTHREADS These notes are from LLNL Pthreads Tutorial
University of Michigan Electrical Engineering and Computer Science Transparent CPU-GPU Collaboration for Data-Parallel Kernels on Heterogeneous Systems.
Computer Architecture II 1 Computer architecture II Programming: POSIX Threads OpenMP.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
8-1 JMH Associates © 2004, All rights reserved Windows Application Development Chapter 10 - Supplement Introduction to Pthreads for Application Portability.
Lecture 18 Threaded Programming CPE 401 / 601 Computer Network Systems slides are modified from Dave Hollinger.
Threads? Threads allow us to have multiple tasks active at the same time in one executable –think of a server handling multiple connections Each thread.
Pthread II. Outline Join Mutex Variables Condition Variables.
CS 3013 & CS 502 Summer 2006 Threads1 CS-3013 & CS-502 Summer 2006.
Contemporary Languages in Parallel Computing Raymond Hummel.
Netprog Threads Programming1 Threads Programming Refs: Chapter 23.
Parallel Programming with Threads CS 240A Tao Yang, 2013.
OpenMP in a Heterogeneous World Ayodunni Aribuki Advisor: Dr. Barbara Chapman HPCTools Group University of Houston.
Operating Systems Chapter 5 Threads. Benefits Responsiveness Resource Sharing Economy Utilization of MP Architectures.
Introduction to Pthreads. Pthreads Pthreads is a POSIX standard for describing a thread model, it specifies the API and the semantics of the calls. Model.
The University of Adelaide, School of Computer Science
10/16/ Realizing Concurrency using the thread model B. Ramamurthy.
04/10/25Parallel and Distributed Programming1 Shared-memory Parallel Programming Taura Lab M1 Yuuki Horita.
Today’s topic Pthread Some materials and figures are obtained from the POSIX threads Programming tutorial at
B. RAMAMURTHY 10/24/ Realizing Concurrency using the thread model.
Multi-threaded Programming with POSIX Threads CSE331 Operating Systems Design.
POSIX Threads Nezer J. Zaidenberg. References  Advanced programming for the UNIX environment (2nd edition chapter This material does not exist.
Threads and Thread Control Thread Concepts Pthread Creation and Termination Pthread synchronization Threads and Signals.
CS345 Operating Systems Threads Assignment 3. Process vs. Thread process: an address space with 1 or more threads executing within that address space,
What is a thread? process: an address space with 1 or more threads executing within that address space, and the required system resources for those threads.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Semaphore and Mutex Operations.
Programming with POSIX* Threads Intel Software College.
OpenCL Programming James Perry EPCC The University of Edinburgh.
Pthreads: A shared memory programming model
Threads CSCE Thread Motivation Processes are expensive to create. Context switch between processes is expensive Communication between processes.
S -1 Posix Threads. S -2 Thread Concepts Threads are "lightweight processes" –10 to 100 times faster than fork() Threads share: –process instructions,
1 Pthread Programming CIS450 Winter 2003 Professor Jinhua Guo.
UNIX Socket Programming CS 6378 Project Reference Book: Unix Network programming: Networking APIs: Sockets and XTI (2nd edition), Prentice Hall >> Threads.
Thread API Xiaohua Lu Office : CS 3310 Tel. : Office hours: 11-12,3-5 T,TR.
POSIX Synchronization Introduction to Operating Systems: Discussion Module 5.
(p)Threads Libraries Math 442 es Jim Fix. Life cycle of a thread.
IT 325 Operating systems Chapter6.  Threads can greatly simplify writing elegant and efficient programs.  However, there are problems when multiple.
Pthreads.
Practical Sockets and Threads Derek Weitzel. Windows Threads Concurrent processing Concurrent processing Windows Create Thread Windows Create Thread HANDLE.
P4: Multithreaded Programming Zhenxiao Luo CS537 Spring 2010.
12/22/ Thread Model for Realizing Concurrency B. Ramamurthy.
Chapter 6 P-Threads. Names The naming convention for a method/function/operation is: – pthread_thing_operation(..) – Where thing is the object used (such.
Threads A thread is an alternative model of program execution
Thread Basic Thread operations include thread creation, termination, synchronization, data management Threads in the same process share:  Process address.
Working with Pthreads. Operations on Threads int pthread_create (pthread_t *thread, const pthread_attr_t *attr, void * (*routine)(void*), void* arg) Creates.
Programming with Threads. Threads  Sometimes called a lightweight process  smaller execution unit than a process  Consists of:  program counter 
B. RAMAMURTHY 5/10/2013 Amrita-UB-MSES Realizing Concurrency using the thread model.
7/9/ Realizing Concurrency using Posix Threads (pthreads) B. Ramamurthy.
Realizing Concurrency using the thread model
CS 537 – Introduction to Operating Systems
Realizing Concurrency using the thread model
Boost String API & Threads
PTHREADS These notes are from LLNL Pthreads Tutorial
Multithreading Tutorial
Realizing Concurrency using Posix Threads (pthreads)
Realizing Concurrency using the thread model
Realizing Concurrency using the thread model
Pthread Prof. Ikjun Yeom TA – Mugyo
Realizing Concurrency using the thread model
Realizing Concurrency using Posix Threads (pthreads)
Realizing Concurrency using the thread model
Realizing Concurrency using Posix Threads (pthreads)
Shared Memory Programming with Pthreads
POSIX Threads(pthreads)
Presentation transcript:

Many-SC Programming Model Jaejin Lee Center for Manycore Programming Seoul National University

Schedule for the first year Schedule(13/11/11~14/11/10) Developing a low-level communication library 2 Developing a threading library 3 Developing a software SVM 4 Verification and performance analysis of the low-level communication library and the software SVM on Chundoong Interim report Final report /27

Cluster The Structure of the Many-SC Core Cluster Core Cluster Core Cluster Core

The Structure of Typical Cluster Systems Node Core Node Core Node Core Node Core Interconnection network

Developing a Low-level Communication Library Many-SC Cache coherence protocol Works between cores in a cluster Does not work between cores in different clusters It is very similar to the typical cluster systems Plan Developing a low-level communication library for typical cluster systems Apply this to the Many-SC

Low-level Communication Library Provide high-level APIs similar to MPI The API functions are optimized for SnuCL Use RDMA internally Some API functions

SnuCL An OpenCL framework for heterogeneous clusters Platform layer + runtime + kernel compiler Freely available, open-source software Supports OpenCL 1.2 Passed most of OpenCL conformance tests Supports x86 CPUs, ARM CPUs, AMD GPUs, NVIDIA GPUs, Intel Xeon Phi coprocessors (from July, 2013) With SnuCL, an OpenCL application written for a single operating system instance runs on a heterogeneous cluster without any modification

The Structure of SnuCL

Replacing Communication Library Hardware MPI SnuCL OpenCL Applications Hardware Low-level communication library SnuCL OpenCL Applications

Performance

Developing Thread Library Provide a subset of POSIX thread API functions NameDescription int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg); Starts a new thread in the calling process void pthread_exit(void *status);Terminate calling thread int pthread_join(pthread_t thread, void **status);Join with terminated thread pthread_t pthread_self(void);Obtain ID of the calling thread int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr); Initialize a mutex int pthread_mutex_destroy( pthread_mutex_t *mutex); Destroy a mutex int pthread_mutex_lock(pthread_mutex_t *mutex); Lock a mutex int pthread_mutex_unlock(pthread_mutex_t *mutex); Unlock a mutex int pthread_barrier_init(pthread_barrier_t *restrict barrier, const pthread_barrierattr_t *restrict attr, unsigned count); Initialize a barrier int pthread_barrier_destroy(pthread_barrier_t *barrier); Destroy a barrier int pthread_barrier_wait(pthread_barrier_t *barrier); Synchronize at a barrier

Current Status and Future Plan Developing a low-level communication library Done for cluster systems Need to be applied to the Many-SC Developing a threading library Defining API functions is done Developing a software SVM for cluster systems Need to implement Verification and performance analysis on Chundoong

The End