Eugene --

This ROMIO fix needs to go upstream.




On Feb 3, 2011, at 6:53 PM, eug...@osl.iu.edu wrote:

> Author: eugene
> Date: 2011-02-03 18:53:21 EST (Thu, 03 Feb 2011)
> New Revision: 24356
> URL: https://svn.open-mpi.org/trac/ompi/changeset/24356
> 
> Log:
> Some minor changes to help the openib BTL build and run on Solaris:
> - poll() can return POLLRDNORM even if not requested (Solaris bug)
> - MIN macro not defined in btl_openib.c
>  and while we're at it, we clean up the MIN definition in ad_bgl_pset.h
> - btl_openib_connect_rdmacm.c was calling rdma_destroy_id() twice
>  leading to undefined behavior (a hang on Solaris)
> 
> Text files modified: 
>   trunk/ompi/mca/btl/openib/btl_openib.c                        |     3 +++   
>                                   
>   trunk/ompi/mca/btl/openib/btl_openib_async.c                  |     7 
> +++++++                                 
>   trunk/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c |     6 
> +++++-                                  
>   trunk/ompi/mca/io/romio/romio/adio/ad_bgl/ad_bgl_pset.h       |     2 +-    
>                                   
>   4 files changed, 16 insertions(+), 2 deletions(-)
> 
> Modified: trunk/ompi/mca/btl/openib/btl_openib.c
> ==============================================================================
> --- trunk/ompi/mca/btl/openib/btl_openib.c    (original)
> +++ trunk/ompi/mca/btl/openib/btl_openib.c    2011-02-03 18:53:21 EST (Thu, 
> 03 Feb 2011)
> @@ -70,6 +70,9 @@
> #ifdef HAVE_UNISTD_H
> #include <unistd.h>
> #endif
> +#ifndef MIN
> +#define MIN(a,b) ((a)<(b)?(a):(b))
> +#endif
> 
> mca_btl_openib_module_t mca_btl_openib_module = {
>     {
> 
> Modified: trunk/ompi/mca/btl/openib/btl_openib_async.c
> ==============================================================================
> --- trunk/ompi/mca/btl/openib/btl_openib_async.c      (original)
> +++ trunk/ompi/mca/btl/openib/btl_openib_async.c      2011-02-03 18:53:21 EST 
> (Thu, 03 Feb 2011)
> @@ -432,6 +432,13 @@
>                     /* no events */
>                     break;
>                 case POLLIN:
> +#if defined(__SVR4) && defined(__sun)
> +                /*
> +                 * Need workaround for Solaris IB user verbs since
> +                 * "Poll on IB async fd returns POLLRDNORM revent even 
> though it is masked out"
> +                 */
> +                case POLLIN | POLLRDNORM:
> +#endif
>                     /* Processing our event */
>                     if (0 == i) {
>                         /* 0 poll we use for comunication with main thread */
> 
> Modified: trunk/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c
> ==============================================================================
> --- trunk/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c     
> (original)
> +++ trunk/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c     
> 2011-02-03 18:53:21 EST (Thu, 03 Feb 2011)
> @@ -1922,7 +1922,11 @@
>     return OMPI_SUCCESS;
> 
> out5:
> -    rdma_destroy_id(context->id);
> +    /*
> +     * Since rdma_create_id() succeeded, we need 
> "rdma_destroy_id(context->id)".
> +     * But don't do it here since it's part of out4:OBJ_RELEASE(context),
> +     * and we don't want to do it twice.
> +     */
> out4:
>     opal_list_remove_first(&(server->ids));
>     OBJ_RELEASE(context);
> 
> Modified: trunk/ompi/mca/io/romio/romio/adio/ad_bgl/ad_bgl_pset.h
> ==============================================================================
> --- trunk/ompi/mca/io/romio/romio/adio/ad_bgl/ad_bgl_pset.h   (original)
> +++ trunk/ompi/mca/io/romio/romio/adio/ad_bgl/ad_bgl_pset.h   2011-02-03 
> 18:53:21 EST (Thu, 03 Feb 2011)
> @@ -47,7 +47,7 @@
> 
> 
> #undef MIN
> -#define MIN(a,b) ((a<b ? a : b))
> +#define MIN(a,b) ((a)<(b) ? (a) : (b))
> 
> 
> /* Default is to choose 8 aggregator nodes in each 32 CN pset. 
> _______________________________________________
> svn-full mailing list
> svn-f...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/svn-full


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to