.\" -*- nroff -*- .\" Copyright 2013 Los Alamos National Security, LLC. All rights reserved. .\" Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved. .\" Copyright 2006-2008 Sun Microsystems, Inc. .\" Copyright (c) 1996 Thinking Machines Corporation .\" $COPYRIGHT$ .TH MPI_Comm_split_type 3 "Sep 30, 2023" "4.1.6" "Open MPI" .SH NAME \fBMPI_Comm_split_type \fP \- Creates new communicators based on colors and keys. .SH SYNTAX .ft R .SH C Syntax .nf #include int MPI_Comm_split_type(MPI_Comm \fIcomm\fP, int\fI split_type\fP, int\fI key\fP, MPI_Info info, MPI_Comm *\fInewcomm\fP) .fi .SH Fortran Syntax .nf USE MPI ! or the older form: INCLUDE 'mpif.h' MPI_COMM_SPLIT_TYPE(\fICOMM, SPLIT_TYPE, KEY, INFO, NEWCOMM, IERROR\fP) INTEGER \fICOMM, SPLIT_TYPE, KEY, INFO, NEWCOMM, IERROR\fP .fi .SH Fortran 2008 Syntax .nf USE mpi_f08 MPI_Comm_split_type(\fIcomm\fP, \fIsplit_type\fP, \fIkey\fP, \fIinfo\fP, \fInewcomm\fP, \fIierror\fP) TYPE(MPI_Comm), INTENT(IN) :: \fIcomm\fP INTEGER, INTENT(IN) :: \fIsplit_type\fP, \fIkey\fP TYPE(MPI_Info), INTENT(IN) :: \fIinfo\fP TYPE(MPI_Comm), INTENT(OUT) :: \fInewcomm\fP INTEGER, OPTIONAL, INTENT(OUT) :: \fIierror\fP .fi .SH INPUT PARAMETERS .ft R .TP 1i comm Communicator (handle). .TP 1i split_type Type of processes to be grouped together (integer). .TP 1i key Control of rank assignment (integer). .TP 1i info Info argument (handle). .SH OUTPUT PARAMETERS .ft R .TP 1i newcomm New communicator (handle). .ft R .TP 1i IERROR Fortran only: Error status (integer). .SH DESCRIPTION .ft R This function partitions the group associated with \fIcomm\fP into disjoint subgroups, based on the type specied by \fIsplit_type\fP. Each subgroup contains all processes of the same type. Within each subgroup, the processes are ranked in the order defined by the value of the argument \fIkey\fP, with ties broken according to their rank in the old group. A new communicator is created for each subgroup and returned in newcomm. This is a collective call; all processes must provide the same \fIsplit_type\fP, but each process is permitted to provide different values for key. An exception to this rule is that a process may supply the type value MPI_UNDEFINED, in which case newcomm returns MPI_COMM_NULL. .SH SPLIT TYPES .ft R .TP 1i MPI_COMM_TYPE_SHARED This type splits the communicator into subcommunicators, each of which can create a shared memory region. .ft R .TP 1i OMPI_COMM_TYPE_NODE Synonym for MPI_COMM_TYPE_SHARED. .ft R .TP 1i OMPI_COMM_TYPE_HWTHREAD This type splits the communicator into subcommunicators, each of which belongs to the same hardware thread. .ft R .TP 1i OMPI_COMM_TYPE_CORE This type splits the communicator into subcommunicators, each of which belongs to the same core/processing unit. .ft R .TP 1i OMPI_COMM_TYPE_L1CACHE This type splits the communicator into subcommunicators, each of which belongs to the same L1 cache. .ft R .TP 1i OMPI_COMM_TYPE_L2CACHE This type splits the communicator into subcommunicators, each of which belongs to the same L2 cache. .ft R .TP 1i OMPI_COMM_TYPE_L3CACHE This type splits the communicator into subcommunicators, each of which belongs to the same L3 cache. .ft R .TP 1i OMPI_COMM_TYPE_SOCKET This type splits the communicator into subcommunicators, each of which belongs to the same socket. .ft R .TP 1i OMPI_COMM_TYPE_NUMA This type splits the communicator into subcommunicators, each of which belongs to the same NUMA-node. .ft R .TP 1i OMPI_COMM_TYPE_BOARD This type splits the communicator into subcommunicators, each of which belongs to the same board. .ft R .TP 1i OMPI_COMM_TYPE_HOST This type splits the communicator into subcommunicators, each of which belongs to the same host. .ft R .TP 1i OMPI_COMM_TYPE_CU This type splits the communicator into subcommunicators, each of which belongs to the same computational unit. .ft R .TP 1i OMPI_COMM_TYPE_CLUSTER This type splits the communicator into subcommunicators, each of which belongs to the same cluster. .SH NOTES .sp The communicator keys denoted with an .I OMPI_ prefix instead of an .I MPI_ prefix are specific to Open MPI, and are not part of the MPI standard. Their use should be protected by the .I OPEN_MPI C preprocessor macro. .SH ERRORS Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. .sp Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. .SH SEE ALSO .ft R .sp MPI_Comm_create .br MPI_Intercomm_create .br MPI_Comm_dup .br MPI_Comm_free .br MPI_Comm_split