cray_upc_team_split

Date:

03-31-2014

NAME

cray_upc_team_split - Create a new Cray UPC team

SYNOPSIS

#include <upc_collective_cray.h>

cray_upc_return_t cray_upc_team_split( cray_upc_team_t team,
                                                     int color, int key, cray_upc_team_t *new_team );

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

The cray_upc_team_split function collectively creates new teams by splitting an existing team up based on the color and key values passed by each rank. All ranks with the same color become members of the same new team, and their rank in the new team is decided by the relative order of the keys. In the event that two or more ranks pass the same key, these ranks are ordered based on their relative rank in the original team.

RETURN VALUE

The cray_upc_team_split function returns CRAY_UPC_SUCCESS if it successfully created the new team, or CRAY_UPC_ERROR if an error occurred.

EXAMPLES

Example 1: Split a team into even and odd ranks

#include <upc_collective_cray.h>
. . .
cray_upc_team_split( old_team, old_rank % 2, 0, &new_team );

Example 2: Reverse the ordering of a team

#include <upc_collective_cray.h>
. . .
cray_upc_team_split( old_team, 0, old_size - old_rank, &new_team );

Example 3: Split a team into a team for each node

#include <upc_cray.h>
#include <upc_collective_cray.h>
. . .
cray_upc_team_split( old_team, MYNODE, 0, &new_team );

SEE ALSO

cray_upc_return_t(3c), cray_upc_team_t(3c), cray_upc_team_rank(3c), cray_upc_team_free(3c)