<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word;-webkit-nbsp-mode: space;line-break:after-white-space">
<div class="WordSection1">
<p class="MsoNormal">The recent comments on compilers, caches, etc., are why HPC isn’t a bigger deal. The infrastructure today is reminiscent of what I used in the 1970s on a big CDC or Burroughs or IBM machine, perhaps with a FPS box attached.
<o:p></o:p></p>
<p class="MsoNormal">I prepare a job, with some sort of job control structure, submit it to a batch queue, and get my results some time later. Sure, I’m not dropping off a deck or tapes, and I’m not getting green-bar paper or a tape back, but really, it’s
not much different – I drop a file and get files back either way. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And just like back then, it’s up to me to figure out how best to arrange my code to run fastest (or me, wall clock time, but others it might be CPU time or cost or something else)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It would be nice if the compiler (or run-time or infrastructure) figured out the whole “what’s the arrangement of cores/nodes/scratch storage for this application on this particular cluster”.
<o:p></o:p></p>
<p class="MsoNormal">I also acknowledge that this is a “hard” problem and one that doesn’t have the commercial value of, say, serving the optimum ads to me when I read the newspaper on line.
<o:p></o:p></p>
<p class="MsoNormal"><br>
Yeah, it’s not that hard to call library routines for matrix operations, and to put my trust in the library writers – I trust them more than I trust me to find the fastest linear equation solver, fft, etc. – but so far, the next level of abstraction up – “how
many cores/nodes” is still left to me, and that means doing instrumentation, figuring out what the results mean, etc.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Beowulf <beowulf-bounces@beowulf.org> on behalf of "beowulf@beowulf.org" <beowulf@beowulf.org><br>
<b>Reply-To: </b>Jim Lux <james.p.lux@jpl.nasa.gov><br>
<b>Date: </b>Monday, September 20, 2021 at 10:42 AM<br>
<b>To: </b>Lawrence Stewart <stewart@serissa.com>, Jim Cownie <jcownie@gmail.com><br>
<b>Cc: </b>Douglas Eadline <deadline@eadline.org>, "beowulf@beowulf.org" <beowulf@beowulf.org><br>
<b>Subject: </b>Re: [Beowulf] [EXTERNAL] Re: Deskside clusters<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Beowulf <beowulf-bounces@beowulf.org> on behalf of Lawrence Stewart <stewart@serissa.com><br>
<b>Date: </b>Monday, September 20, 2021 at 9:17 AM<br>
<b>To: </b>Jim Cownie <jcownie@gmail.com><br>
<b>Cc: </b>Lawrence Stewart <stewart@serissa.com>, Douglas Eadline <deadline@eadline.org>, "beowulf@beowulf.org" <beowulf@beowulf.org><br>
<b>Subject: </b>Re: [Beowulf] [EXTERNAL] Re: Deskside clusters<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Well said. Expanding on this, caches work because of both temporal locality and
<o:p></o:p></p>
<div>
<p class="MsoNormal">spatial locality. Spatial locality is addressed by having cache lines be substantially<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">larger than a byte or word. These days, 64 bytes is pretty common. Some prefetch schemes, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">like the L1D version that fetches the VA ^ 64 clearly affect spatial locality. Streaming <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">prefetch has an expanded notion of “spatial” I suppose!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">What puzzles me is why compilers seem not to have evolved much notion of cache management. It <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">seems like something a smart compiler could do. Instead, it is left to Prof. Goto and the folks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">at ATLAS and BLIS to figure out how to rewrite algorithms for efficient cache behavior. To my<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">limited knowledge, compilers don’t make much use of PREFETCH or any non-temporal loads and stores<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">either. It seems to me that once the programmer helps with RESTRICT and so forth, then compilers could perfectly well dynamically move parts of arrays around to maximize cache use.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-L<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:0in"><o:p> </o:p></p>
<p class="MsoListParagraph" style="margin-left:0in">I suspect that there’s enough variability among cache implementation and the wide variety of algorithms that might use it that writing a smart-enough compiler is “hard” and “expensive”.<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:0in"><o:p> </o:p></p>
<p class="MsoListParagraph" style="margin-left:0in">Leaving it to the library authors is probably the best “bang for the buck”.
<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:0in"><o:p> </o:p></p>
<p class="MsoListParagraph" style="margin-left:0in"><o:p> </o:p></p>
<p class="MsoListParagraph" style="margin-left:0in"><o:p> </o:p></p>
</div>
</div>
</body>
</html>