11
1 Screencast: Basic Architecture and Tuning Jeff Squyres May 2008 May 2008 Screencast: Basic Architecture and Tuning 2 Open MPI Architecture Modular component architecture (MCA) Backbone plugin / component system Finds, loads, parameterizes components Hierarchy MCA: foundation Framework: functionality specification Component: code for specific functionality Module: “instance” of a component

Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

1

May 2008 Screencast: Basic Architecture and Tuning 1

Screencast: Basic Architecture and Tuning

Jeff Squyres May 2008

May 2008 Screencast: Basic Architecture and Tuning 2

Open MPI Architecture

•  Modular component architecture (MCA)   Backbone plugin / component system   Finds, loads, parameterizes components

•  Hierarchy  MCA: foundation   Framework: functionality specification  Component: code for specific functionality  Module: “instance” of a component

Page 2: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

2

May 2008 Screencast: Basic Architecture and Tuning 3

User application

MPI API

Modular Component Architecture (MCA)

Framework

Com

p.

Com

p.

Com

p.

Framework

Com

p.

Com

p.

Com

p.

Framework

Com

p.

Com

p.

Com

p.

Framework C

omp.

Com

p.

Com

p.

Framework

Com

p.

Com

p.

Com

p.

Framework

Com

p.

Com

p.

Com

p.

Framework

Com

p.

Com

p.

Com

p.

Open MPI Architecture

May 2008 Screencast: Basic Architecture and Tuning 4

Three Main Code Sections

•  Open MPI layer (OMPI)   Top-level MPI API and supporting logic

•  Open Run-Time Environment (ORTE)   Interface to back-end run-time system

•  Open Portability Access Layer (OPAL)  OS / utility code (lists, reference counting, etc.)

•  Dependencies - not layers  OMPI ➔ ORTE ➔ OPAL

Page 3: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

3

May 2008 Screencast: Basic Architecture and Tuning 5

Three Main Code Sections

Operating system

OMPI

ORTE

OPAL

May 2008 Screencast: Basic Architecture and Tuning 6

Three Main Code Sections

Operating system

OMPI ORTE

OPAL

User application

MPI API

Page 4: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

4

May 2008 Screencast: Basic Architecture and Tuning 7

Tuning

May 2008 Screencast: Basic Architecture and Tuning 8

MCA Parameters

•  Run-time tunable values   Per layer   Per framework   Per component

•  Change behaviors of code at run-time  Does not require recompiling / re-linking

•  Simple example  Choose which network to use for MPI

communications

Page 5: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

5

May 2008 Screencast: Basic Architecture and Tuning 9

MCA Parameter Lookup Order

1.  mpirun command line

2.  Environment variable

3.  File   $HOME/.openmpi/mca-params.conf   $prefix/etc/openmpi-mca-params.conf

(these locations are themselves tunable) 4.  Default value

mpirun --mca <name> <value>

export OMPI_MCA_<name>=<value>

May 2008 Screencast: Basic Architecture and Tuning 10

So Much Information…

•  Open MPI has:   ~30 frameworks   100+ components   Each component has run-time tunable

parameters

•  How to know what to use / how to use it?

Page 6: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

6

May 2008 Screencast: Basic Architecture and Tuning 11

ompi_info Command

•  Tells everything about OMPI installation   Finds all components and all params  Great for debugging

•  Can look up specific component

  Shows parameters and current values  Can also use keyword “all”

•  “--parsable” option

ompi_info --param <type> <plugin>

May 2008 Screencast: Basic Architecture and Tuning 12

Example: Specify BTL

•  BTL: Byte Transfer Layer   Framework for MPI point-to-point

communications   Select which network to use for MPI

communications

•  Framework-level MCA parameter   Specifies which components to load

mpirun --mca btl tcp,self \ -np 4 ring_c

Page 7: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

7

May 2008 Screencast: Basic Architecture and Tuning 13

Example: Specify TCP BTL

•  Components   tcp: TCP sockets   self: Process loopback (send-to-self)

mpirun --mca btl tcp,self -np 4 ring_c

May 2008 Screencast: Basic Architecture and Tuning 14

Example: Specify openib BTL

•  Components   openib: OpenFabrics verbs   self: Process loopback (send-to-self)

mpirun --mca btl openib,self -np 4 ring_c

Page 8: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

8

May 2008 Screencast: Basic Architecture and Tuning 15

Example: Specify sm+openib BTLs

•  Components   openib: OpenFabrics verbs   self: Process loopback (send-to-self)   sm: Shared memory (on-host communication)

mpirun --mca btl sm,openib,self -np 4 ring_c

May 2008 Screencast: Basic Architecture and Tuning 16

What Does This Do?

mpirun -np 4 ring_c

Page 9: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

9

May 2008 Screencast: Basic Architecture and Tuning 17

What Does This Do?

•  Use all available components   tcp, sm, openib, …

•  TCP too?   Yes -- and no   TCP will automatically disable itself in the

presence of low latency components (e.g., openib)

mpirun -np 4 ring_c

May 2008 Screencast: Basic Architecture and Tuning 18

What Does This Do?

•  More specifically:  Open each BTL component  Query if it wants to be used   Keep all that say “yes”  Rank by bandwidth and latency rating

mpirun -np 4 ring_c

Page 10: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

10

May 2008 Screencast: Basic Architecture and Tuning 19

What Does This Do?

mpirun -np 4 --mca btl ^tcp ring_c

May 2008 Screencast: Basic Architecture and Tuning 20

What Does This Do?

•  Use all available components except tcp •  More specifically:

 Open each BTL component except tcp  Query if it wants to be used   Keep all that say “yes”  Rank by bandwidth and latency rating

mpirun -np 4 --mca btl ^tcp ring_c

Page 11: Open MPI Architecture · 2019. 5. 20. · presence of low latency components (e.g., openib) mpirun -np 4 ring_c May 2008 Screencast: Basic Architecture and Tuning 18 What Does This

11

May 2008 Screencast: Basic Architecture and Tuning 21

openib BTL Parameters

•  Shows all openib BTL MCA parameters  …there are a lot!

•  Also try:

• What do they all mean?

ompi_info --param btl openib

ompi_info --param btl openib \ --parsable

May 2008 Screencast: Basic Architecture and Tuning 22