What's the use case? I don't honestly see a good one. Passive target with flush(_all) makes more sense with threads. <span></span><br><br>On Friday, June 20, 2014, Balaji, Pavan <<a href="mailto:balaji@anl.gov">balaji@anl.gov</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
The standard itself doesn’t seem to disallow it.  This means that, at least, MPICH is incorrect here.  I’d expect most MPICH derivatives to be incorrect for this as well.<br>
<br>
However, I’m trying to understand if that was the intention (and just forgotten to describe in the standard).  We never discussed this in the MPI-3 working group.<br>
<br>
  — Pavan<br>
<br>
On Jun 20, 2014, at 12:46 PM, Dave Goodell (dgoodell) <<a href="javascript:;" onclick="_e(event, 'cvml', 'dgoodell@cisco.com')">dgoodell@cisco.com</a>> wrote:<br>
<br>
> On Jun 20, 2014, at 11:16 AM, "Balaji, Pavan" <<a href="javascript:;" onclick="_e(event, 'cvml', 'balaji@anl.gov')">balaji@anl.gov</a>> wrote:<br>
><br>
>><br>
>> Is the following code correct?  Two threads of a process both do the following:<br>
>><br>
>> MPI_PUT<br>
>> MPI_PUT<br>
>> MPI_WIN_FENCE<br>
>><br>
>> Collectives are not allowed on the same communicator simultaneously.  But we don’t say anything similar for windows.<br>
><br>
> As I read it, it should be fine according to the standard as long as you haven't specified any assertions that would cause you to be lying to the implementation.<br>
><br>
> When we don't specifically disallow concurrent multithreaded operations, then the general threading text seems to allow this.  See MPI-3, p.483, l.1-11:<br>
><br>
> ----8<----<br>
> The two main requirements for a thread-compliant implementation are listed below.<br>
><br>
> 1. All MPI calls are thread-safe, i.e., two concurrently running threads may make MPI calls and the outcome will be as if the calls executed in some order, even if their execution is interleaved.<br>
><br>
> 2. Blocking MPI calls will block the calling thread only, allowing another thread to execute, if available. The calling thread will be blocked until the event on which it is waiting occurs. Once the blocked communication is enabled and can proceed, then the call will complete and the thread will be marked runnable, within a finite time. A blocked thread will not prevent progress of other runnable threads on the same process, and will not prevent them from executing MPI calls.<br>

> ----8<----<br>
><br>
> So, absent some external inter-thread synchronization, it will be undefined exactly which epoch the MPI_PUTs end up in.<br>
><br>
> -Dave<br>
><br>
> _______________________________________________<br>
> mpiwg-rma mailing list<br>
> <a href="javascript:;" onclick="_e(event, 'cvml', 'mpiwg-rma@lists.mpi-forum.org')">mpiwg-rma@lists.mpi-forum.org</a><br>
> <a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-rma" target="_blank">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-rma</a><br>
<br>
_______________________________________________<br>
mpiwg-rma mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'mpiwg-rma@lists.mpi-forum.org')">mpiwg-rma@lists.mpi-forum.org</a><br>
<a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-rma" target="_blank">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-rma</a><br>
</blockquote><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>