Коммит
06af6f1c4c
@ -10,7 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007-2018 Cisco Systems, Inc. All rights reserved
|
||||
* Copyright (c) 2006-2009 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
|
||||
@ -958,6 +958,7 @@ int ompi_dpm_open_port(char *port_name)
|
||||
r = opal_rand(&rnd);
|
||||
opal_convert_process_name_to_string(&tmp, OMPI_PROC_MY_NAME);
|
||||
snprintf(port_name, MPI_MAX_PORT_NAME-1, "%s:%u", tmp, r);
|
||||
port_name[MPI_MAX_PORT_NAME - 1] = '\0';
|
||||
free(tmp);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008-2015 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2018 Cisco Systems, Inc. All rights reserved
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -116,7 +117,7 @@ bool mca_fbtl_posix_progress ( mca_ompio_request_t *req)
|
||||
{
|
||||
bool ret=false;
|
||||
#if defined (FBTL_POSIX_HAVE_AIO)
|
||||
int i=0, lcount=0, ret_code;
|
||||
int i=0, lcount=0, ret_code=0;
|
||||
mca_fbtl_posix_request_data_t *data=(mca_fbtl_posix_request_data_t *)req->req_data;
|
||||
off_t start_offset, end_offset, total_length;
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
* Copyright (c) 2015-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 Cisco Systems, Inc. All rights reserved
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -947,9 +948,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
if (my_aggregator == fh->f_rank) {
|
||||
} }
|
||||
}
|
||||
|
||||
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
|
||||
end_exch = MPI_Wtime();
|
||||
@ -976,12 +975,12 @@ exit:
|
||||
decoded_iov = NULL;
|
||||
}
|
||||
|
||||
if (my_aggregator == fh->f_rank) {
|
||||
if (NULL != local_iov_array){
|
||||
free(local_iov_array);
|
||||
local_iov_array = NULL;
|
||||
}
|
||||
|
||||
if (NULL != local_iov_array){
|
||||
free(local_iov_array);
|
||||
local_iov_array = NULL;
|
||||
}
|
||||
if (my_aggregator == fh->f_rank) {
|
||||
for(l=0;l<fh->f_procs_per_group;l++){
|
||||
if (NULL != blocklen_per_process[l]){
|
||||
free(blocklen_per_process[l]);
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008-2017 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2011-2015 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011-2018 Cisco Systems, Inc. All rights reserved
|
||||
* Copyright (c) 2012-2013 Inria. All rights reserved.
|
||||
* Copyright (c) 2015-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
@ -1296,12 +1296,17 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh,
|
||||
if (NULL == aggr_bytes_per_group_tmp) {
|
||||
opal_output (1, "OUT OF MEMORY\n");
|
||||
ret = OMPI_ERR_OUT_OF_RESOURCE;
|
||||
free(end_offsets_tmp);
|
||||
goto exit;
|
||||
}
|
||||
decision_list_tmp = (int* )malloc (fh->f_init_num_aggrs * sizeof(int));
|
||||
if (NULL == decision_list_tmp) {
|
||||
opal_output (1, "OUT OF MEMORY\n");
|
||||
ret = OMPI_ERR_OUT_OF_RESOURCE;
|
||||
free(end_offsets_tmp);
|
||||
if (NULL != aggr_bytes_per_group_tmp) {
|
||||
free(aggr_bytes_per_group_tmp);
|
||||
}
|
||||
goto exit;
|
||||
}
|
||||
//Communicate bytes per group between all aggregators
|
||||
|
@ -5,7 +5,7 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 Cisco Systems, Inc. All rights reserved
|
||||
* Copyright (c) 2017-2018 Cisco Systems, Inc. All rights reserved
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -139,7 +139,7 @@ int ompi_osc_pt2pt_frag_flush_pending (ompi_osc_pt2pt_module_t *module, int targ
|
||||
|
||||
int ompi_osc_pt2pt_frag_flush_pending_all (ompi_osc_pt2pt_module_t *module)
|
||||
{
|
||||
int ret;
|
||||
int ret = OPAL_SUCCESS;
|
||||
|
||||
for (int i = 0 ; i < ompi_comm_size (module->comm) ; ++i) {
|
||||
ret = ompi_osc_pt2pt_frag_flush_pending (module, i);
|
||||
|
@ -17,6 +17,7 @@
|
||||
* Copyright (c) 2015 NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 Cisco Systems, Inc. All rights reserved
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -775,10 +776,12 @@ static int ompi_osc_rdma_query_mtls (void)
|
||||
if (mtls_to_use && ompi_mtl_base_selected_component) {
|
||||
for (int i = 0 ; mtls_to_use[i] ; ++i) {
|
||||
if (0 == strcmp (mtls_to_use[i], ompi_mtl_base_selected_component->mtl_version.mca_component_name)) {
|
||||
opal_argv_free(mtls_to_use);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
opal_argv_free(mtls_to_use);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -132,8 +132,8 @@ void free_non_constraint_tree(tm_tree_t *tree)
|
||||
{
|
||||
int d = tree->dumb;
|
||||
|
||||
free_list_child(tree);
|
||||
free_tab_child(tree);
|
||||
free_list_child(tree);
|
||||
if(!d)
|
||||
FREE(tree);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Cisco Systems, Inc. All rights reserved
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -110,9 +110,6 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm)
|
||||
send_first = true;
|
||||
}
|
||||
|
||||
/* ensure the port name is NULL terminated */
|
||||
memset(port_name, 0, MPI_MAX_PORT_NAME);
|
||||
|
||||
/* Assumption: socket_send should not block, even if the socket
|
||||
is not configured to be non-blocking, because the message length are
|
||||
so short. */
|
||||
@ -120,16 +117,21 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm)
|
||||
/* we will only use the send_first proc's port name,
|
||||
* so pass it to the recv_first participant */
|
||||
if (send_first) {
|
||||
/* open a port */
|
||||
// The port_name that we get back will be \0-terminated. The
|
||||
// strlen+\0 will be <= MPI_MAX_PORT_NAME characters.
|
||||
if (OMPI_SUCCESS != (rc = ompi_dpm_open_port(port_name))) {
|
||||
goto error;
|
||||
}
|
||||
// Send the strlen+1 so that we both send the \0 and the
|
||||
// receiver receives the \0.
|
||||
llen = (uint32_t)(strlen(port_name)+1);
|
||||
len = htonl(llen);
|
||||
ompi_socket_send( fd, (char *) &len, sizeof(uint32_t));
|
||||
ompi_socket_send (fd, port_name, llen);
|
||||
} else {
|
||||
ompi_socket_recv (fd, (char *) &rlen, sizeof(uint32_t));
|
||||
// The lrlen that we receive will be the strlen+1 (to account
|
||||
// for \0), and will be <= MPI_MAX_PORT_NAME.
|
||||
lrlen = ntohl(rlen);
|
||||
ompi_socket_recv (fd, port_name, lrlen);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2007 Voltaire. All rights reserved.
|
||||
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
|
||||
* Copyright (c) 2009-2018 Cisco Systems, Inc. All rights reserved
|
||||
* Copyright (c) 2010-2015 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved.
|
||||
@ -77,6 +77,8 @@ static int mca_btl_sm_component_register(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
opal_argv_free(names);
|
||||
}
|
||||
|
||||
// Tell the framework that we don't want this component to be
|
||||
|
@ -1183,8 +1183,8 @@ static int mca_btl_tcp_component_exchange(void)
|
||||
if ((AF_INET == my_ss.ss_family) &&
|
||||
(4 != mca_btl_tcp_component.tcp_disable_family)) {
|
||||
memcpy(&addrs[current_addr].addr_inet,
|
||||
&((struct sockaddr_in*)&my_ss)->sin_addr,
|
||||
sizeof(addrs[0].addr_inet));
|
||||
&((struct sockaddr_in*)&my_ss)->sin_addr,
|
||||
sizeof(struct in_addr));
|
||||
addrs[current_addr].addr_port =
|
||||
mca_btl_tcp_component.tcp_listen_port;
|
||||
addrs[current_addr].addr_family = MCA_BTL_TCP_AF_INET;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015-2017 Cisco Systems, Inc. All rights reserved
|
||||
* Copyright (c) 2015-2018 Cisco Systems, Inc. All rights reserved
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -417,7 +417,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
|
||||
unsigned int perm_size;
|
||||
int rc, *a = NULL;
|
||||
size_t i, j;
|
||||
mca_btl_tcp_interface_t** peer_interfaces;
|
||||
mca_btl_tcp_interface_t** peer_interfaces = NULL;
|
||||
mca_btl_tcp_proc_data_t _proc_data, *proc_data=&_proc_data;
|
||||
size_t max_peer_interfaces;
|
||||
memset(proc_data, 0, sizeof(mca_btl_tcp_proc_data_t));
|
||||
@ -451,7 +451,11 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
|
||||
|
||||
max_peer_interfaces = proc_data->max_local_interfaces;
|
||||
peer_interfaces = (mca_btl_tcp_interface_t**)calloc( max_peer_interfaces, sizeof(mca_btl_tcp_interface_t*) );
|
||||
assert(NULL != peer_interfaces);
|
||||
if (NULL == peer_interfaces) {
|
||||
max_peer_interfaces = 0;
|
||||
rc = OPAL_ERR_OUT_OF_RESOURCE;
|
||||
goto exit;
|
||||
}
|
||||
proc_data->num_peer_interfaces = 0;
|
||||
memset(proc_data->peer_kindex_to_index, -1, sizeof(int)*MAX_KERNEL_INTERFACE_INDEX);
|
||||
|
||||
@ -477,8 +481,9 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
|
||||
max_peer_interfaces <<= 1;
|
||||
peer_interfaces = (mca_btl_tcp_interface_t**)realloc( peer_interfaces,
|
||||
max_peer_interfaces * sizeof(mca_btl_tcp_interface_t*) );
|
||||
if( NULL == peer_interfaces )
|
||||
if( NULL == peer_interfaces ) {
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
}
|
||||
peer_interfaces[index] = (mca_btl_tcp_interface_t *) malloc(sizeof(mca_btl_tcp_interface_t));
|
||||
mca_btl_tcp_initialise_interface(peer_interfaces[index],
|
||||
@ -633,7 +638,8 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
|
||||
|
||||
a = (int *) malloc(perm_size * sizeof(int));
|
||||
if (NULL == a) {
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
rc = OPAL_ERR_OUT_OF_RESOURCE;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Can only find the best set of connections when the number of
|
||||
@ -695,6 +701,9 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
|
||||
OPAL_NAME_PRINT(btl_proc->proc_opal->proc_name));
|
||||
}
|
||||
|
||||
exit:
|
||||
// Ok to always free because proc_data() was memset() to 0 before
|
||||
// any possible return (and free(NULL) is fine).
|
||||
for(i = 0; i < perm_size; ++i) {
|
||||
free(proc_data->weights[i]);
|
||||
free(proc_data->best_addr[i]);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user