Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
370CT_21-22_Open/lectures/12_combining_MPI_and_OpenMP.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
170 lines (150 sloc)
5.93 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Combining MPI and OpenMP</title> | |
<meta name="author" content="(Dr Carey Pridgeon)"/> | |
<style type="text/css"> | |
.underline { text-decoration: underline; } | |
</style> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/reveal.js/3.0.0/css/reveal.css"/> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/reveal.js/3.0.0/css/theme/night.css" id="theme"/> | |
<link rel="stylesheet" href="../css/presentation.css"/> | |
<!-- If the query includes 'print-pdf', include the PDF print sheet --> | |
<script> | |
if( window.location.search.match( /print-pdf/gi ) ) { | |
var link = document.createElement( 'link' ); | |
link.rel = 'stylesheet'; | |
link.type = 'text/css'; | |
link.href = 'https://cdn.jsdelivr.net/reveal.js/3.0.0/css/print/pdf.css'; | |
document.getElementsByTagName( 'head' )[0].appendChild( link ); | |
} | |
</script> | |
</head> | |
<body> | |
<div class="reveal"> | |
<div class="slides"> | |
<section id="sec-title-slide"><h1 class="title">Combining MPI and OpenMP</h1><h2 class="author">Dr Carey Pridgeon</h2><p class="date">Created: 2022-02-03 Thu 13:42</p> | |
</section> | |
<section> | |
<section id="slide-sec-"> | |
<h2 id="org7404b29">Combining MPI and OpenMP</h2> | |
<div class="outline-text-2" id="text-org7404b29"> | |
</div> | |
</section> | |
</section> | |
<section> | |
<section id="slide-sec-"> | |
<h3 id="org6b927c4"></h3> | |
<ul> | |
<li>While <b>MPI</b> could be used as a parallelism library, it isn't a particularly | |
efficient one.</li> | |
<li><b>OpenMP</b> was designed intentional for exactly this purpose, whereas <b>MPI</b> was | |
designed primarily for use on distributed computing systems. It just happened | |
that a consequence of this was it could do paralelism as well.</li> | |
<li>Thus far with <b>MPI</b> we've looked at how to move data over a cluster and build | |
our own data structures. However, the nodes are rarely, if ever single core | |
machines, so we need to make use of a parallelism library to take advantage of | |
the nodes properly.</li> | |
</ul> | |
</section> | |
</section> | |
<section> | |
<section id="slide-sec-"> | |
<h3 id="org20febb8"></h3> | |
<ul> | |
<li>On this module I've only covered <b>OpenMP</b> in any detail, but any parallelism | |
library would work in combination with <b>MPI</b>.</li> | |
<li>In the commercial world <b>OneTBB</b>, Intels Threading Building Blocks (TBB), | |
is gaining popularity. It is more advanced, feature wise than <b>OpenMP</b>.</li> | |
<li>It removes some of the things I consider to be unnecessary now, such as | |
barrier control, and provides fine grain parallelism, thus reducing wasted | |
computational time.</li> | |
<li>This in turn saves energy, as more can be done using less power.</li> | |
</ul> | |
</section> | |
</section> | |
<section> | |
<section id="slide-sec-"> | |
<h3 id="org3abb0d4"></h3> | |
<ul> | |
<li>There's no inherent advantage, in terms of speed alone, between <b>OpenMP</b> and | |
<b>TBB</b>, as they both falter at the same number of cores due to the inter core | |
communication problem, starting to suffer at <b>14 to 16</b> cores, slowly | |
worsening, then topping out at <b>around 32</b> cores, at which point the computer | |
is spending more time managing the code than running the problem it's trying | |
to solve.</li> | |
<li>There are various counts I've found for the exact number of cores, but the | |
problem remains the same, they're both limited, just as threaded programming | |
is limited by mutex lock queues, and seriel programming is limited by its very | |
nature.</li> | |
</ul> | |
</section> | |
</section> | |
<section> | |
<section id="slide-sec-"> | |
<h3 id="org6f31556"></h3> | |
<ul> | |
<li>To integrate any Parallelism library, or a Concurrency library if you | |
wanted to doesn't take anything like the detail you might think.</li> | |
<li>To continue, open the source code in | |
<b>code/distributed/demonstration_code/OpenMP_and_MPI</b> and we'll go through this | |
example program together.</li> | |
</ul> | |
</section> | |
</section> | |
<section> | |
<section id="slide-sec-"> | |
<h3 id="org5e5a902">Obligatory XKCD</h3> | |
<div id="org28b88e3" class="figure"> | |
<p><img src="img/multi.png" alt="multi.png" /> | |
</p> | |
</div> | |
<ul> | |
<li>Copyright: Randall Munroe</li> | |
<li>Mirrored to avoid bandwidth stealing</li> | |
<li>This Lecture is Licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</a></li> | |
<li>By Dr Carey Pridgeon Coventry University, UK, 2021</li> | |
</ul> | |
</section> | |
</section> | |
</div> | |
</div> | |
<script src="https://cdn.jsdelivr.net/reveal.js/3.0.0/lib/js/head.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/reveal.js/3.0.0/js/reveal.js"></script> | |
<script> | |
// Full list of configuration options available here: | |
// https://github.com/hakimel/reveal.js#configuration | |
Reveal.initialize({ | |
controls: true, | |
progress: true, | |
history: true, | |
center: true, | |
slideNumber: 'c', | |
rollingLinks: true, | |
keyboard: true, | |
overview: true, | |
width: 1200, | |
height: 800, | |
margin: 0.20, | |
minScale: 0.50, | |
maxScale: 2.50, | |
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme | |
transition: Reveal.getQueryHash().transition || 'none', // default/cube/page/concave/zoom/linear/fade/none | |
transitionSpeed: 'default', | |
multiplex: { | |
secret: '', // null if client | |
id: '', // id, obtained from socket.io server | |
url: '' // Location of socket.io server | |
}, | |
// Optional libraries used to extend on reveal.js | |
dependencies: [ | |
{ src: 'https://cdn.jsdelivr.net/reveal.js/3.0.0/lib/js/classList.js', condition: function() { return !document.body.classList; } }, | |
{ src: 'https://cdn.jsdelivr.net/reveal.js/3.0.0/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, | |
{ src: 'https://cdn.jsdelivr.net/reveal.js/3.0.0/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, | |
{ src: 'https://cdn.jsdelivr.net/reveal.js/3.0.0/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }, | |
{ src: 'https://cdn.jsdelivr.net/reveal.js/3.0.0/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }] | |
}); | |
</script> | |
</body> | |
</html> |