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). So the answer is: yes, MPI_Waitany is actively looping. Matthieu ________________________________ From: Jeff Hammond [[email protected]] Sent: Thursday, July 30, 2015 6:41 PM To: [email protected] Subject: Re: [mpich-discuss] Active loop in MPI_Waitany? Seems obvious that Waitany spins on the array of requests until one completes. Is that an active loop by your definition? Jeff On Thursday, July 30, 2015, Dorier, Matthieu <[email protected]<mailto:[email protected]>> wrote: Hi, I have a code that looks like this: while(true) { do some I/O (HDF5 POSIX output to a remote, parallel file system) wait for communication (MPI_Waitany) from other processes (in the same node and outside the node) } 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. 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. Does anyone have a good explanation for that? Is there an active loop in MPI_Waitany? Another reason? Thanks! Matthieu -- Jeff Hammond [email protected]<mailto:[email protected]> http://jeffhammond.github.io/ _______________________________________________ discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/discuss