<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style><style type="text/css"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #333399;font-size: 10pt;">Not that obvious, a UNIX function like "select" would allow to block on a set of file descriptors (for instance sockets), so I was expecting MPI_Waitany to work kind of the same
way. Pavan explained me (in person) why it does not: it cannot at the same time block on a read from shared memory (channels inside a node) and on network connections (outside the node). (I'm simplifying a bit here).
<div><br>
</div>
<div>So the answer is: yes, MPI_Waitany is actively looping.</div>
<div><br>
</div>
<div>Matthieu<br>
<div><br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF831613" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Jeff Hammond [jeff.science@gmail.com]<br>
<b>Sent:</b> Thursday, July 30, 2015 6:41 PM<br>
<b>To:</b> discuss@mpich.org<br>
<b>Subject:</b> Re: [mpich-discuss] Active loop in MPI_Waitany?<br>
</font><br>
</div>
<div></div>
<div>Seems obvious that Waitany spins on the array of requests until one completes. Is that an active loop by your definition?<span></span>
<div><br>
</div>
<div>Jeff <br>
<br>
On Thursday, July 30, 2015, Dorier, Matthieu <<a href="mailto:mdorier@anl.gov" target="_blank">mdorier@anl.gov</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#333399; font-size:10pt">Hi,<br>
<br>
I have a code that looks like this:<br>
<br>
while(true) {<br>
do some I/O (HDF5 POSIX output to a remote, parallel file system)<br>
wait for communication (MPI_Waitany) from other processes (in the same node and outside the node)<br>
}<br>
<br>
I'm measuring the energy consumption of the node that runs this process for the same duration, as a function of the amount of data written in each I/O operation.<br>
Surprisingly, the larger the I/O in proposition to the communication, the lower the energy consumption. In other words, the longer I wait in MPI_Waitany, the more I consume.<br>
<br>
Does anyone have a good explanation for that? Is there an active loop in MPI_Waitany? Another reason?<br>
<br>
Thanks!<br>
<br>
Matthieu<br>
</div>
</div>
</blockquote>
</div>
<br>
<br>
-- <br>
Jeff Hammond<br>
<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br>
<a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a><br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>