From 2e5e01a8dfd294ac3ee7ea2c47357efbe1e5254b Mon Sep 17 00:00:00 2001 From: Donald Kerr Date: Fri, 28 Jul 2006 13:58:21 +0000 Subject: [PATCH] Remove dependency on known port range and allow udapl to provide the port number. This commit was SVN r11040. --- ompi/mca/btl/udapl/btl_udapl.c | 24 +++++++----------------- ompi/mca/btl/udapl/btl_udapl.h | 5 ++--- ompi/mca/btl/udapl/btl_udapl_component.c | 4 ---- 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/ompi/mca/btl/udapl/btl_udapl.c b/ompi/mca/btl/udapl/btl_udapl.c index b05f5c388b..86c40a7314 100644 --- a/ompi/mca/btl/udapl/btl_udapl.c +++ b/ompi/mca/btl/udapl/btl_udapl.c @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2006 Sandia National Laboratories. All rights * reserved. + * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. + * * $COPYRIGHT$ * * Additional copyrights may follow @@ -121,23 +123,11 @@ mca_btl_udapl_init(DAT_NAME_PTR ia_name, mca_btl_udapl_module_t* btl) } /* create our public service point */ - /* We have to specify a port, so we go through a range until we - find a port that works */ - for(port = mca_btl_udapl_component.udapl_port_low; - port <= mca_btl_udapl_component.udapl_port_high; port++) { - - rc = dat_psp_create(btl->udapl_ia, port, btl->udapl_evd_conn, - DAT_PSP_CONSUMER_FLAG, &btl->udapl_psp); - if(DAT_SUCCESS == rc) { - break; - } else if(DAT_CONN_QUAL_IN_USE != rc) { - MCA_BTL_UDAPL_ERROR(rc, "dat_psp_create"); - goto failure; - } - } - - if(port == mca_btl_udapl_component.udapl_port_high) { - goto failure; + rc = dat_psp_create_any(btl->udapl_ia, &port, btl->udapl_evd_conn, + DAT_PSP_CONSUMER_FLAG, &btl->udapl_psp); + if(DAT_SUCCESS != rc) { + MCA_BTL_UDAPL_ERROR(rc, "dat_psp_create_any"); + goto failure; } /* Save the port with the address information */ diff --git a/ompi/mca/btl/udapl/btl_udapl.h b/ompi/mca/btl/udapl/btl_udapl.h index 3553eb125f..1ec820190b 100644 --- a/ompi/mca/btl/udapl/btl_udapl.h +++ b/ompi/mca/btl/udapl/btl_udapl.h @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. + * * $COPYRIGHT$ * * Additional copyrights may follow @@ -61,9 +63,6 @@ struct mca_btl_udapl_component_t { size_t udapl_eager_frag_size; size_t udapl_max_frag_size; - DAT_CONN_QUAL udapl_port_low; /**< first port for binding service point */ - DAT_CONN_QUAL udapl_port_high; /**< last port for binding service point */ - int udapl_free_list_num; /**< initial size of free lists */ int udapl_free_list_max; /**< maximum size of free lists */ int udapl_free_list_inc; /**< number of elements to alloc when growing */ diff --git a/ompi/mca/btl/udapl/btl_udapl_component.c b/ompi/mca/btl/udapl/btl_udapl_component.c index 7eea5e4548..52829e081b 100644 --- a/ompi/mca/btl/udapl/btl_udapl_component.c +++ b/ompi/mca/btl/udapl/btl_udapl_component.c @@ -158,10 +158,6 @@ int mca_btl_udapl_component_open(void) mca_btl_udapl_param_register_int("num_recvs", 8); mca_btl_udapl_component.udapl_num_sends = mca_btl_udapl_param_register_int("num_sends", 8); - mca_btl_udapl_component.udapl_port_low = - mca_btl_udapl_param_register_int("port_low", 45000); - mca_btl_udapl_component.udapl_port_high = - mca_btl_udapl_param_register_int("port_high", 49000); mca_btl_udapl_component.udapl_timeout = mca_btl_udapl_param_register_int("timeout", 10000000);