Lines Matching full:n

8   Collective (if `N` is `PETSC_DECIDE`)
13 . n - local length (or `PETSC_DECIDE` to have it set)
14 - N - global length (or `PETSC_DECIDE`)
19 `n` and `N` cannot be both `PETSC_DECIDE`
21 If one processor calls this with `N` of `PETSC_DECIDE` then all processors
26 PetscErrorCode PetscSplitOwnershipBlock(MPI_Comm comm, PetscInt bs, PetscInt *n, PetscInt *N) in PetscSplitOwnershipBlock() argument
31 …PetscCheck(*N != PETSC_DECIDE || *n != PETSC_DECIDE, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Both in PetscSplitOwnershipBlock()
33 if (*N == PETSC_DECIDE) { in PetscSplitOwnershipBlock()
34 …PetscCheck(*n % bs == 0, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "local size %" PetscInt_FMT " not … in PetscSplitOwnershipBlock()
35 PetscCallMPI(MPIU_Allreduce(n, N, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnershipBlock()
36 } else if (*n == PETSC_DECIDE) { in PetscSplitOwnershipBlock()
37 PetscInt Nbs = *N / bs; in PetscSplitOwnershipBlock()
40 *n = bs * (Nbs / size + ((Nbs % size) > rank)); in PetscSplitOwnershipBlock()
49 Collective (if `n` or `N` is `PETSC_DECIDE` or `PETSC_DETERMINE`)
53 . n - local length (or `PETSC_DECIDE` to have it set)
54 - N - global length (or `PETSC_DETERMINE` to have it set)
59 `n` and `N` cannot be both `PETSC_DECIDE` and `PETSC_DETERMINE`
61 …If one processor calls this with `n` of `PETSC_DECIDE` (or with `N` `PETSC_DETERMINE`) then all pr…
67 PetscErrorCode PetscSplitOwnership(MPI_Comm comm, PetscInt *n, PetscInt *N) in PetscSplitOwnership() argument
72 …PetscCheck(*N != PETSC_DECIDE || *n != PETSC_DECIDE, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Both in PetscSplitOwnership()
75 l[0] = (*n == PETSC_DECIDE) ? 1 : 0; in PetscSplitOwnership()
76 l[1] = (*N == PETSC_DECIDE) ? 1 : 0; in PetscSplitOwnership()
83 if (*N == PETSC_DECIDE) { in PetscSplitOwnership()
84 PetscCallMPI(MPIU_Allreduce(n, N, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnership()
85 } else if (*n == PETSC_DECIDE) { in PetscSplitOwnership()
88 *n = *N / size + ((*N % size) > rank); in PetscSplitOwnership()
91 PetscCallMPI(MPIU_Allreduce(n, &tmp, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnership()
92N, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Sum of local lengths %" PetscInt_FMT " does not equal glob… in PetscSplitOwnership()
101 Collective (if `n` or `N` is `PETSC_DECIDE`)
105 . n - local length (or `PETSC_DECIDE` to have it set)
106 - N - global length (or `PETSC_DECIDE`)
113 the local sizes when splitting `N`=50 with 6 processes are 9,9,9,9,9,5
115 n and N cannot be both `PETSC_DECIDE`
117 If one processor calls this with `n` or `N` of `PETSC_DECIDE` then all processors
123 PetscErrorCode PetscSplitOwnershipEqual(MPI_Comm comm, PetscInt *n, PetscInt *N) in PetscSplitOwnershipEqual() argument
128 …PetscCheck(*N != PETSC_DECIDE || *n != PETSC_DECIDE, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Both in PetscSplitOwnershipEqual()
131 l[0] = (*n == PETSC_DECIDE) ? 1 : 0; in PetscSplitOwnershipEqual()
132 l[1] = (*N == PETSC_DECIDE) ? 1 : 0; in PetscSplitOwnershipEqual()
139 if (*N == PETSC_DECIDE) { in PetscSplitOwnershipEqual()
140 PetscCallMPI(MPIU_Allreduce(n, N, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnershipEqual()
141 } else if (*n == PETSC_DECIDE) { in PetscSplitOwnershipEqual()
144 *n = *N / size; in PetscSplitOwnershipEqual()
145 if (*N % size) { in PetscSplitOwnershipEqual()
146 if ((rank + 1) * (*n + 1) <= *N) *n = *n + 1; in PetscSplitOwnershipEqual()
147 else if (rank * (*n + 1) <= *N) *n = *N - rank * (*n + 1); in PetscSplitOwnershipEqual()
148 else *n = 0; in PetscSplitOwnershipEqual()
152 PetscCallMPI(MPIU_Allreduce(n, &tmp, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnershipEqual()
153N, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Sum of local lengths %" PetscInt_FMT " does not equal glob… in PetscSplitOwnershipEqual()