1 / 7

Introduction to Hybrid Parallel Programming – Combining MPI, OpenMP and the Stommel Model

Introduction to Hybrid Parallel Programming – Combining MPI, OpenMP and the Stommel Model. Combine MPI and OpenMP. Hybrid parallel programming approach – each MPI process spawns n OpenMP threads

xuefang-jun
Download Presentation

Introduction to Hybrid Parallel Programming – Combining MPI, OpenMP and the Stommel Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Hybrid Parallel Programming – Combining MPI, OpenMP and the Stommel Model

  2. Combine MPI and OpenMP Hybrid parallel programming approach – each MPI process spawns n OpenMP threads • One programming methodology for hybrid architectures, such as coupled shared-memory nodes - e.g., IBM Blue Horizon • Works well on the IBM SP – 8 cpus/node • Run two MPI processes per node • Each MPI process runs 4 MPI threads • We simply combine our Stommel model version stf_002.f (MPI) with the OpenMP enabled subroutine do_jacobi

  3. Combine MPI and OpenMP Hybrid parallel programming approach – each MPI process spawns n OpenMP threads • One programming methodology for hybrid architectures, such as coupled shared-memory nodes - e.g., IBM Blue Horizon • Works well on the IBM SP – 8 cpus/node • Run two MPI processes per node • Each MPI process runs 4 MPI threads • We simply combine our Stommel model version stf_002.f (MPI) with the OpenMP enabled subroutine do_jacobi

  4. IBM SP Running OpenMP & MPI mpxlf_r -qfree=f90 -O3 -qtune=pwr3 -qarch=pwr3 -qsmp omp_02.f -o omp_02 cat run_both #! /usr/bin/ksh -f printenv | grep MP_ export OMP_NUM_THREADS=4 omp_02 < st.in We have MPI and OpenMP Script file to set 4 threads and run job This script is run from LoadLeveler

  5. New IBM SP running OpenMP & MPI #! /usr/bin/ksh #@ environment = COPY_ALL; MP_EUILIB = us #@initialdir = /nhome/your-username #@ output = $(jobid).out #@ error = $(jobid).out #@ job_type = parallel #@ class = high #@ network.MPI = css0,not_shared,US #@ node_usage = not_shared #@ node = 2 #@ tasks_per_node = 2 #@ wall_clock_limit = 1:00:00 #@ notify_user = tkaiser@sdsc.edu #@ notification = error #@ notification = complete #@ queue poe run_both Don’t share the nodes Run on 2 nodes with 2 MPI tasks/node Script file to set threads and run job cat run_both #! /usr/bin/ksh -f printenv | grep MP_ export OMP_NUM_THREADS=4 omp_02 < st.in

  6. Hybrid Programming – MPI & OpenMP • Could also combine MPI and Pthreads • Hybrid method – should study algorithm before coding to justify extra work • Some cases have shown theoretical benefits of hybrid method • Some cases have shown practical advantages of hybrid method

  7. Summary • We can combine OpenMP with MPI to take advantage of hybrid machines

More Related