Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Marc Snir Ticket 313 Ticket 310 Ticket 311. TICKET 313 – INIT/FINALIZE 2."— Presentation transcript:

1 Marc Snir Ticket 313 Ticket 310 Ticket 311

2 TICKET 313 – INIT/FINALIZE 2

3 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

4 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

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

6 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

7 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

8 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

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

10 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

11 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


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

Similar presentations


Ads by Google