Home
last modified time | relevance | path

Searched refs:displs (Results 1 – 20 of 20) sorted by relevance

/petsc/src/sys/error/
H A Derr.c493 PetscMPIInt *sizes, Ntotal, *displs, NN; in PetscIntViewNumColumns() local
506 PetscCall(PetscMalloc1(size, &displs)); in PetscIntViewNumColumns()
507 displs[0] = 0; in PetscIntViewNumColumns()
510 displs[i] = displs[i - 1] + sizes[i - 1]; in PetscIntViewNumColumns()
513 PetscCallMPI(MPI_Gatherv(idx, NN, MPIU_INT, array, sizes, displs, MPIU_INT, 0, comm)); in PetscIntViewNumColumns()
516 PetscCall(PetscFree(displs)); in PetscIntViewNumColumns()
601 PetscMPIInt *sizes, *displs, Ntotal, NN; in PetscRealViewNumColumns() local
614 PetscCall(PetscMalloc1(size, &displs)); in PetscRealViewNumColumns()
615 displs[0] = 0; in PetscRealViewNumColumns()
618 displs[i] = displs[i - 1] + sizes[i - 1]; in PetscRealViewNumColumns()
[all …]
/petsc/src/dm/impls/plex/
H A Dplexorient.c554 PetscMPIInt *recvcounts = NULL, *displs = NULL, *Nc, p, o, itotNeighbors; in DMPlexOrient() local
559 PetscCall(PetscCalloc4(size, &recvcounts, size + 1, &displs, size, &Nc, size + 1, &Noff)); in DMPlexOrient()
561 for (p = 0; p < size; ++p) displs[p + 1] = displs[p] + Nc[p]; in DMPlexOrient()
562 if (rank == 0) PetscCall(PetscMalloc1(displs[size], &N)); in DMPlexOrient()
563 …PetscCallMPI(MPI_Gatherv(numNeighbors, numComponents, MPIU_INT, N, Nc, displs, MPIU_INT, 0, comm)); in DMPlexOrient()
567 displs[p + 1] = displs[p] + recvcounts[p]; in DMPlexOrient()
569 if (rank == 0) PetscCall(PetscMalloc2(displs[size], &adj, displs[size], &val)); in DMPlexOrient()
571 …PetscCallMPI(MPI_Gatherv(nrankComp, itotNeighbors, MPIU_SF_NODE, adj, recvcounts, displs, MPIU_SF_… in DMPlexOrient()
572 …PetscCallMPI(MPI_Gatherv(match, itotNeighbors, MPI_C_BOOL, val, recvcounts, displs, MPI_C_BOOL, 0,… in DMPlexOrient()
661 for (p = 0; p < size; ++p) displs[p + 1] = displs[p] + Nc[p]; in DMPlexOrient()
[all …]
/petsc/src/sys/tests/
H A Dex8.c15 MPI_Aint displs[3]; in MakeDatatype() local
26 displs[0] = (char *)&dummy.rank - (char *)&dummy; /* offsetof(Unit,rank); */ in MakeDatatype()
27 displs[1] = (char *)&dummy.value - (char *)&dummy; /* offsetof(Unit,value); */ in MakeDatatype()
28 displs[2] = (char *)&dummy.ok - (char *)&dummy; /* offsetof(Unit,ok); */ in MakeDatatype()
29 PetscCallMPI(MPI_Type_create_struct(3, lengths, displs, dtypes, &tmptype)); in MakeDatatype()
/petsc/src/vec/is/sf/impls/basic/gatherv/
H A Dsfgatherv.c29 …PetscCallMPI(MPIU_Igatherv(rootbuf, count, unit, leafbuf, dat->recvcounts, dat->displs, unit, 0 /*… in PetscSFLinkStartCommunication_Gatherv()
31 …PetscCallMPI(MPIU_Iscatterv(leafbuf, dat->recvcounts, dat->displs, unit, rootbuf, count, unit, 0, … in PetscSFLinkStartCommunication_Gatherv()
/petsc/src/vec/is/utils/hdf5/
H A Dhdf5io.c91 PetscMPIInt *counts, *displs, size, n; in PetscViewerHDF5ReadSizes_Private() local
111 PetscCall(PetscMalloc2(size, &counts, size, &displs)); in PetscViewerHDF5ReadSizes_Private()
114 PetscCall(PetscMPIIntCast(range[r], &displs[r])); in PetscViewerHDF5ReadSizes_Private()
117 PetscCallMPI(MPI_Allgatherv(lcind, n, MPIU_INT, ctx->cind, counts, displs, MPIU_INT, comm)); in PetscViewerHDF5ReadSizes_Private()
118 PetscCall(PetscFree2(counts, displs)); in PetscViewerHDF5ReadSizes_Private()
/petsc/include/
H A Dpetsclog.h546 … #define MPI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcount, displs, recvtype, comm) \ argument
547 …_Allgatherv((sendbuf), (sendcount), (sendtype), (recvbuf), (recvcount), (displs), (recvtype), (com…
552 …#define MPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcount, displs, recvtype, root, comm… argument
553 …MPI_Gatherv((sendbuf), (sendcount), (sendtype), (recvbuf), (recvcount), (displs), (recvtype), (roo…
558 …#define MPI_Scatterv(sendbuf, sendcount, displs, sendtype, recvbuf, recvcount, recvtype, root, com… argument
559 …ecv_len), &(petsc_recv_len_th)) || MPI_Scatterv((sendbuf), (sendcount), (displs), (sendtype), (rec…
570 …#define MPI_Iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcount, displs, recvtype, comm, … argument
571 …Iallgatherv((sendbuf), (sendcount), (sendtype), (recvbuf), (recvcount), (displs), (recvtype), (com…
576 …#define MPI_Igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcount, displs, recvtype, root, com… argument
577 …PI_Igatherv((sendbuf), (sendcount), (sendtype), (recvbuf), (recvcount), (displs), (recvtype), (roo…
[all …]
H A Dpetscsys.h2810 …terv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm) MPI_Scatterv… argument
2811 …ype, recvbuf, recvcounts, displs, recvtype, root, comm) MPI_Gatherv(sendbuf, sendcount, sendtype,… argument
2813 …#define MPIU_Scatterv(sendbuf, sendcount, displs, sendtype, recvbuf, recvcount, recvtype, root, co… argument
2815 …#define MPIU_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, co… argument
2885 …terv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm) MPI_Scatterv… argument
2886 …ype, recvbuf, recvcounts, displs, recvtype, root, comm) MPI_Gatherv(sendbuf, sendcount, sendtype,… argument
2888 …nts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm) MPI_Scatterv_c(sendbuf, (const MP… argument
2889 …nts, displs, recvtype, root, comm) MPI_Gatherv_c(sendbuf, sendcount, sendtype, recvbuf, (const MP… argument
/petsc/src/vec/is/sf/impls/basic/allgatherv/
H A Dsfallgatherv.h9 PetscMPIInt *displs, *recvcounts; member
H A Dsfallgatherv.c48 PetscCall(PetscMalloc1(size, &dat->displs)); in PetscSFSetUp_Allgatherv()
52 PetscCall(PetscMPIIntCast(range[i], &dat->displs[i])); in PetscSFSetUp_Allgatherv()
84 PetscCall(PetscFree(dat->displs)); in PetscSFReset_Allgatherv()
125 …PIU_Iallgatherv(rootbuf, sendcount, unit, leafbuf, dat->recvcounts, dat->displs, unit, comm, req)); in PetscSFBcastBegin_Allgatherv()
189 …eafbuf_alloc[PETSCSF_REMOTE][link->leafmtype_mpi], dat->recvcounts, dat->displs, unit, rootbuf, re… in PetscSFReduceBegin_Allgatherv()
233 …PetscCallMPI(MPIU_Igatherv(rootbuf, sendcount, unit, leafbuf, dat->recvcounts, dat->displs, unit, … in PetscSFBcastToZero_Allgatherv()
/petsc/src/snes/tutorials/
H A Dex13.c298 PetscMPIInt *cnt, *displs, p; in ComputeSpectral() local
300 PetscCall(PetscCalloc2(size, &cnt, size, &displs)); in ComputeSpectral()
302 for (p = 1; p < size; ++p) displs[p] = displs[p - 1] + cnt[p - 1]; in ComputeSpectral()
303 N = displs[size - 1] + cnt[size - 1]; in ComputeSpectral()
305 PetscCallMPI(MPI_Gatherv(ray, in, MPIU_REAL, gray, cnt, displs, MPIU_REAL, 0, comm)); in ComputeSpectral()
306 PetscCallMPI(MPI_Gatherv(svals, in, MPIU_SCALAR, gsvals, cnt, displs, MPIU_SCALAR, 0, comm)); in ComputeSpectral()
307 PetscCall(PetscFree2(cnt, displs)); in ComputeSpectral()
/petsc/include/petsc/mpiuni/
H A Dmpi.h494 …#define MPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, com… argument
495 …(MPIUNI_ARG(recvcounts), MPIUNI_ARG(displs), MPIUNI_ARG(recvtype), MPIUNI_ARG(root), MPIUNI_ARG(co…
496 …#define MPI_Gatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, c… argument
497 …(MPIUNI_ARG(recvcounts), MPIUNI_ARG(displs), MPIUNI_ARG(recvtype), MPIUNI_ARG(root), MPIUNI_ARG(co…
500 …#define MPI_Scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, co… argument
501 …(MPIUNI_ARG(displs), MPIUNI_ARG(sendtype), MPIUNI_ARG(sendcounts), MPIUNI_ARG(root), MPIUNI_ARG(co…
502 …#define MPI_Scatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, … argument
503 …(MPIUNI_ARG(displs), MPIUNI_ARG(sendtype), MPIUNI_ARG(sendcounts), MPIUNI_ARG(root), MPIUNI_ARG(co…
505 …#define MPI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) \ argument
506 …(MPIUNI_ARG(recvcounts), MPIUNI_ARG(displs), MPIUNI_ARG(recvtype), MPIUNI_ARG(comm), MPIUNI_Memcpy…
/petsc/src/sys/objects/
H A Dpinit.c1883 PetscMPIInt size, rank, ilen, *recvcounts = NULL, *displs = NULL; in PetscCheckAllreduceSameLineAndCount_Private() local
1894 if (rank == 0) PetscCall(PetscMalloc2(size, &recvcounts, size + 1, &displs)); in PetscCheckAllreduceSameLineAndCount_Private()
1897 displs[0] = 0; in PetscCheckAllreduceSameLineAndCount_Private()
1898 for (PetscMPIInt i = 0; i < size; i++) displs[i + 1] = displs[i] + recvcounts[i]; in PetscCheckAllreduceSameLineAndCount_Private()
1899 PetscCall(PetscMalloc1(displs[size], &str0)); in PetscCheckAllreduceSameLineAndCount_Private()
1901 PetscCallMPI(MPI_Gatherv(str, ilen, MPI_CHAR, str0, recvcounts, displs, MPI_CHAR, 0, comm)); in PetscCheckAllreduceSameLineAndCount_Private()
1902 if (rank == 0) str0[displs[size] - 1] = 0; /* replace the ending \n with NULL */ in PetscCheckAllreduceSameLineAndCount_Private()
1904 if (rank == 0) PetscCall(PetscFree2(recvcounts, displs)); in PetscCheckAllreduceSameLineAndCount_Private()
/petsc/src/vec/vec/utils/
H A Dvinv.c1769 PetscMPIInt *N, *displs, l; in VecUniqueEntries() local
1794 PetscCall(PetscMalloc2(ng, &vals, size + 1, &displs)); in VecUniqueEntries()
1795 for (p = 1, displs[0] = 0; p <= size; ++p) displs[p] = displs[p - 1] + N[p - 1]; in VecUniqueEntries()
1796 …PetscCallMPI(MPI_Allgatherv(tmp, l, MPIU_SCALAR, vals, N, displs, MPIU_SCALAR, PetscObjectComm((Pe… in VecUniqueEntries()
1801 *n = displs[size]; in VecUniqueEntries()
1808 PetscCall(PetscFree2(vals, displs)); in VecUniqueEntries()
/petsc/src/snes/utils/dm/
H A Ddminterpolatesnes.c185 PetscMPIInt *counts, *displs; in DMInterpolationSetUp() local
205 PetscCall(PetscMalloc3(N * ctx->dim, &globalPoints, size, &counts, size, &displs)); in DMInterpolationSetUp()
209 PetscCall(PetscMPIIntCast(ranges[p] * ctx->dim, &displs[p])); in DMInterpolationSetUp()
212 …PetscCallMPI(MPI_Allgatherv(ctx->points, in, MPIU_REAL, globalPoints, counts, displs, MPIU_REAL, c… in DMInterpolationSetUp()
216 counts = displs = NULL; in DMInterpolationSetUp()
281 if (!redundantPoints) PetscCall(PetscFree3(globalPoints, counts, displs)); in DMInterpolationSetUp()
/petsc/src/mat/utils/
H A Dmatstash.c737 MPI_Aint displs[2]; in MatStashBlockTypeSetUp() local
770 displs[0] = offsetof(struct DummyBlock, row); in MatStashBlockTypeSetUp()
771 displs[1] = offsetof(struct DummyBlock, vals); in MatStashBlockTypeSetUp()
774 PetscCallMPI(MPI_Type_create_struct(2, blocklens, displs, types, &stype)); in MatStashBlockTypeSetUp()
/petsc/src/sys/mpiuni/
H A Dmpi.c724 …buf, int *sendcount, int *sendtype, void *recvbuf, int *recvcounts, int *displs, int *recvtype, in… in petsc_mpi_allgatherv_() argument
726 …*ierr = MPI_Allgatherv(sendbuf, *sendcount, *sendtype, recvbuf, recvcounts, displs, *recvtype, *co… in petsc_mpi_allgatherv_()
/petsc/src/mat/impls/baij/mpi/
H A Dmpibaij.c2093 PetscMPIInt size, rank, *recvcounts = NULL, *displs = NULL; in MatGetSeqNonzeroStructure_MPIBAIJ() local
2105 displs = recvcounts + size; in MatGetSeqNonzeroStructure_MPIBAIJ()
2108 PetscCall(PetscMPIIntCast(A->rmap->range[i] / bs, &displs[i])); in MatGetSeqNonzeroStructure_MPIBAIJ()
2110 …PetscCallMPI(MPI_Allgatherv(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, lens, recvcounts, displs, MPIU_INT… in MatGetSeqNonzeroStructure_MPIBAIJ()
2148 displs[0] = 0; in MatGetSeqNonzeroStructure_MPIBAIJ()
2149 for (i = 1; i < size; i++) displs[i] = displs[i - 1] + recvcounts[i - 1]; in MatGetSeqNonzeroStructure_MPIBAIJ()
2150 …PetscCallMPI(MPI_Allgatherv(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, b->j, recvcounts, displs, MPIU_INT… in MatGetSeqNonzeroStructure_MPIBAIJ()
/petsc/src/dm/impls/network/
H A Dnetwork.c2881 PetscMPIInt rank, size, *displs = NULL, *recvcounts = NULL, remoterank; in DMNetworkSetVertexLocalToGlobalOrdering() local
2911 PetscCall(PetscMalloc3(size + 1, &vrange, size, &displs, size, &recvcounts)); in DMNetworkSetVertexLocalToGlobalOrdering()
2915 displs[i] = i; in DMNetworkSetVertexLocalToGlobalOrdering()
2921 PetscCallMPI(MPI_Allgatherv(&ii, 1, MPIU_INT, vrange + 1, recvcounts, displs, MPIU_INT, comm)); in DMNetworkSetVertexLocalToGlobalOrdering()
2934 PetscCall(PetscFree3(vrange, displs, recvcounts)); in DMNetworkSetVertexLocalToGlobalOrdering()
/petsc/src/mat/impls/aij/mpi/mumps/
H A Dmumps.c2768 PetscMPIInt *recvcounts, *displs, n; in MatSetFromOptions_MUMPS() local
2781 PetscCall(PetscCalloc2(size, &recvcounts, size + 1, &displs)); in MatSetFromOptions_MUMPS()
2784 for (PetscInt p = 0; p < size; ++p) displs[p + 1] = displs[p] + recvcounts[p]; in MatSetFromOptions_MUMPS()
2785 PetscCall(PetscMalloc1(displs[size] + 1, &blkptr)); in MatSetFromOptions_MUMPS()
2786 PetscCallMPI(MPI_Bcast(displs + size, 1, MPIU_INT, 0, PetscObjectComm((PetscObject)A))); in MatSetFromOptions_MUMPS()
2787 …PetscCallMPI(MPI_Gatherv(bsizes, n, MPIU_INT, blkptr + 1, recvcounts, displs, MPIU_INT, 0, PetscOb… in MatSetFromOptions_MUMPS()
2791 PetscCall(MatMumpsSetBlk(F, displs[size], NULL, blkptr)); in MatSetFromOptions_MUMPS()
2793 PetscCall(PetscFree2(recvcounts, displs)); in MatSetFromOptions_MUMPS()
/petsc/src/dm/interface/
H A Ddm.c5411 PetscMPIInt rank, size, p, *counts, *displs; in DMCompleteBCLabels_Internal() local
5462 PetscCall(PetscCalloc2(size, &counts, size + 1, &displs)); in DMCompleteBCLabels_Internal()
5464 for (p = 0; p < size; ++p) displs[p + 1] = displs[p] + counts[p]; in DMCompleteBCLabels_Internal()
5465 gNl = displs[size]; in DMCompleteBCLabels_Internal()
5468 displs[p] *= gmaxLen; in DMCompleteBCLabels_Internal()
5471 …PetscCallMPI(MPI_Allgatherv(sendNames, counts[rank], MPI_CHAR, recvNames, counts, displs, MPI_CHAR… in DMCompleteBCLabels_Internal()
5472 PetscCall(PetscFree2(counts, displs)); in DMCompleteBCLabels_Internal()