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