Home
last modified time | relevance | path

Searched refs:nroots (Results 1 – 25 of 57) sorted by relevance

123

/petsc/src/vec/is/sf/impls/basic/alltoall/
H A Dsfalltoall.c43 static PetscErrorCode PetscSFGetGraph_Alltoall(PetscSF sf, PetscInt *nroots, PetscInt *nleaves, con… in PetscSFGetGraph_Alltoall() argument
48 if (nroots) *nroots = sf->nroots; in PetscSFGetGraph_Alltoall()
67 PetscInt nroots = 1, nleaves = 1, *ilocal; in PetscSFCreateLocalSF_Alltoall() local
73 nroots = 1; in PetscSFCreateLocalSF_Alltoall()
83 …PetscCall(PetscSFSetGraph(lsf, nroots, nleaves, NULL /*contiguous leaves*/, PETSC_OWN_POINTER, ire… in PetscSFCreateLocalSF_Alltoall()
93 PetscMPIInt nroots, *roots, nleaves, *leaves, rank, ndiranks, ndranks; in PetscSFCreateEmbeddedRootSF_Alltoall() local
106nroots, comm, PETSC_ERR_ARG_OUTOFRANGE, "Min/Max root indices %" PetscInt_FMT "/%" PetscInt_FMT " … in PetscSFCreateEmbeddedRootSF_Alltoall()
107 PetscCall(PetscMPIIntCast(nselected, &nroots)); in PetscSFCreateEmbeddedRootSF_Alltoall()
109 for (PetscMPIInt i = 0; i < nroots; i++) PetscCall(PetscMPIIntCast(tmproots[i], &roots[i])); in PetscSFCreateEmbeddedRootSF_Alltoall()
113 …PetscCall(PetscCommBuildTwoSided(comm, 0 /*empty msg*/, MPI_INT /*fake*/, nroots, roots, NULL /*to… in PetscSFCreateEmbeddedRootSF_Alltoall()
[all …]
/petsc/src/vec/is/sf/tests/
H A Dex24.c7 PetscInt nroots, maxleaf; in testOverlappingCommunication() local
12 PetscCall(PetscSFGetGraph(sf, &nroots, NULL, NULL, NULL)); in testOverlappingCommunication()
14 PetscCall(PetscMalloc4(nroots, &roota, nroots, &rootb, maxleaf + 1, &leafa, maxleaf + 1, &leafb)); in testOverlappingCommunication()
17 for (PetscInt i = 0; i < nroots; i++) roota[i] = 0; in testOverlappingCommunication()
18 for (PetscInt i = 0; i < nroots; i++) rootb[i] = 0; in testOverlappingCommunication()
26 …for (PetscInt i = 0; i < nroots; i++) PetscCheck(roota[i] >= 0, PETSC_COMM_SELF, PETSC_ERR_PLIB, "… in testOverlappingCommunication()
27 …for (PetscInt i = 0; i < nroots; i++) PetscCheck(rootb[i] <= 0, PETSC_COMM_SELF, PETSC_ERR_PLIB, "… in testOverlappingCommunication()
29 for (PetscInt i = 0; i < nroots; i++) roota[i] = 0; in testOverlappingCommunication()
30 for (PetscInt i = 0; i < nroots; i++) rootb[i] = 0; in testOverlappingCommunication()
37 …for (PetscInt i = 0; i < nroots; i++) PetscCheck(roota[i] >= 0, PETSC_COMM_SELF, PETSC_ERR_PLIB, "… in testOverlappingCommunication()
[all …]
H A Dex10.c9 PetscInt nroots, nleaves; in main() local
22 nroots = 1; in main()
26 …PetscCall(PetscSFSetGraph(sfA0, nroots, nleaves, ilocalA0, PETSC_OWN_POINTER, iremoteA0, PETSC_OWN… in main()
31 nroots = 1; in main()
38 …PetscCall(PetscSFSetGraph(sfA1, nroots, nleaves, ilocalA1, PETSC_OWN_POINTER, iremoteA1, PETSC_OWN… in main()
43 nroots = 1; in main()
50 …PetscCall(PetscSFSetGraph(sfA2, nroots, nleaves, ilocalA2, PETSC_OWN_POINTER, iremoteA2, PETSC_OWN… in main()
55 nroots = 2; in main()
65 …PetscCall(PetscSFSetGraph(sfB, nroots, nleaves, ilocalB, PETSC_OWN_POINTER, iremoteB, PETSC_OWN_PO… in main()
H A Dex25.c9 PetscInt i, nroots, nleaves; in main() local
26 nroots = n; in main()
29 nroots = 0; in main()
37 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, NULL, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINTER… in main()
39 …PetscCall(PetscCalloc2(nroots * m, &rootdata, nleaves * m, &leafdata)); // allocate fat nodes to a… in main()
41 …if (rank == 0) rootdata[nroots * m - 1] = 123; // set the last integer in rootdata and then check … in main()
H A Dex17.c9 PetscInt i, nroots, nleaves; in main() local
31 nroots = n; in main()
34 nroots = 0; in main()
42 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, NULL, PETSC_COPY_VALUES, iremote, PETSC_COPY_VALUES… in main()
43 PetscCall(PetscMalloc2(nroots, &rootdata, nleaves, &leafdata)); in main()
45 memset(rootdata, 11, nroots); in main()
46 rootdata[nroots - 1] = 12; /* Use a different value at the end */ in main()
53 …PetscCheck(rank != 0 || (rootdata[0] == 22 && rootdata[nroots - 1] == 24), PETSC_COMM_SELF, PETSC_… in main()
H A Dex20.c10 PetscInt height = 2, width = 3, nroots = height, nleaves, dim = 2; in main() local
20 PetscCall(PetscMalloc2(nroots * dim, &rootcoords, nleaves * dim, &leafcoords)); in main()
33 PetscCall(PetscRealView(nroots * dim, rootcoords, viewer)); in main()
38 …PetscCall(PetscSFSetGraphFromCoordinates(sf, nroots, nleaves, dim, 1e-10, rootcoords, leafcoords)); in main()
H A Dex18.c96 PetscInt i, nroots, nleaves; in PetscSFViewCustom() local
104 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in PetscSFViewCustom()
107 …PetscCheck(nroots == rootLayout->n, PetscObjectComm((PetscObject)sf), PETSC_ERR_PLIB, "Assertion f… in PetscSFViewCustom()
113 …ynchronizedPrintf(viewer, "[%2d] %7" PetscInt_FMT " %6" PetscInt_FMT "\n", rank, nleaves, nroots)); in PetscSFViewCustom()
131 PetscInt nroots = ctx->n * ctx->nsfs; in CreateReferenceSF_Regular() local
157 …PetscCall(PetscSFSetGraph(sf, nroots, nLeaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in CreateReferenceSF_Regular()
163 PetscCall(PetscLayoutCreateFromSizes(ctx->comm, nroots, PETSC_DECIDE, 1, &map)); in CreateReferenceSF_Regular()
185 PetscInt nroots = ctx->n + ctx->rank + ctx->nsfs - 1 + ctx->size - 1; in CreateSFs_Irregular() local
210 …PetscCall(PetscSFSetGraph(sf, nroots, nLeaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in CreateSFs_Irregular()
246 PetscInt k, nroots = ctx->n; in CreateSFs_Regular() local
[all …]
H A Dex4k.kokkos.cxx37 PetscInt i, j, n, nroots, nleaves, niter = 100, nskip = 10; in main() local
89 nroots = n; in main()
92 nroots = 0; in main()
99 …PetscCall(PetscSFSetGraph(sf[i], nroots, nleaves, NULL, PETSC_COPY_VALUES, iremote, PETSC_COPY_VAL… in main()
H A Dex1.c8 PetscInt nroots, nleaves; in CheckGraphNotSet() local
14 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in CheckGraphNotSet()
15 PetscCheck(nroots < 0, PETSC_COMM_SELF, PETSC_ERR_PLIB, "SF graph is set"); in CheckGraphNotSet()
26 PetscInt nroots, nleaves; in CheckGraphEmpty() local
32 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in CheckGraphEmpty()
33 PetscCheck(!nroots, PETSC_COMM_SELF, PETSC_ERR_PLIB, "SF graph is not empty"); in CheckGraphEmpty()
H A Dex19.c89 PetscInt nroots = ctx->nLeavesPerRank; in CreateSF0() local
109 PetscCall(PetscSFSetGraph(sf, nroots, nLeaves, ilocal, ctx->localmode, iremote, ctx->remotemode)); in CreateSF0()
131 PetscInt nroots = ctx->nLeavesPerRank; in CreateSF1() local
148 …PetscCall(PetscSFSetGraph(sf, nroots, nLeaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in CreateSF1()
/petsc/src/vec/is/sf/interface/
H A Dsf.c64 b->nroots = -1; in PetscSFCreate()
118 sf->nroots = -1; in PetscSFReset()
456 PetscErrorCode PetscSFSetGraph(PetscSF sf, PetscInt nroots, PetscInt nleaves, PetscInt ilocal[], Pe… in PetscSFSetGraph() argument
464 …PetscCheck(nroots >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "nroots %" PetscInt_FMT ", cann… in PetscSFSetGraph()
471 if (sf->nroots >= 0) { /* Reset only if graph already set */ in PetscSFSetGraph()
483 sf->nroots = nroots; in PetscSFSetGraph()
626 sf->nroots = n; in PetscSFSetGraphWithPattern()
632 sf->nroots = n; in PetscSFSetGraphWithPattern()
638 sf->nroots = size; in PetscSFSetGraphWithPattern()
671 PetscInt i, nroots, nleaves, maxlocal, count, *newilocal; in PetscSFCreateInverseSF() local
[all …]
/petsc/src/vec/is/sf/impls/basic/allgatherv/
H A Dsfallgatherv.c4 PETSC_INTERN PetscErrorCode PetscSFGetGraph_Allgatherv(PetscSF sf, PetscInt *nroots, PetscInt *nlea… in PetscSFGetGraph_Allgatherv() argument
12 if (nroots) *nroots = sf->nroots; in PetscSFGetGraph_Allgatherv()
61 nRanksWithZeroRoots = (sf->nroots == 0) ? 1 : 0; /* I have no roots */ in PetscSFSetUp_Allgatherv()
66 dat->bcast_root = sf->nroots > 0 ? rank : -1; in PetscSFSetUp_Allgatherv()
117 PetscCall(PetscMPIIntCast(sf->nroots, &sendcount)); in PetscSFBcastBegin_Allgatherv()
144 …, (const char *)leafdata + (size_t)rstart * link->unitbytes, (size_t)sf->nroots * link->unitbytes)… in PetscSFReduceBegin_Allgatherv()
230 PetscCall(PetscMPIIntCast(sf->nroots, &sendcount)); in PetscSFBcastToZero_Allgatherv()
388 for (PetscMPIInt i = 0; i <= size; i++) dat->ioffset[i] = i * sf->nroots; in PetscSFGetLeafRanks_Allgatherv()
397 for (PetscInt j = 0; j < sf->nroots; j++) dat->irootloc[i * sf->nroots + j] = j; in PetscSFGetLeafRanks_Allgatherv()
407 PetscInt i, nroots, nleaves, rstart, *ilocal; in PetscSFCreateLocalSF_Allgatherv() local
[all …]
/petsc/src/vec/is/sf/tutorials/
H A Dex1.c21 PetscInt i, nroots, nleaves; in PetscSFViewCustomLocals_Private() local
26 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, NULL, &iremote)); in PetscSFViewCustomLocals_Private()
30 …s=%" PetscInt_FMT ", leaves=%" PetscInt_FMT ", remote ranks=%d\n", rank, nroots, nleaves, nranks)); in PetscSFViewCustomLocals_Private()
40 PetscInt i, bs = 2, nroots, nrootsalloc, nleaves, nleavesalloc, *mine, stride; in main() local
110 nroots = size; in main()
121 nroots = 2 + (PetscInt)(rank == 0); in main()
122 nrootsalloc = nroots * stride; in main()
159 nroots *= bs; in main()
178 for (i = 0; i < nroots; i++) rootdata[i * stride] = 100 * (rank + 1) + i; in main()
203 …for (i = 0; i < nroots; i++) rootdata[i * stride] = (char)('A' + rank * 3 + i); /* rank is very sm… in main()
[all …]
H A Dex1f.F9012 PetscInt i, nroots, nrootsalloc, nleaves, nleavesalloc, mine(6), stride
33 nroots = 3
35 nroots = 2
37 nrootsalloc = nroots*stride
78 do i = 1, nroots
H A Dex3.c14 PetscInt nroots, nleaves; in main() local
37 nroots = 1; in main()
45 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in main()
H A Dex2.c17 PetscInt nroots, nleaves; in main() local
33 nroots = 1; in main()
50 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in main()
/petsc/src/mat/utils/
H A Doverlapsplit.c17 PetscInt *indices_ov_rd, nroots, nleaves, *localoffsets, *indices_recv; in MatIncreaseOverlapSplit_Single() local
114 nroots = localsizes_sc[srank]; in MatIncreaseOverlapSplit_Single()
130 PetscCallMPI(MPI_Scatter(localsizes_sc, 1, MPIU_INT, &nroots, 1, MPIU_INT, 0, scomm)); in MatIncreaseOverlapSplit_Single()
132 PetscCall(PetscCalloc1(nroots, &indices_recv)); in MatIncreaseOverlapSplit_Single()
137 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, NULL, PETSC_OWN_POINTER, remote, PETSC_OWN_POINTER)… in MatIncreaseOverlapSplit_Single()
142 PetscCall(ISCreateGeneral(scomm, nroots, indices_recv, PETSC_OWN_POINTER, &is_sc)); in MatIncreaseOverlapSplit_Single()
/petsc/src/vec/is/sf/utils/
H A Dsfcoord.c118 PetscErrorCode PetscSFSetGraphFromCoordinates(PetscSF sf, PetscInt nroots, PetscInt nleaves, PetscI… in PetscSFSetGraphFromCoordinates() argument
132 if (nroots != 0) PetscAssertPointer(rootcoords, 6); in PetscSFSetGraphFromCoordinates()
135 PetscCall(GetBoundingBox_Internal(nroots, dim, rootcoords, bbox)); in PetscSFSetGraphFromCoordinates()
142 PetscCallMPI(MPI_Allgather(&nroots, 1, MPIU_INT, root_sizes, 1, MPIU_INT, comm)); in PetscSFSetGraphFromCoordinates()
162 …PetscCall(PetscSFSetGraph(psf, nroots, root_starts[num_ranks], NULL, PETSC_USE_POINTER, premote, P… in PetscSFSetGraphFromCoordinates()
210 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, NULL, PETSC_USE_POINTER, lremote, PETSC_OWN_POINTER… in PetscSFSetGraphFromCoordinates()
H A Dsfutils.c33 PetscInt i, nroots, ls = -1, ln = -1; in PetscSFSetGraphLayout() local
43 PetscCall(PetscLayoutGetLocalSize(layout, &nroots)); in PetscSFSetGraphLayout()
59 PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, localmode, remote, PETSC_OWN_POINTER)); in PetscSFSetGraphLayout()
135 PetscInt pStart, pEnd, p, nroots, nleaves = 0, l; in PetscSFSetGraphSection() local
147 PetscCall(PetscSectionGetConstrainedStorageSize(globalSection, &nroots)); in PetscSFSetGraphSection()
150 PetscCall(PetscLayoutSetLocalSize(layout, nroots)); in PetscSFSetGraphSection()
209 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, local, PETSC_OWN_POINTER, remote, PETSC_OWN_POINTER… in PetscSFSetGraphSection()
243 PetscInt numFields, nroots, rpStart, rpEnd, lpStart = PETSC_INT_MAX, lpEnd = -1, f, c; in PetscSFDistributeSection() local
288 PetscCall(PetscSFGetGraph(sf, &nroots, NULL, NULL, NULL)); in PetscSFDistributeSection()
289 rpEnd = PetscMin(rpEnd, nroots); in PetscSFDistributeSection()
[all …]
/petsc/src/vec/is/tests/
H A Dex5.c127 PetscInt nroots = -1, nleaves = -1, *ilocal; in main() local
171 nroots = 4; in main()
180 nroots = 3; in main()
190 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in main()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DSF.pyx164 nroots : int
178 cdef PetscInt nroots = 0, nleaves = 0
181 CHKERR(PetscSFGetGraph(self.sf, &nroots, &nleaves, &ilocal, &iremote))
188 return toInt(nroots), local, remote
190 def setGraph(self, nroots: int, local: Sequence[int], remote: Sequence[int]) -> None:
200 nroots
215 cdef PetscInt cnroots = asInt(nroots)
290 cdef PetscInt nroots = 0
293 CHKERR(PetscSFGetGraph(self.sf, &nroots, NULL, NULL, NULL))
294 degree = array_i(nroots, cdegree)
[all …]
/petsc/src/vec/is/sf/impls/basic/allgather/
H A Dsfallgather.c24 dat->rootbuflen[PETSCSF_REMOTE] = sf->nroots; in PetscSFSetUp_Allgather()
44 PetscCall(PetscMPIIntCast(sf->nroots, &sendcount)); in PetscSFBcastBegin_Allgather()
66 …, (const char *)leafdata + (size_t)rstart * link->unitbytes, (size_t)sf->nroots * link->unitbytes)… in PetscSFReduceBegin_Allgather()
99 PetscCall(PetscMPIIntCast(sf->nroots, &sendcount)); in PetscSFBcastToZero_Allgather()
/petsc/src/dm/impls/plex/
H A Dplexsfc.c437 PetscInt nroots, nleaves; in CreateDonorToPeriodicSF() local
446 PetscCall(PetscSFGetGraph(face_sf, &nroots, &nleaves, &filocal, &firemote)); in CreateDonorToPeriodicSF()
447 PetscCall(PetscCalloc2(2 * nroots, &rootdata, 2 * nroots, &leafdata)); in CreateDonorToPeriodicSF()
453 PetscCall(PetscSFReduceBegin(face_sf, MPIU_INT, leafdata, rootdata + nroots, MPIU_SUM)); in CreateDonorToPeriodicSF()
454 PetscCall(PetscSFReduceEnd(face_sf, MPIU_INT, leafdata, rootdata + nroots, MPIU_SUM)); in CreateDonorToPeriodicSF()
457 PetscCall(PetscBTCreate(nroots, rootbt)); in CreateDonorToPeriodicSF()
458 for (PetscInt p = 0; p < nroots; p++) { in CreateDonorToPeriodicSF()
459 const PetscInt *donor_dof = rootdata + nroots; in CreateDonorToPeriodicSF()
541 PetscInt nroots, nleaves; in DMPlexCorrectOrientationForIsoperiodic() local
628 PetscCall(PetscSFGetGraph(face_sf, &nroots, &nleaves, &filocal, NULL)); in DMPlexCorrectOrientationForIsoperiodic()
[all …]
/petsc/src/vec/ftn-mod/
H A Dpetscvec.h9070 subroutine PetscSFRestoreGraph(sf, nroots, nleaves, ilocal, iremote, ierr)
74 PetscInt :: nroots, nleaves
/petsc/src/dm/label/
H A Ddmlabel.c1910 PetscInt s, l, nroots, nleaves, offset, size; in DMLabelDistribute_Internal() local
1920 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, NULL, NULL)); in DMLabelDistribute_Internal()
1922 PetscCall(PetscSectionSetChart(rootSection, 0, nroots)); in DMLabelDistribute_Internal()
1936 PetscCall(PetscCalloc1(nroots, &rootIdx)); in DMLabelDistribute_Internal()
2108 PetscInt p, s, d, nroots, nleaves, nmultiroots, idx, dof, offset; in DMLabelGather() local
2139 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, NULL)); in DMLabelGather()
2140 PetscCall(PetscMalloc1(nroots, &leafPoints)); in DMLabelGather()
2141 for (p = 0; p < nroots; ++p) leafPoints[p].rank = leafPoints[p].index = -1; in DMLabelGather()
2150 for (p = 0, nmultiroots = 0; p < nroots; ++p) nmultiroots += rootDegree[p]; in DMLabelGather()
2155 …PetscCall(PetscSFSetGraph(sfLabel, nroots, nmultiroots, NULL, PETSC_OWN_POINTER, rootPoints, PETSC… in DMLabelGather()
[all …]

123