<div class="gmail_quote">On Fri, Sep 7, 2012 at 5:06 PM, Pavan Balaji <span dir="ltr"><<a href="mailto:balaji@mcs.anl.gov" target="_blank">balaji@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
You can use the MPICH_ASYNCH_PROGRESS=1 environment variable to do this.<br></blockquote><div><br></div><div>What? Besides being spelled MPICH_ASYNC_PROGRESS, this is only checked in MPI_Init/MPI_Init_thread so it doesn't help Jie who wants to change it during different phases of his simulation.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-- Pavan<div class="HOEnZb"><div class="h5"><br>
<br>
On 09/07/2012 05:04 PM, Jeff Hammond wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You could do something like this:<br>
<br>
pthread_t progress_thread;<br>
<br>
void progress_engine<br>
{<br>
while(1)<br>
{<br>
MPI_Test(..);<br>
}<br>
return;<br>
}<br>
<br>
void start_my_progress_engine(void)<br>
{<br>
progress_thread = pthread_create(.., &progress_engine,..);<br>
return;<br>
}<br>
<br>
void stop_my_progress_engine(void)<br>
{<br>
pthread_kill(&progress_thread)<u></u>; /* if this type of call doesn't<br>
exist, then there's another way to do it... */<br>
return;<br>
}<br>
<br>
This is far from correct C or use of the Pthreads API but it is a<br>
crude approximation to how the MPICH2 progress engine works internall,<br>
except you get to control this one.<br>
<br>
MPI_Test should poke a real request that will never be satisfied until<br>
finalization.<br>
<br>
If you have any trouble, I'm sure one of us can give you a better<br>
implementation. I can just write a working one later in the week.<br>
<br>
One can imagine MPIX-ing this into MPICH2 properly. I'm sure everyone<br>
has more important things to do but if MPICH guys tell me they would<br>
accept a patch, I will make the MPIX at some point.<br>
<br>
Best,<br>
<br>
Jeff<br>
<br>
On Fri, Sep 7, 2012 at 2:51 PM, Jie Chen <<a href="mailto:jiechen@mcs.anl.gov" target="_blank">jiechen@mcs.anl.gov</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It seems to me that the asynchronous progress for one sided communications can only be enabled/disabled through environment variables, and the state will be kept forever during the lifetime of a program. What if in the program I want some part of it to use asynchronous progress while the other part not? How can I achieve this?<br>
<br>
<br>
<br>
--<br>
Jie Chen<br>
Mathematics and Computer Science Division<br>
Argonne National Laboratory<br>
Address: 9700 S Cass Ave, Bldg 240, Lemont, IL 60439<br>
Phone: <a href="tel:%28630%29%20252-3313" value="+16302523313" target="_blank">(630) 252-3313</a><br>
Email: <a href="mailto:jiechen@mcs.anl.gov" target="_blank">jiechen@mcs.anl.gov</a><br>
Homepage: <a href="http://www.mcs.anl.gov/~jiechen" target="_blank">http://www.mcs.anl.gov/~<u></u>jiechen</a><br>
______________________________<u></u>_________________<br>
mpich-discuss mailing list <a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/<u></u>mailman/listinfo/mpich-discuss</a><br>
</blockquote>
<br>
<br>
<br>
</blockquote>
<br>
-- <br></div></div><span class="HOEnZb"><font color="#888888">
Pavan Balaji<br>
<a href="http://www.mcs.anl.gov/~balaji" target="_blank">http://www.mcs.anl.gov/~balaji</a></font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
mpich-discuss mailing list <a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/<u></u>mailman/listinfo/mpich-discuss</a><br>
</div></div></blockquote></div><br>