Thanks for pointing out orte_rml_recv_callback(). It does just what I
need. I removed my own callback and I am now using orte_rml_recv_callback()

I have extended the patches to fix the usage of static buffers
in SNAPC and SSTORE as well as removing all remaining occurrences
of TODOs in my 'getting-it-compiled-again' patches. The following
patches are ready to be committed:

2c69cdb SNAPC/CRCP/SSTORE: remove compiler warnings
 
https://lisas.de/git/?p=open-mpi.git;a=commitdiff;h=2c69cdbf3ab9ebcb8c05540ed8807faa3db25203

e60592b SNAPC: use ORTE_WAIT_FOR_COMPLETION with non-blocking receives
 
https://lisas.de/git/?p=open-mpi.git;a=commitdiff;h=e60592b629a8328538a2d752e0ec4b639a125465
 

17147ae SSTORE/CRCP: use ORTE_WAIT_FOR_COMPLETION with non-blocking receives
 
https://lisas.de/git/?p=open-mpi.git;a=commitdiff;h=17147aeb4b9b9d20133be1807ee3369c788fe923
 

ea3891e SSTORE: use dynamic buffers for rml.send and rml.recv
 
https://lisas.de/git/?p=open-mpi.git;a=commitdiff;h=ea3891ef9d095cfa40ade03fd676a1d61c932e5f
 

02c05d2 SNAPC: use dynamic buffers for rml.send and rml.recv
 
https://lisas.de/git/?p=open-mpi.git;a=commitdiff;h=02c05d2685dc111919c63936acdaf4a594da0fa0
 


On Tue, Jan 28, 2014 at 08:01:53AM -0800, Ralph Castain wrote:
> This looks okay to me. Couple of comments:
> 
> 1. if you don't want to create your own callback function, you can use the 
> standard one. It does more than you need, but won't hurt anything:
> 
> ORTE_DECLSPEC void orte_rml_recv_callback(int status, orte_process_name_t* 
> sender,
>                                           opal_buffer_t *buffer,
>                                           orte_rml_tag_t tag, void *cbdata);
> 
> The code is in orte/mca/rml/base/rml_base_frame.c
> 
> 2. be aware that ORTE_WAIT_FOR_COMPLETION will block if you are in an RML 
> callback. I don't think that's an issue here, but just wanted to point it out.
> 
> Ralph
> 
> On Jan 27, 2014, at 8:12 AM, Adrian Reber <adr...@lisas.de> wrote:
> 
> > I have the following patches which I would like to commit. All changes
> > are in the SNAPC component. The first patch replaces all statically
> > allocated buffers with dynamically allocate buffers. The second patch
> > removes compiler warnings and the last patch tries to re-introduce
> > functionality which I removed with my 'getting-it-compiled-again'
> > patches. Instead of blocking recv() calls it now uses
> > ORTE_WAIT_FOR_COMPLETION(). I included gitweb links to the patches.
> > 
> > Please have a look at the patches.
> > 
> >             Adrian
> > 
> > commit 6f10b44499b59c84d9032378c7f8c6b3526a029b
> > Author: Adrian Reber <adrian.re...@hs-esslingen.de>
> > Date:   Sun Jan 26 12:10:41 2014 +0100
> > 
> >    SNAPC: use dynamic buffers for rml.send and rml.recv
> > 
> >    The snapc component was still using static buffers
> >    for send_buffer_nb(). This patch changes opal_buffer_t buffer;
> >    to opal_buffer_t *buffer;
> > 
> > orte/mca/snapc/full/snapc_full_app.c    | 119 
> > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------
> > orte/mca/snapc/full/snapc_full_global.c |  73 
> > ++++++++++++++++++++++++++++++++++++------------------------------------
> > orte/mca/snapc/full/snapc_full_local.c  |  33 
> > +++++++++++++++++++--------------
> > 3 files changed, 114 insertions(+), 111 deletions(-)
> > 
> >  
> > https://lisas.de/git/?p=open-mpi.git;a=commitdiff;h=6f10b44499b59c84d9032378c7f8c6b3526a029b
> > 
> > commit 218d04ad663ad76ad23cd99b62e83c435ccfe418
> > Author: Adrian Reber <adrian.re...@hs-esslingen.de>
> > Date:   Mon Jan 27 12:49:30 2014 +0100
> > 
> >    SNAPC: remove compiler warnings
> > 
> > orte/mca/snapc/full/snapc_full_global.c | 19 +++++--------------
> > orte/mca/snapc/full/snapc_full_local.c  | 29 ++++++-----------------------
> > 2 files changed, 11 insertions(+), 37 deletions(-)
> > 
> >  
> > https://lisas.de/git/?p=open-mpi.git;a=commitdiff;h=218d04ad663ad76ad23cd99b62e83c435ccfe418
> > 
> > commit 67d435cbe5df5c59519d605ce25443880244d2d5
> > Author: Adrian Reber <adrian.re...@hs-esslingen.de>
> > Date:   Mon Jan 27 14:31:36 2014 +0100
> > 
> >    use ORTE_WAIT_FOR_COMPLETION with non-blocking receives
> > 
> >    During the commits to make the C/R code compile again the
> >    blocking receive calls in snapc_full_app.c were
> >    replaced by non-blocking receive calls with a dummy callback
> >    function. This commit adds ORTE_WAIT_FOR_COMPLETION()
> >    after each non-blocking receive to wait for the data.
> > 
> > orte/mca/snapc/full/snapc_full_app.c | 56 
> > +++++++++++++++++---------------------------------------
> > 1 file changed, 17 insertions(+), 39 deletions(-)
> > 
> >  
> > https://lisas.de/git/?p=open-mpi.git;a=commitdiff;h=67d435cbe5df5c59519d605ce25443880244d2d5
> > _______________________________________________
> > devel mailing list
> > de...@open-mpi.org
> > http://www.open-mpi.org/mailman/listinfo.cgi/devel

Reply via email to