File: PetscSubcomm.html

package info (click to toggle)
petsc 3.7.5%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 163,864 kB
  • ctags: 618,438
  • sloc: ansic: 515,133; python: 29,793; makefile: 20,458; fortran: 18,998; cpp: 6,515; f90: 3,914; sh: 1,012; xml: 621; objc: 445; csh: 240; java: 13
file content (66 lines) | stat: -rw-r--r-- 3,929 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscSubcomm.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscSubcomm</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
   <div id="version" align=right><b>petsc-3.7.5 2017-01-01</b></div>
   <div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.7.5 v3.7.5 docs/manualpages/Sys/PetscSubcomm.html "><small>Report Typos and Errors</small></a></div>
<A NAME="PetscSubcomm"><H1>PetscSubcomm</H1></A>
A decomposition of an MPI communicator into subcommunicators 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
typedef struct _n_PetscSubcomm* <A HREF="../Sys/PetscSubcomm.html#PetscSubcomm">PetscSubcomm</A>;
</PRE>
Notes: After a call to <A HREF="../Sys/PetscSubcommSetType.html#PetscSubcommSetType">PetscSubcommSetType</A>(), <A HREF="../Sys/PetscSubcommSetTypeGeneral.html#PetscSubcommSetTypeGeneral">PetscSubcommSetTypeGeneral</A>(), or <A HREF="../Sys/PetscSubcommSetFromOptions.html#PetscSubcommSetFromOptions">PetscSubcommSetFromOptions</A>() one may call
<pre>
    PetscSubcommChild() returns the associated subcommunicator on this process
</pre>
<pre>
    PetscSubcommContiguousParent() returns a parent communitor but with all child of the same subcommunicator having contiquous rank
</pre>
<P>
<H3><FONT COLOR="#CC3333">Sample Usage</FONT></H3>
<A HREF="../Sys/PetscSubcommCreate.html#PetscSubcommCreate">PetscSubcommCreate</A>()
<A HREF="../Sys/PetscSubcommSetNumber.html#PetscSubcommSetNumber">PetscSubcommSetNumber</A>()
<A HREF="../Sys/PetscSubcommSetType.html#PetscSubcommSetType">PetscSubcommSetType</A>(PETSC_SUBCOMM_INTERLACED);
ccomm = PetscSubcommChild()
<A HREF="../Sys/PetscSubcommDestroy.html#PetscSubcommDestroy">PetscSubcommDestroy</A>()
<P>

<P>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
<pre>
  PETSC_SUBCOMM_GENERAL - similar to MPI_Comm_split() each process sets the new communicator (color) they will belong to and the order within that communicator
</pre>
<pre>
  PETSC_SUBCOMM_CONTIGUOUS - each new communicator contains a set of process with contiquous ranks in the original MPI communicator
</pre>
<pre>
  PETSC_SUBCOMM_INTERLACED - each new communictor contains a set of processes equally far apart in rank from the others in that new communicator
</pre>
<P>
Examaple: Consider a communicator with six processes split into 3 subcommunicators.
<pre>
    PETSC_SUBCOMM_CONTIGUOUS - the first communicator contains rank 0,1  the second rank 2,3 and the third rank 4,5 in the original ordering of the original communicator
</pre>
<pre>
    PETSC_SUBCOMM_INTERLACED - the first communicator contains rank 0,3, the second 1,4 and the third 2,5
</pre>
<P>
Developer Notes: This is used in objects such as <A HREF="../PC/PCREDUNDANT.html#PCREDUNDANT">PCREDUNDANT</A>() to manage the subcommunicators on which the redundant computations
are performed.
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../Sys/PetscSubcommCreate.html#PetscSubcommCreate">PetscSubcommCreate</A>(), <A HREF="../Sys/PetscSubcommSetNumber.html#PetscSubcommSetNumber">PetscSubcommSetNumber</A>(), <A HREF="../Sys/PetscSubcommSetType.html#PetscSubcommSetType">PetscSubcommSetType</A>(), PetscSubcommView(), <A HREF="../Sys/PetscSubcommSetFromOptions.html#PetscSubcommSetFromOptions">PetscSubcommSetFromOptions</A>()
<BR>
<P>
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>advanced
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../include/petscsys.h.html#PetscSubcomm">include/petscsys.h</A>
<BR><A HREF="./index.html">Index of all Sys routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>