cart_sub.c: allow remain_dims==NULL if there is no topology on comm
Patch submitted by Gilles Gouaillardet on #4518. Reviewed by Jeff. Fixes trac:4518 cmr=v1.8.2:reviewer=ompi-rm1.8 This commit was SVN r31517. The following Trac tickets were found above: Ticket 4518 --> https://svn.open-mpi.org/trac/ompi/ticket/4518
Этот коммит содержится в:
родитель
e9b694f1d8
Коммит
ca80c7a9bd
@ -13,6 +13,8 @@
|
||||
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -59,7 +61,8 @@ int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm *new_comm)
|
||||
return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
}
|
||||
if (NULL == remain_dims || NULL == new_comm) {
|
||||
if (((NULL == remain_dims) && (0 != comm->c_topo->mtc.cart->ndims))
|
||||
&& (NULL == new_comm)) {
|
||||
return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user