If the nodes dont have the same number of interfaces try to match them all. Dont return
unreacheable from the PTL layer. The decision if a node is reacheable or not is taken at the PML level. This commit was SVN r5245.
Этот коммит содержится в:
родитель
5ffe7b2697
Коммит
1edade9afc
@ -102,9 +102,9 @@ int mca_ptl_tcp_add_procs(
|
||||
*/
|
||||
OMPI_THREAD_LOCK(&ptl_proc->proc_lock);
|
||||
if(ptl_proc->proc_addr_count == ptl_proc->proc_peer_count) {
|
||||
OMPI_THREAD_UNLOCK(&ptl_proc->proc_lock);
|
||||
return OMPI_ERR_UNREACH;
|
||||
}
|
||||
OMPI_THREAD_UNLOCK(&ptl_proc->proc_lock);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* The ptl_proc datastructure is shared by all TCP PTL instances that are trying
|
||||
* to reach this destination. Cache the peer instance on the ptl_proc.
|
||||
|
@ -34,9 +34,9 @@
|
||||
* Structure used to publish TCP connection information to peers.
|
||||
*/
|
||||
struct mca_ptl_tcp_addr_t {
|
||||
struct in_addr addr_inet; /**< IPv4 address in network byte order */
|
||||
in_port_t addr_port; /**< listen port */
|
||||
unsigned short addr_inuse; /**< local meaning only */
|
||||
struct in_addr addr_inet; /**< IPv4 address in network byte order */
|
||||
in_port_t addr_port; /**< listen port */
|
||||
unsigned short addr_inuse; /**< local meaning only */
|
||||
};
|
||||
typedef struct mca_ptl_tcp_addr_t mca_ptl_tcp_addr_t;
|
||||
|
||||
|
@ -122,7 +122,7 @@ mca_ptl_tcp_component_t mca_ptl_tcp_component = {
|
||||
|
||||
mca_ptl_tcp_component_init,
|
||||
mca_ptl_tcp_component_control,
|
||||
mca_ptl_tcp_component_progress,
|
||||
NULL /*mca_ptl_tcp_component_progress*/,
|
||||
}
|
||||
};
|
||||
|
||||
@ -441,7 +441,7 @@ static int mca_ptl_tcp_component_create_listen(void)
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* register listen port */
|
||||
ompi_event_set(
|
||||
&mca_ptl_tcp_component.tcp_recv_event,
|
||||
@ -466,9 +466,9 @@ static int mca_ptl_tcp_component_exchange(void)
|
||||
mca_ptl_tcp_addr_t *addrs = (mca_ptl_tcp_addr_t *)malloc(size);
|
||||
for(i=0; i<mca_ptl_tcp_component.tcp_num_ptl_modules; i++) {
|
||||
mca_ptl_tcp_module_t* ptl = mca_ptl_tcp_component.tcp_ptl_modules[i];
|
||||
addrs[i].addr_inet = ptl->ptl_ifaddr.sin_addr;
|
||||
addrs[i].addr_port = mca_ptl_tcp_component.tcp_listen_port;
|
||||
addrs[i].addr_inuse = 0;
|
||||
addrs[i].addr_inet = ptl->ptl_ifaddr.sin_addr;
|
||||
addrs[i].addr_port = mca_ptl_tcp_component.tcp_listen_port;
|
||||
addrs[i].addr_inuse = 0;
|
||||
}
|
||||
rc = mca_base_modex_send(&mca_ptl_tcp_component.super.ptlm_version, addrs, size);
|
||||
free(addrs);
|
||||
|
@ -107,11 +107,10 @@ mca_ptl_tcp_proc_t* mca_ptl_tcp_proc_create(ompi_proc_t* ompi_proc)
|
||||
OMPI_THREAD_UNLOCK(&mca_ptl_tcp_component.tcp_lock);
|
||||
|
||||
/* lookup tcp parameters exported by this proc */
|
||||
rc = mca_base_modex_recv(
|
||||
&mca_ptl_tcp_component.super.ptlm_version,
|
||||
ompi_proc,
|
||||
(void**)&ptl_proc->proc_addrs,
|
||||
&size);
|
||||
rc = mca_base_modex_recv( &mca_ptl_tcp_component.super.ptlm_version,
|
||||
ompi_proc,
|
||||
(void**)&ptl_proc->proc_addrs,
|
||||
&size);
|
||||
if(rc != OMPI_SUCCESS) {
|
||||
ompi_output(0, "mca_ptl_tcp_proc_create: mca_base_modex_recv: failed with return value=%d", rc);
|
||||
OBJ_RELEASE(ptl_proc);
|
||||
@ -150,7 +149,8 @@ mca_ptl_tcp_proc_t* mca_ptl_tcp_proc_lookup(const orte_process_name_t *name)
|
||||
return proc;
|
||||
}
|
||||
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
/*
|
||||
* Note that this routine must be called with the lock on the process already
|
||||
* held. Insert a ptl instance into the proc array and assign it an address.
|
||||
@ -159,11 +159,13 @@ int mca_ptl_tcp_proc_insert(mca_ptl_tcp_proc_t* ptl_proc, mca_ptl_base_peer_t* p
|
||||
{
|
||||
struct mca_ptl_tcp_module_t *ptl_tcp = ptl_peer->peer_ptl;
|
||||
size_t i;
|
||||
unsigned long net1;
|
||||
|
||||
/* insert into peer array */
|
||||
ptl_peer->peer_proc = ptl_proc;
|
||||
ptl_proc->proc_peers[ptl_proc->proc_peer_count++] = ptl_peer;
|
||||
|
||||
net1 = ptl_tcp->ptl_ifaddr.sin_addr.s_addr & ptl_tcp->ptl_ifmask.sin_addr.s_addr;
|
||||
/*
|
||||
* Look through the proc instance for an address that is on the
|
||||
* directly attached network. If we don't find one, pick the first
|
||||
@ -171,7 +173,6 @@ int mca_ptl_tcp_proc_insert(mca_ptl_tcp_proc_t* ptl_proc, mca_ptl_base_peer_t* p
|
||||
*/
|
||||
for(i=0; i<ptl_proc->proc_addr_count; i++) {
|
||||
mca_ptl_tcp_addr_t* peer_addr = ptl_proc->proc_addrs + i;
|
||||
unsigned long net1 = ptl_tcp->ptl_ifaddr.sin_addr.s_addr & ptl_tcp->ptl_ifmask.sin_addr.s_addr;
|
||||
unsigned long net2 = peer_addr->addr_inet.s_addr & ptl_tcp->ptl_ifmask.sin_addr.s_addr;
|
||||
if(peer_addr->addr_inuse != 0)
|
||||
continue;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user