Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
MPICH-BlueGene
Commits
60914260
Commit
60914260
authored
Nov 29, 2012
by
Pavan Balaji
Browse files
[svn-r10686] Added support for MPI_UNDEFINED in MPI_Comm_split_type. Fixes tt#1753.
Reviewed by goodell.
parent
7192e0d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mpi/comm/comm_split_type.c
View file @
60914260
...
...
@@ -34,11 +34,16 @@ int MPIR_Comm_split_type_impl(MPID_Comm * comm_ptr, int split_type, int key,
{
int
mpi_errno
=
MPI_SUCCESS
;
MPIU_Assert
(
split_type
==
MPI_COMM_TYPE_SHARED
);
/* Only MPI_COMM_TYPE_SHARED and MPI_UNDEFINED are supported */
MPIU_Assert
(
split_type
==
MPI_COMM_TYPE_SHARED
||
split_type
==
MPI_UNDEFINED
);
if
(
MPID_Comm_fns
==
NULL
||
MPID_Comm_fns
->
split_type
==
NULL
)
{
/* Default implementation is to just return MPI_COMM_SELF */
mpi_errno
=
MPIR_Comm_split_impl
(
comm_ptr
,
comm_ptr
->
rank
,
key
,
newcomm_ptr
);
int
color
=
(
split_type
==
MPI_COMM_TYPE_SHARED
)
?
comm_ptr
->
rank
:
MPI_UNDEFINED
;
/* The default implementation is to either pass MPI_UNDEFINED
* or the local rank as the color (in which case a dup of
* MPI_COMM_SELF is returned) */
mpi_errno
=
MPIR_Comm_split_impl
(
comm_ptr
,
color
,
key
,
newcomm_ptr
);
}
else
{
mpi_errno
=
...
...
src/mpid/ch3/src/mpid_init.c
View file @
60914260
...
...
@@ -55,7 +55,7 @@ static int split_type(MPID_Comm * comm_ptr, int stype, int key,
mpi_errno
=
MPID_Get_node_id
(
comm_ptr
,
comm_ptr
->
rank
,
&
id
);
if
(
mpi_errno
)
MPIU_ERR_POP
(
mpi_errno
);
nid
=
id
;
nid
=
(
stype
==
MPI_COMM_TYPE_SHARED
)
?
id
:
MPI_UNDEFINED
;
mpi_errno
=
MPIR_Comm_split_impl
(
comm_ptr
,
nid
,
key
,
newcomm_ptr
);
if
(
mpi_errno
)
MPIU_ERR_POP
(
mpi_errno
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment