10.07.2015 Views

Hybrid MPI and OpenMP programming tutorial - Prace Training Portal

Hybrid MPI and OpenMP programming tutorial - Prace Training Portal

Hybrid MPI and OpenMP programming tutorial - Prace Training Portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

— skipped —Thread support within Open <strong>MPI</strong>• In order to enable thread support in Open <strong>MPI</strong>, configure with:configure --enable-mpi-threads• This turns on:– Support for full <strong>MPI</strong>_THREAD_MULTIPLE– internal checks when run with threads (--enable-debug)configure --enable-mpi-threads --enable-progress-threads• This (additionally) turns on:– Progress threads to asynchronously transfer/receive data pernetwork BTL.• Additional Feature:– Compiling with debugging support, but without threads willcheck for recursive lockingOutline• Introduction / Motivation• Programming models on clusters of SMP nodes• Case Studies / pure <strong>MPI</strong> vs hybrid <strong>MPI</strong>+<strong>OpenMP</strong>• Practical “How-To” on hybrid <strong>programming</strong>• Mismatch Problems• Opportunities:Application categories that can benefit from hybrid parallelization• Thread-safety quality of <strong>MPI</strong> libraries• Tools for debugging <strong>and</strong> profiling <strong>MPI</strong>+<strong>OpenMP</strong>• Other options on clusters of SMP nodes• SummaryThis section is skipped, seetalks on tools on Thursday<strong>Hybrid</strong> Parallel ProgrammingSlide 125 / 154Rabenseifner, Hager, Jost<strong>Hybrid</strong> Parallel ProgrammingSlide 126 / 154Rabenseifner, Hager, JostCourtesy of Rainer Keller, HLRS <strong>and</strong> ORNL— skipped —Thread Correctness – Intel ThreadChecker 1/3— skipped —Thread Correctness – Intel ThreadChecker 2/3• Intel ThreadChecker operates in a similar fashion to helgrind,• Compile with –tcheck, then run program using tcheck_cl:• One may output to HTML:tcheck_cl --format HTML --report pthread_race.html pthread_raceApplication finished_______________________________________________________________________________|ID|Short De|Sever|C|Contex|Description|1st Acc|2nd Acc|| |scriptio|ity |o|t[Best| |ess[Bes|ess[Bes|| |n |Name |u|] | |t] |t] || | | |n| | | | || | | |t| | | | |_______________________________________________________________________________|1 |Write ->|Error|1|"pthre|Memory write of global_variable at|"pthrea|"pthrea|| |Write da| | |ad_rac|"pthread_race.c":31 conflicts with|d_race.|d_race.|| |ta-race | | |e.c":2|a prior memory write of |c":31 |c":31 || | | | |5 |global_variable at | | || | | | | |"pthread_race.c":31 (output | | || | | | | |dependence) | | |_______________________________________________________________________________• Caution: Intel Inspector XE 2011 is a GUI based tool not suitable forhybrid code execution (?)<strong>Hybrid</strong> Parallel ProgrammingSlide 127 / 154Rabenseifner, Hager, Jost<strong>Hybrid</strong> Parallel ProgrammingSlide 128 / 154Rabenseifner, Hager, JostCourtesy of Rainer Keller, HLRS <strong>and</strong> ORNLCourtesy of Rainer Keller, HLRS <strong>and</strong> ORNL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!