Marc Snir Ticket 313 Ticket 310 Ticket 311. TICKET 313 – INIT/FINALIZE 2.

Slides:



Advertisements
Similar presentations
Proposal (More) Flexible RMA Synchronization for MPI-3 Hubert Ritzdorf NEC–IT Research Division
Advertisements

Generalized Requests. The current definition They are defined in MPI 2 under the hood of the chapter 8 (External Interfaces) Page 166 line 16 The objective.
RMA Considerations for MPI-3.1 (or MPI-3 Errata)
MPI Message Passing Interface
Endpoints Proposal Update Jim Dinan MPI Forum Hybrid Working Group June, 2014.
Threads Relation to processes Threads exist as subsets of processes Threads share memory and state information within a process Switching between threads.
Enabling MPI Interoperability Through Flexible Communication Endpoints
Practical techniques & Examples
CS Lecture 4 Programming with Posix Threads and Java Threads George Mason University Fall 2009.
Chapter 7 Process Environment Chien-Chung Shen CIS, UD
Open[M]ulti[P]rocessing Pthreads: Programmer explicitly define thread behavior openMP: Compiler and system defines thread behavior Pthreads: Library independent.
Introduction of Memory Allocation. Memory Allocation There are two types of memory allocations possible in c. Compile-time or Static allocation Run-time.
6/10/2015C++ for Java Programmers1 Pointers and References Timothy Budd.
Cc Compiler Parallelization Options CSE 260 Mini-project Fall 2001 John Kerwin.
Chapter 10 Storage management
DISTRIBUTED AND HIGH-PERFORMANCE COMPUTING CHAPTER 7: SHARED MEMORY PARALLEL PROGRAMMING.
Run-Time Storage Organization
Pointers. Addresses in Memory When a variable is declared, enough memory to hold a value of that type is allocated for it at an unused memory location.
4.7.1 Thread Signal Delivery Two types of signals –Synchronous: Occur as a direct result of program execution Should be delivered to currently executing.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles C/C++ Emery Berger and Mark Corner University of Massachusetts.
Stacks and HeapsCS-502 Fall A Short Digression Stacks and Heaps CS-502, Operating Systems Fall 2007 (Slides include materials from Operating System.
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
MPI3 Hybrid Proposal Description
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
ICOM 5995: Performance Instrumentation and Visualization for High Performance Computer Systems Lecture 7 October 16, 2002 Nayda G. Santiago.
Chapter 6 Buffer Overflow. Buffer Overflow occurs when the program overwrites data outside the bounds of allocated memory It was one of the first exploited.
PRINCIPLES OF OPERATING SYSTEMS Lecture 6: Processes CPSC 457, Spring 2015 May 21, 2015 M. Reza Zakerinasab Department of Computer Science, University.
CS212: Object Oriented Analysis and Design Lecture 7: Arrays, Pointers and Dynamic Memory Allocation.
Pointers review Let a variable aa be defined as ‘int *aa;’, what is stored in aa? Let a variable aa be defined as ‘int ** aa;’ what is stored in aa? Why.
Message Passing Programming with MPI Introduction to MPI Basic MPI functions Most of the MPI materials are obtained from William Gropp and Rusty Lusk’s.
Hybrid MPI and OpenMP Parallel Programming
1 The Message-Passing Model l A process is (traditionally) a program counter and address space. l Processes may have multiple threads (program counters.
C++ Data Types Structured array struct union class Address pointer reference Simple IntegralFloating char short int long enum float double long double.
Dynamic Memory Allocation. Domain A subset of the total domain name space. A domain represents a level of the hierarchy in the Domain Name Space, and.
Pointers and Dynamic Memory Allocation. Declaring a pointer.
Chapter 4 – Threads (Pgs 153 – 174). Threads  A "Basic Unit of CPU Utilization"  A technique that assists in performing parallel computation by setting.
Introduction to OpenMP
Introduction to OpenMP Eric Aubanel Advanced Computational Research Laboratory Faculty of Computer Science, UNB Fredericton, New Brunswick.
Lecture 7: POSIX Threads - Pthreads. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
Chapter 4 Message-Passing Programming. The Message-Passing Model.
LLNL-PRES-xxxxxx This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
MPI and OpenMP.
Porting processes to threads with MPC instead of forking Some slides from Marc Tchiboukdjian (IPDPS’12) : Hierarchical Local Storage Exploiting Flexible.
3/12/2013Computer Engg, IIT(BHU)1 OpenMP-1. OpenMP is a portable, multiprocessing API for shared memory computers OpenMP is not a “language” Instead,
NUMA Control for Hybrid Applications Kent Milfeld TACC May 5, 2015.
2.2 Threads  Process: address space + code execution  There is no law that states that a process cannot have more than one “line” of execution.  Threads:
Error Handler Rework Fault Tolerance Working Group.
CSC Pointers Powerful feature of the C++ language One of the most difficult to master Essential for construction of interesting data structures.
Chapter 7 Process Environment Chien-Chung Shen CIS/UD
Binding & Dynamic Linking Presented by: Raunak Sulekh(1013) Pooja Kapoor(1008)
A process is a program in execution A running system consists of multiple processes – OS processes Processes started by the OS to do “system things” –
Lesson One – Creating a thread
SHARED MEMORY PROGRAMMING WITH OpenMP
Boost String API & Threads
Computer Engg, IIT(BHU)
Principles of Operating Systems Lecture 8
Chapter 4: Threads.
MPI-Message Passing Interface
Thread Implementation Issues
Background and Motivation
Allen D. Malony Computer & Information Science Department
Introduction to parallelism and the Message Passing Interface
Programming with Shared Memory
Programming with Shared Memory
System Calls System calls are the user API to the OS
Foundations and Definitions
If there is any case in which true premises lead to a false conclusion, the argument is invalid. Therefore this argument is INVALID.
Run-time environments
If there is any case in which true premises lead to a false conclusion, the argument is invalid. Therefore this argument is INVALID.
SPL – PS3 C++ Classes.
Presentation transcript:

Marc Snir Ticket 313 Ticket 310 Ticket 311

TICKET 313 – INIT/FINALIZE 2

Problems Current standard says that each program must initialize; each process must finalize Not clear what is user responsibility before finalize No standard way of extracting in the program information about execution environment – argv/argc not sufficient 3

Basic Principles MPI is initialized on each MPI process MPI is finalized on each process (by the same main thread that initialized it). When it is finalized, the user should have – Completed all MPI calls at the local process – Matched all remote calls that need matching to complete – Freed all MPI objects it allocated New MPI_INFO_ENV to get information about arguments of mpiexec (avoiding the need to pass the information in argc/argv) MPI_INIT_THREAD returns MPI_THREAD_SINGLE if MPI is not thread compliant 4

TICKET 310 – MULTIPLE MPI PROCESSES WITHIN ONE ADDRESS SPACE -- STATIC MODEL

Premises MPI already allow having multiple MPI processes within one address space – need to clarify behavior Should behave as much as possible as multiple processes in distinct address spaces SC11 6

Issue: How to work with Multiple Thread Models Static: Number of threads is fixed throughout program execution. – PGAS; OpenMP with omp_dynamic = false. Dynamic, user controlled: Execution starts with one thread; user can spawn additional threads – Pthread library Dynamic, system controlled: Runtime can add or delete threads during execution – OpenMP with omp_dynamic = true SC11 7

Approach Allow multiple MPI processes within one address space Static, or dynamic, system controlled models: threads associated with MPI processes by system [ticket 310] Dynamic, user controlled model: threads are associated with MPI processes by user [ticket 311] One initialization/finalization per address space is sufficient – Essential for dynamic, system controlled Multiple initializations/finalizations are correct (but superfluous) – For portability SC11 8

TICKET 311 – DYNAMIC ATTACHMENT OF THREADS TO MPI PROCESSES 9 SC11

Goal: Accommodate Dynamic, User Control Model E.g., Pthread library Threads are explicitly attached to MPI processes Two new thread levels: – MPI_THREAD_ATTACH: thread can be attached once to an MPI process – MPI_THREAD_REATTACH: thread can be detached from one process and attached to another within the same address space One new function: MPI_THREAD_ATTACH() 10

Changes 313: – Neither user not FINALIZE do not necessarily free MPI objects – Buffer issue fixed – CANCEL controversy bypassed 310: – FINALIZE called by thread(s) that called INIT – OK to have only one thread per address space call INIT – Can have one thread per MPI process call INIT 311 – Only one new thread level, with ATTACH. – Strictly more general than MPI_THREAD_MULTIPLE 11