[mpich-discuss] Can I enable/disable asynchronous progress in my code?
Pavan Balaji
balaji at mcs.anl.gov
Fri Sep 7 17:13:10 CDT 2012
Sorry, I misread the original email. And apparently can't spell either.
-- Pavan
On 09/07/2012 05:11 PM, Jed Brown wrote:
> On Fri, Sep 7, 2012 at 5:06 PM, Pavan Balaji <balaji at mcs.anl.gov
> <mailto:balaji at mcs.anl.gov>> wrote:
>
>
> You can use the MPICH_ASYNCH_PROGRESS=1 environment variable to do this.
>
>
> 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.
>
>
> -- Pavan
>
>
> On 09/07/2012 05:04 PM, Jeff Hammond wrote:
>
> You could do something like this:
>
> pthread_t progress_thread;
>
> void progress_engine
> {
> while(1)
> {
> MPI_Test(..);
> }
> return;
> }
>
> void start_my_progress_engine(void)
> {
> progress_thread = pthread_create(.., &progress_engine,..);
> return;
> }
>
> void stop_my_progress_engine(void)
> {
> pthread_kill(&progress_thread)__; /* if this type of call
> doesn't
> exist, then there's another way to do it... */
> return;
> }
>
> This is far from correct C or use of the Pthreads API but it is a
> crude approximation to how the MPICH2 progress engine works
> internall,
> except you get to control this one.
>
> MPI_Test should poke a real request that will never be satisfied
> until
> finalization.
>
> If you have any trouble, I'm sure one of us can give you a better
> implementation. I can just write a working one later in the week.
>
> One can imagine MPIX-ing this into MPICH2 properly. I'm sure
> everyone
> has more important things to do but if MPICH guys tell me they would
> accept a patch, I will make the MPIX at some point.
>
> Best,
>
> Jeff
>
> On Fri, Sep 7, 2012 at 2:51 PM, Jie Chen <jiechen at mcs.anl.gov
> <mailto:jiechen at mcs.anl.gov>> wrote:
>
> 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?
>
>
>
> --
> Jie Chen
> Mathematics and Computer Science Division
> Argonne National Laboratory
> Address: 9700 S Cass Ave, Bldg 240, Lemont, IL 60439
> Phone: (630) 252-3313 <tel:%28630%29%20252-3313>
> Email: jiechen at mcs.anl.gov <mailto:jiechen at mcs.anl.gov>
> Homepage: http://www.mcs.anl.gov/~__jiechen
> <http://www.mcs.anl.gov/~jiechen>
> _________________________________________________
> mpich-discuss mailing list mpich-discuss at mcs.anl.gov
> <mailto:mpich-discuss at mcs.anl.gov>
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/__mailman/listinfo/mpich-discuss
> <https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss>
>
>
>
>
>
> --
> Pavan Balaji
> http://www.mcs.anl.gov/~balaji
>
> _________________________________________________
> mpich-discuss mailing list mpich-discuss at mcs.anl.gov
> <mailto:mpich-discuss at mcs.anl.gov>
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/__mailman/listinfo/mpich-discuss
> <https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss>
>
>
>
>
> _______________________________________________
> mpich-discuss mailing list mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the mpich-discuss
mailing list