Home
last modified time | relevance | path

Searched refs:nvtxs (Results 1 – 8 of 8) sorted by relevance

/petsc/src/dm/partitioner/impls/parmetis/
H A Dpartparmetis.c83 PetscInt nvtxs = numVertices; /* The number of vertices in full graph */ in PetscPartitionerPartition_ParMetis() local
105 …PetscCall(PetscMalloc4(size + 1, &vtxdist, nparts * ncon, &tpwgts, ncon, &ubvec, nvtxs, &assignmen… in PetscPartitionerPartition_ParMetis()
107 PetscCallMPI(MPI_Allgather(&nvtxs, 1, MPIU_INT, &vtxdist[1], 1, MPIU_INT, comm)); in PetscPartitionerPartition_ParMetis()
146 PetscCall(PetscMalloc1(nvtxs, &vwgt)); in PetscPartitionerPartition_ParMetis()
147 for (v = 0; v < nvtxs; ++v) PetscCall(PetscSectionGetDof(vertSection, v, &vwgt[v])); in PetscPartitionerPartition_ParMetis()
152 PetscCall(PetscMalloc1(xadj[nvtxs], &adjwgt)); in PetscPartitionerPartition_ParMetis()
153 …for (PetscInt e = 0; e < xadj[nvtxs]; ++e) PetscCall(PetscSectionGetDof(edgeSection, e, &adjwgt[e]… in PetscPartitionerPartition_ParMetis()
167 …err = METIS_PartGraphRecursive(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt, &nparts, tpwgts, u… in PetscPartitionerPartition_ParMetis()
179 …err = METIS_PartGraphKway(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt, &nparts, tpwgts, ubvec,… in PetscPartitionerPartition_ParMetis()
194 PetscCallMPI(MPI_Comm_split(pm->pcomm, !!nvtxs, rank, &pcomm)); in PetscPartitionerPartition_ParMetis()
[all …]
/petsc/src/dm/partitioner/impls/chaco/
H A Dpartchaco.c37 PETSC_EXTERN int interface(int nvtxs, int *start, int *adjacency, int *vwgts, float *ewgts, float *…
50 int nvtxs = numVertices; /* number of vertices in full graph */ in PetscPartitionerPartition_Chaco() local
101 PetscCall(PetscMalloc1(nvtxs, &assignment)); in PetscPartitionerPartition_Chaco()
116 …err = interface(nvtxs, (int *)start, (int *)adjacency, vwgts, ewgts, x, y, z, outassignname, outfi… in PetscPartitionerPartition_Chaco()
137 for (v = 0; v < nvtxs; ++v) PetscCall(PetscSectionAddDof(partSection, assignment[v], 1)); in PetscPartitionerPartition_Chaco()
138 PetscCall(PetscMalloc1(nvtxs, &points)); in PetscPartitionerPartition_Chaco()
140 for (v = 0; v < nvtxs; ++v) { in PetscPartitionerPartition_Chaco()
144 …PetscCheck(i == nvtxs, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Number of points %" PetscInt_FMT " should… in PetscPartitionerPartition_Chaco()
145 PetscCall(ISCreateGeneral(comm, nvtxs, points, PETSC_OWN_POINTER, partition)); in PetscPartitionerPartition_Chaco()
/petsc/src/dm/partitioner/impls/ptscotch/
H A Dpartptscotch.c206 PetscInt nvtxs = numVertices; /* The number of vertices in full graph */ in PetscPartitionerPartition_PTScotch() local
221 PetscCall(PetscMalloc2(size + 1, &vtxdist, PetscMax(nvtxs, 1), &assignment)); in PetscPartitionerPartition_PTScotch()
224 PetscCallMPI(MPI_Allgather(&nvtxs, 1, MPIU_INT, &vtxdist[1], 1, MPIU_INT, comm)); in PetscPartitionerPartition_PTScotch()
238 PetscCall(PetscMalloc1(nvtxs, &vwgt)); in PetscPartitionerPartition_PTScotch()
239 for (v = 0; v < nvtxs; ++v) PetscCall(PetscSectionGetDof(vertSection, v, &vwgt[v])); in PetscPartitionerPartition_PTScotch()
243 PetscCall(PetscMalloc1(xadj[nvtxs], &adjwgt)); in PetscPartitionerPartition_PTScotch()
244 …for (PetscInt e = 0; e < xadj[nvtxs]; ++e) PetscCall(PetscSectionGetDof(edgeSection, e, &adjwgt[e]… in PetscPartitionerPartition_PTScotch()
266 …if (rank == p) PetscCall(PTScotch_PartGraph_Seq(strat, imbal, nvtxs, xadj, adjncy, vwgt, adjwgt, n… in PetscPartitionerPartition_PTScotch()
273 PetscCallMPI(MPI_Comm_split(pts->pcomm, !!nvtxs, rank, &pcomm)); in PetscPartitionerPartition_PTScotch()
281 …if (nvtxs) PetscCall(PTScotch_PartGraph_MPI(strat, imbal, vtxdist, xadj, adjncy, vwgt, adjwgt, npa… in PetscPartitionerPartition_PTScotch()
[all …]
/petsc/src/ksp/pc/impls/bddc/
H A Dbddcgraph.c32 for (i = 0; i < graph->nvtxs; i++) { in PCBDDCGraphGetDirichletDofsB()
38 for (i = 0; i < graph->nvtxs; i++) { in PCBDDCGraphGetDirichletDofsB()
58 for (i = 0; i < graph->nvtxs; i++) { in PCBDDCGraphGetDirichletDofs()
64 for (i = 0; i < graph->nvtxs; i++) { in PCBDDCGraphGetDirichletDofs()
86 …etscViewerASCIISynchronizedPrintf(viewer, "Number of vertices %" PetscInt_FMT "\n", graph->nvtxs)); in PCBDDCGraphASCIIView()
92 for (i = 0; i < graph->nvtxs; i++) { in PCBDDCGraphASCIIView()
303 PetscCall(PetscBTCreate(graph->nvtxs, &cornerp)); in PCBDDCGraphComputeConnectedComponents()
441 PetscCall(PetscMalloc1(graph->nvtxs, &labels)); in PCBDDCGraphComputeConnectedComponents()
442 PetscCall(PetscArrayzero(labels, graph->nvtxs)); in PCBDDCGraphComputeConnectedComponents()
678 for (PetscInt i = 0; i < graph->nvtxs; i++) graph->nodes[i].touched = PETSC_FALSE; in PCBDDCGraphComputeConnectedComponentsLocal()
[all …]
H A Dbddc.c989 static PetscErrorCode PCBDDCSetLocalAdjacencyGraph_BDDC(PC pc, PetscInt nvtxs, const PetscInt xadj[… in PCBDDCSetLocalAdjacencyGraph_BDDC() argument
996 if (!nvtxs) { in PCBDDCSetLocalAdjacencyGraph_BDDC()
1004 if (mat_graph->nvtxs == nvtxs && mat_graph->freecsr) { /* we own the data */ in PCBDDCSetLocalAdjacencyGraph_BDDC()
1006 if (!same_data && mat_graph->xadj[nvtxs] == xadj[nvtxs]) { in PCBDDCSetLocalAdjacencyGraph_BDDC()
1007 PetscCall(PetscArraycmp(xadj, mat_graph->xadj, nvtxs + 1, &same_data)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1008 if (same_data) PetscCall(PetscArraycmp(adjncy, mat_graph->adjncy, xadj[nvtxs], &same_data)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1016 PetscCall(PetscMalloc1(nvtxs + 1, &mat_graph->xadj)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1017 PetscCall(PetscMalloc1(xadj[nvtxs], &mat_graph->adjncy)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1018 PetscCall(PetscArraycpy(mat_graph->xadj, xadj, nvtxs + 1)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1019 PetscCall(PetscArraycpy(mat_graph->adjncy, adjncy, xadj[nvtxs])); in PCBDDCSetLocalAdjacencyGraph_BDDC()
[all …]
H A Dbddcprivate.c1614 PetscCall(PetscMalloc2(graph->nvtxs + 1, &graph->cptr, ocptr[graph->ncc], &graph->queue)); in PCBDDCNedelecSupport()
7568 …at_graph->nvtxs_csr || pcbddc->mat_graph->nvtxs_csr == pcbddc->mat_graph->nvtxs, PETSC_COMM_SELF, … in PCBDDCAnalyzeInterface()
7569 pcbddc->mat_graph->nvtxs); in PCBDDCAnalyzeInterface()
7574 PetscInt nvtxs; in PCBDDCAnalyzeInterface() local
7594 …PetscCall(MatGetRowIJ(A, 0, PETSC_TRUE, PETSC_FALSE, &nvtxs, (const PetscInt **)&xadj, (const Pets… in PCBDDCAnalyzeInterface()
7596 PetscCall(PCBDDCSetLocalAdjacencyGraph(pc, nvtxs, xadj, adjncy, PETSC_COPY_VALUES)); in PCBDDCAnalyzeInterface()
7598 …PetscCall(MatRestoreRowIJ(A, 0, PETSC_TRUE, PETSC_FALSE, &nvtxs, (const PetscInt **)&xadj, (const … in PCBDDCAnalyzeInterface()
7627 …PetscCheck(!pcbddc->mat_graph->cnloc || pcbddc->mat_graph->cnloc == pcbddc->mat_graph->nvtxs, PETS… in PCBDDCAnalyzeInterface()
7628 pcbddc->mat_graph->nvtxs); in PCBDDCAnalyzeInterface()
9445 PetscInt nvtxs; in PCBDDCSetUpSubSchurs() local
[all …]
/petsc/src/mat/graphops/partition/impls/chaco/
H A Dchaco.c11 PETSC_EXTERN int interface(int nvtxs, int *start, int *adjacency, int *vwgts, float *ewgts, float *…
61 int nvtxs, *start, *adjacency, *vwgts, architecture, ndims_tot; in MatPartitioningApply_Chaco() local
110 nvtxs = mat->rmap->N; /* number of vertices in full graph */ in MatPartitioningApply_Chaco()
125 PetscCall(PetscMalloc1(start[nvtxs], &adjacency)); in MatPartitioningApply_Chaco()
126 for (i = 0; i < start[nvtxs]; i++) adjacency[i] = (adj->j)[i] + 1; /* 1-based indexing */ in MatPartitioningApply_Chaco()
138 …cerr = interface(nvtxs, start, adjacency, vwgts, NULL, NULL, NULL, NULL, NULL, NULL, assignment, a… in MatPartitioningApply_Chaco()
156 for (i = 0; i < nvtxs; i++) parttab[i] = assignment[i]; in MatPartitioningApply_Chaco()
/petsc/include/petsc/private/
H A Dpcbddcstructsimpl.h32 PetscInt nvtxs; member