Home
last modified time | relevance | path

Searched refs:sf (Results 1 – 25 of 144) sorted by relevance

123456

/petsc/src/vec/is/sf/tests/ !
H A Dex1.c6 static PetscErrorCode CheckGraphNotSet(PetscSF sf) in CheckGraphNotSet() argument
13 PetscCheck(!sf->graphset, PETSC_COMM_SELF, PETSC_ERR_PLIB, "SF graph is set"); in CheckGraphNotSet()
14 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in CheckGraphNotSet()
19 …PetscCheck(sf->minleaf == PETSC_INT_MAX, PETSC_COMM_SELF, PETSC_ERR_PLIB, "SF minimum leaf is not … in CheckGraphNotSet()
20 …PetscCheck(sf->maxleaf == PETSC_INT_MIN, PETSC_COMM_SELF, PETSC_ERR_PLIB, "SF minimum leaf is not … in CheckGraphNotSet()
24 static PetscErrorCode CheckGraphEmpty(PetscSF sf) in CheckGraphEmpty() argument
32 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in CheckGraphEmpty()
37 PetscCall(PetscSFGetLeafRange(sf, &minleaf, &maxleaf)); in CheckGraphEmpty()
43 static PetscErrorCode CheckRanksNotSet(PetscSF sf) in CheckRanksNotSet() argument
46 PetscCheck(sf->nranks == -1, PETSC_COMM_SELF, PETSC_ERR_PLIB, "SF ranks are set"); in CheckRanksNotSet()
[all …]
H A Dex24.c5 static PetscErrorCode testOverlappingCommunication(PetscSF sf) in testOverlappingCommunication() argument
11 PetscCall(PetscSFSetUp(sf)); in testOverlappingCommunication()
12 PetscCall(PetscSFGetGraph(sf, &nroots, NULL, NULL, NULL)); in testOverlappingCommunication()
13 PetscCall(PetscSFGetLeafRange(sf, NULL, &maxleaf)); in testOverlappingCommunication()
22 PetscCall(PetscSFReduceBegin(sf, MPIU_INT, leafa, roota, MPI_REPLACE)); in testOverlappingCommunication()
23 PetscCall(PetscSFReduceBegin(sf, MPIU_INT, leafb, rootb, MPI_REPLACE)); in testOverlappingCommunication()
24 PetscCall(PetscSFReduceEnd(sf, MPIU_INT, leafa, roota, MPI_REPLACE)); in testOverlappingCommunication()
25 PetscCall(PetscSFReduceEnd(sf, MPIU_INT, leafb, rootb, MPI_REPLACE)); in testOverlappingCommunication()
32 PetscCall(PetscSFReduceBegin(sf, MPIU_INT, leafa, roota, MPI_REPLACE)); in testOverlappingCommunication()
33 PetscCall(PetscSFReduceBegin(sf, MPIU_INT, leafb, rootb, MPI_REPLACE)); in testOverlappingCommunication()
[all …]
H A Dex18.c93 static PetscErrorCode PetscSFViewCustom(PetscSF sf, PetscViewer viewer) in PetscSFViewCustom() argument
103 PetscCall(PetscSFSetUp(sf)); in PetscSFViewCustom()
104 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in PetscSFViewCustom()
105 PetscCall(PetscSFGetRootRanks(sf, &nranks, NULL, NULL, NULL, NULL)); in PetscSFViewCustom()
106 PetscCall(PetscSFGetGraphLayout(sf, &rootLayout, NULL, NULL, &gremote)); in PetscSFViewCustom()
107 …PetscCheck(nroots == rootLayout->n, PetscObjectComm((PetscObject)sf), PETSC_ERR_PLIB, "Assertion f… in PetscSFViewCustom()
108 PetscCall(PetscObjectPrintClassNamePrefixType((PetscObject)sf, viewer)); in PetscSFViewCustom()
110 PetscCallMPI(MPI_Comm_rank(PetscObjectComm((PetscObject)sf), &rank)); in PetscSFViewCustom()
132 PetscSF sf; in CreateReferenceSF_Regular() local
137 PetscCall(PetscSFCreate(ctx->comm, &sf)); in CreateReferenceSF_Regular()
[all …]
/petsc/src/vec/is/sf/interface/ !
H A Dsf.c18sf, arg) PetscCheck((sf)->graphset, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE, "Must call PetscSFS… argument
20 #define PetscSFCheckGraphSet(sf, arg) \ argument
55 PetscErrorCode PetscSFCreate(MPI_Comm comm, PetscSF *sf) in PetscSFCreate() argument
60 PetscAssertPointer(sf, 2); in PetscSFCreate()
95 *sf = b; in PetscSFCreate()
111 PetscErrorCode PetscSFReset(PetscSF sf) in PetscSFReset() argument
114 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFReset()
115 PetscTryTypeMethod(sf, Reset); in PetscSFReset()
116 PetscCall(PetscSFDestroy(&sf->rankssf)); in PetscSFReset()
118 sf->nroots = -1; in PetscSFReset()
[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
11 PetscCallMPI(MPI_Comm_size(PetscObjectComm((PetscObject)sf), &size)); in PetscSFGetGraph_Allgatherv()
12 if (nroots) *nroots = sf->nroots; in PetscSFGetGraph_Allgatherv()
13 if (nleaves) *nleaves = sf->nleaves; in PetscSFGetGraph_Allgatherv()
16 …if (!sf->remote && sf->nleaves) { /* The && sf->nleaves makes sfgatherv able to inherit this routi… in PetscSFGetGraph_Allgatherv()
17 PetscCall(PetscLayoutGetRanges(sf->map, &range)); in PetscSFGetGraph_Allgatherv()
18 PetscCall(PetscMalloc1(sf->nleaves, &sf->remote)); in PetscSFGetGraph_Allgatherv()
19 sf->remote_alloc = sf->remote; in PetscSFGetGraph_Allgatherv()
22 sf->remote[j].rank = i; in PetscSFGetGraph_Allgatherv()
23 sf->remote[j].index = k; in PetscSFGetGraph_Allgatherv()
[all …]
/petsc/src/vec/is/sf/impls/basic/allgather/ !
H A Dsfallgather.c6 PetscErrorCode PetscSFSetUp_Allgather(PetscSF sf) in PetscSFSetUp_Allgather() argument
9 PetscSF_Allgather *dat = (PetscSF_Allgather *)sf->data; in PetscSFSetUp_Allgather()
13 sf->leafbuflen[i] = 0; in PetscSFSetUp_Allgather()
14 sf->leafstart[i] = 0; in PetscSFSetUp_Allgather()
15 sf->leafcontig[i] = PETSC_TRUE; in PetscSFSetUp_Allgather()
16 sf->leafdups[i] = PETSC_FALSE; in PetscSFSetUp_Allgather()
23 sf->leafbuflen[PETSCSF_REMOTE] = sf->nleaves; in PetscSFSetUp_Allgather()
24 dat->rootbuflen[PETSCSF_REMOTE] = sf->nroots; in PetscSFSetUp_Allgather()
25 sf->persistent = PETSC_FALSE; in PetscSFSetUp_Allgather()
26sf->nleafreqs = 0; /* MPI collectives only need one request. We treat it as a ro… in PetscSFSetUp_Allgather()
[all …]
/petsc/src/vec/is/sf/impls/basic/gatherv/ !
H A Dsfgatherv.c8 static PetscErrorCode PetscSFLinkStartCommunication_Gatherv(PetscSF sf, PetscSFLink link, PetscSFDi… in PetscSFLinkStartCommunication_Gatherv() argument
12 PetscSF_Gatherv *dat = (PetscSF_Gatherv *)sf->data; in PetscSFLinkStartCommunication_Gatherv()
19 …PetscCall(PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host bef… in PetscSFLinkStartCommunication_Gatherv()
21 …PetscCall(PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host */)… in PetscSFLinkStartCommunication_Gatherv()
23 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFLinkStartCommunication_Gatherv()
24 PetscCall(PetscMPIIntCast(sf->nroots, &count)); in PetscSFLinkStartCommunication_Gatherv()
25 …PetscCall(PetscSFLinkGetMPIBuffersAndRequests(sf, link, direction, &rootbuf, &leafbuf, &req, NULL)… in PetscSFLinkStartCommunication_Gatherv()
26 PetscCall(PetscSFLinkSyncStreamBeforeCallMPI(sf, link)); in PetscSFLinkStartCommunication_Gatherv()
36 static PetscErrorCode PetscSFSetCommunicationOps_Gatherv(PetscSF sf, PetscSFLink link) in PetscSFSetCommunicationOps_Gatherv() argument
43 PETSC_INTERN PetscErrorCode PetscSFFetchAndOpBegin_Gatherv(PetscSF sf, MPI_Datatype unit, PetscMemT… in PetscSFFetchAndOpBegin_Gatherv() argument
[all …]
/petsc/src/vec/is/sf/impls/basic/gather/ !
H A Dsfgather.c7 static PetscErrorCode PetscSFLinkStartCommunication_Gather(PetscSF sf, PetscSFLink link, PetscSFDir… in PetscSFLinkStartCommunication_Gather() argument
17 …PetscCall(PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host bef… in PetscSFLinkStartCommunication_Gather()
19 …PetscCall(PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host */)… in PetscSFLinkStartCommunication_Gather()
21 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFLinkStartCommunication_Gather()
22 PetscCall(PetscMPIIntCast(sf->nroots, &count)); in PetscSFLinkStartCommunication_Gather()
23 …PetscCall(PetscSFLinkGetMPIBuffersAndRequests(sf, link, direction, &rootbuf, &leafbuf, &req, NULL)… in PetscSFLinkStartCommunication_Gather()
24 PetscCall(PetscSFLinkSyncStreamBeforeCallMPI(sf, link)); in PetscSFLinkStartCommunication_Gather()
34 static PetscErrorCode PetscSFSetCommunicationOps_Gather(PetscSF sf, PetscSFLink link) in PetscSFSetCommunicationOps_Gather() argument
41 PETSC_INTERN PetscErrorCode PetscSFCreate_Gather(PetscSF sf) in PetscSFCreate_Gather() argument
43 PetscSF_Gather *dat = (PetscSF_Gather *)sf->data; in PetscSFCreate_Gather()
[all …]
/petsc/src/vec/is/sf/impls/basic/alltoall/ !
H A Dsfalltoall.c8 static PetscErrorCode PetscSFLinkStartCommunication_Alltoall(PetscSF sf, PetscSFLink link, PetscSFD… in PetscSFLinkStartCommunication_Alltoall() argument
17 …PetscCall(PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host bef… in PetscSFLinkStartCommunication_Alltoall()
19 …PetscCall(PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host */)… in PetscSFLinkStartCommunication_Alltoall()
21 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFLinkStartCommunication_Alltoall()
22 …PetscCall(PetscSFLinkGetMPIBuffersAndRequests(sf, link, direction, &rootbuf, &leafbuf, &req, NULL)… in PetscSFLinkStartCommunication_Alltoall()
23 PetscCall(PetscSFLinkSyncStreamBeforeCallMPI(sf, link)); in PetscSFLinkStartCommunication_Alltoall()
33 static PetscErrorCode PetscSFSetCommunicationOps_Alltoall(PetscSF sf, PetscSFLink link) in PetscSFSetCommunicationOps_Alltoall() argument
43 static PetscErrorCode PetscSFGetGraph_Alltoall(PetscSF sf, PetscInt *nroots, PetscInt *nleaves, con… in PetscSFGetGraph_Alltoall() argument
48 if (nroots) *nroots = sf->nroots; in PetscSFGetGraph_Alltoall()
49 if (nleaves) *nleaves = sf->nleaves; in PetscSFGetGraph_Alltoall()
[all …]
/petsc/src/vec/is/sf/impls/basic/nvshmem/ !
H A Dsfnvshmem.cu54 PetscErrorCode PetscSFReset_Basic_NVSHMEM(PetscSF sf) in PetscSFReset_Basic_NVSHMEM() argument
56 PetscSF_Basic *bas = (PetscSF_Basic *)sf->data; in PetscSFReset_Basic_NVSHMEM()
60 PetscCall(PetscSFFree(sf, PETSC_MEMTYPE_CUDA, bas->leafbufdisp_d)); in PetscSFReset_Basic_NVSHMEM()
61 PetscCall(PetscSFFree(sf, PETSC_MEMTYPE_CUDA, bas->leafsigdisp_d)); in PetscSFReset_Basic_NVSHMEM()
62 PetscCall(PetscSFFree(sf, PETSC_MEMTYPE_CUDA, bas->iranks_d)); in PetscSFReset_Basic_NVSHMEM()
63 PetscCall(PetscSFFree(sf, PETSC_MEMTYPE_CUDA, bas->ioffset_d)); in PetscSFReset_Basic_NVSHMEM()
65 PetscCall(PetscFree2(sf->rootsigdisp, sf->rootbufdisp)); in PetscSFReset_Basic_NVSHMEM()
66 PetscCall(PetscSFFree(sf, PETSC_MEMTYPE_CUDA, sf->rootbufdisp_d)); in PetscSFReset_Basic_NVSHMEM()
67 PetscCall(PetscSFFree(sf, PETSC_MEMTYPE_CUDA, sf->rootsigdisp_d)); in PetscSFReset_Basic_NVSHMEM()
68 PetscCall(PetscSFFree(sf, PETSC_MEMTYPE_CUDA, sf->ranks_d)); in PetscSFReset_Basic_NVSHMEM()
[all …]
/petsc/src/vec/is/sf/impls/basic/ !
H A Dsfbasic.c6 static PetscErrorCode PetscSFLinkInitMPIRequests_Persistent_Basic(PetscSF sf, PetscSFLink link, Pet… in PetscSFLinkInitMPIRequests_Persistent_Basic() argument
8 PetscSF_Basic *bas = (PetscSF_Basic *)sf->data; in PetscSFLinkInitMPIRequests_Persistent_Basic()
13 MPI_Comm comm = PetscObjectComm((PetscObject)sf); in PetscSFLinkInitMPIRequests_Persistent_Basic()
20 PetscCall(PetscSFGetRootInfo_Basic(sf, &nrootranks, &ndrootranks, NULL, &rootoffset, NULL)); in PetscSFLinkInitMPIRequests_Persistent_Basic()
37 …if (sf->leafbuflen[PETSCSF_REMOTE] && !link->leafreqsinited[direction][leafmtype_mpi][leafdirect_m… in PetscSFLinkInitMPIRequests_Persistent_Basic()
38 … PetscCall(PetscSFGetLeafInfo_Basic(sf, &nleafranks, &ndleafranks, NULL, &leafoffset, NULL, NULL)); in PetscSFLinkInitMPIRequests_Persistent_Basic()
43 …_Send_init(link->leafbuf[PETSCSF_REMOTE][leafmtype_mpi] + disp, cnt, unit, sf->ranks[i], link->tag… in PetscSFLinkInitMPIRequests_Persistent_Basic()
49 …_Recv_init(link->leafbuf[PETSCSF_REMOTE][leafmtype_mpi] + disp, cnt, unit, sf->ranks[i], link->tag… in PetscSFLinkInitMPIRequests_Persistent_Basic()
58 static PetscErrorCode PetscSFLinkStartCommunication_Persistent_Basic(PetscSF sf, PetscSFLink link, … in PetscSFLinkStartCommunication_Persistent_Basic() argument
62 PetscSF_Basic *bas = (PetscSF_Basic *)sf->data; in PetscSFLinkStartCommunication_Persistent_Basic()
[all …]
H A Dsfmpi.c6 static PetscErrorCode PetscSFLinkFinishCommunication_Default(PetscSF sf, PetscSFLink link, PetscSFD… in PetscSFLinkFinishCommunication_Default() argument
8 PetscSF_Basic *bas = (PetscSF_Basic *)sf->data; in PetscSFLinkFinishCommunication_Default()
13 if (sf->monitor) { in PetscSFLinkFinishCommunication_Default()
20 PetscCallMPI(MPI_Comm_rank(PetscObjectComm((PetscObject)sf), &rank)); in PetscSFLinkFinishCommunication_Default()
28 for (PetscMPIInt i = 0; i < sf->nleafreqs; i++) { in PetscSFLinkFinishCommunication_Default()
29 … size_t size = (sf->roffset[i + sf->ndranks + 1] - sf->roffset[i + sf->ndranks]) * link->unitbytes; in PetscSFLinkFinishCommunication_Default()
30 …s Rank %6d (%16zu bytes) with MPI tag %10d ... ", rank, leafaction, sf->ranks[i + sf->ndranks], si… in PetscSFLinkFinishCommunication_Default()
37 …if (sf->nleafreqs) PetscCallMPI(MPI_Waitall(sf->nleafreqs, link->leafreqs[direction][leafmtype_mpi… in PetscSFLinkFinishCommunication_Default()
41 …PetscCall(PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_FALSE /* host2device af… in PetscSFLinkFinishCommunication_Default()
43 PetscCall(PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_FALSE)); in PetscSFLinkFinishCommunication_Default()
[all …]
H A Dsfpack.c395 PetscErrorCode PetscSFLinkDestroy(PetscSF sf, PetscSFLink link) in PetscSFLinkDestroy() argument
397 PetscSF_Basic *bas = (PetscSF_Basic *)sf->data; in PetscSFLinkDestroy()
398 PetscInt i, nreqs = (bas->nrootreqs + sf->nleafreqs) * 8; in PetscSFLinkDestroy()
402 if (link->deviceinited) PetscCall((*link->Destroy)(sf, link)); in PetscSFLinkDestroy()
420 PetscErrorCode PetscSFLinkCreate(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void … in PetscSFLinkCreate() argument
423 PetscCall(PetscSFSetErrorOnUnsupportedOverlap(sf, unit, rootdata, leafdata)); in PetscSFLinkCreate()
427 PetscCall(PetscSFLinkNvshmemCheck(sf, rootmtype, rootdata, leafmtype, leafdata, &use_nvshmem)); in PetscSFLinkCreate()
429 …PetscCall(PetscSFLinkCreate_NVSHMEM(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, sfop, … in PetscSFLinkCreate()
434 …PetscCall(PetscSFLinkCreate_MPI(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, sfop, myli… in PetscSFLinkCreate()
438 PetscErrorCode PetscSFLinkGetInUse(PetscSF sf, MPI_Datatype unit, const void *rootdata, const void … in PetscSFLinkGetInUse() argument
[all …]
H A Dsfpack.h266 static inline PetscErrorCode PetscSFLinkGetMPIBuffersAndRequests(PetscSF sf, PetscSFLink link, Pets… in PetscSFLinkGetMPIBuffersAndRequests() argument
272 …if (link->InitMPIRequests) PetscCall((*link->InitMPIRequests)(sf, link, direction)); // init (pers… in PetscSFLinkGetMPIBuffersAndRequests()
281 static inline PetscErrorCode PetscSFLinkStartCommunication(PetscSF sf, PetscSFLink link, PetscSFDir… in PetscSFLinkStartCommunication() argument
284 if (link->StartCommunication) PetscCall((*link->StartCommunication)(sf, link, direction)); in PetscSFLinkStartCommunication()
288 static inline PetscErrorCode PetscSFLinkFinishCommunication(PetscSF sf, PetscSFLink link, PetscSFDi… in PetscSFLinkFinishCommunication() argument
291 if (link->FinishCommunication) PetscCall((*link->FinishCommunication)(sf, link, direction)); in PetscSFLinkFinishCommunication()
300 static inline PetscErrorCode PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI(PetscSF sf, PetscSFLi… in PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI() argument
302 PetscSF_Basic *bas = (PetscSF_Basic *)sf->data; in PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI()
321 static inline PetscErrorCode PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI(PetscSF sf, PetscSFLi… in PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI() argument
324 …if (PetscMemTypeDevice(link->leafmtype) && PetscMemTypeHost(link->leafmtype_mpi) && sf->leafbuflen… in PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI()
[all …]
/petsc/src/vec/is/sf/impls/window/ !
H A Dsfwindow.c70 static PetscErrorCode PetscSFWindowGetDataTypes(PetscSF sf, MPI_Datatype unit, const MPI_Datatype *… in PetscSFWindowGetDataTypes() argument
72 PetscSF_Window *w = (PetscSF_Window *)sf->data; in PetscSFWindowGetDataTypes()
91 PetscCall(PetscSFGetRootRanks(sf, &nranks, NULL, &roffset, NULL, NULL)); in PetscSFWindowGetDataTypes()
101 rmine = sf->rmine + sf->roffset[i]; in PetscSFWindowGetDataTypes()
102 rremote = sf->rremote + sf->roffset[i]; in PetscSFWindowGetDataTypes()
106 PetscCall(PetscMPIIntCast(sf->rmine[sf->roffset[i] + j], &rmine[j])); in PetscSFWindowGetDataTypes()
107 PetscCall(PetscMPIIntCast(sf->rremote[sf->roffset[i] + j], &rremote[j])); in PetscSFWindowGetDataTypes()
170 PetscErrorCode PetscSFWindowSetFlavorType(PetscSF sf, PetscSFWindowFlavorType flavor) in PetscSFWindowSetFlavorType() argument
173 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFWindowSetFlavorType()
174 PetscValidLogicalCollectiveEnum(sf, flavor, 2); in PetscSFWindowSetFlavorType()
[all …]
/petsc/src/vec/vec/utils/ !
H A Dvscat.c41 static PetscErrorCode VecScatterBegin_Internal(VecScatter sf, Vec x, Vec y, InsertMode addv, Scatte… in VecScatterBegin_Internal() argument
50 PetscCall(VecGetArrayReadAndMemType(x, &sf->vscat.xdata, &xmtype)); in VecScatterBegin_Internal()
51 PetscCall(VecGetArrayAndMemType(y, &sf->vscat.ydata, &ymtype)); in VecScatterBegin_Internal()
55 PetscCallMPI(MPI_Comm_size(PetscObjectComm((PetscObject)sf), &size)); in VecScatterBegin_Internal()
57 if (!sf->vscat.lsf) PetscCall(PetscSFCreateLocalSF_Private(sf, &sf->vscat.lsf)); in VecScatterBegin_Internal()
58 wsf = sf->vscat.lsf; in VecScatterBegin_Internal()
60 wsf = sf; in VecScatterBegin_Internal()
68 …else SETERRQ(PetscObjectComm((PetscObject)sf), PETSC_ERR_SUP, "Unsupported InsertMode %d in VecSca… in VecScatterBegin_Internal()
71 …PetscCall(PetscSFReduceWithMemTypeBegin(wsf, sf->vscat.unit, xmtype, sf->vscat.xdata, ymtype, sf->… in VecScatterBegin_Internal()
73 …PetscCall(PetscSFBcastWithMemTypeBegin(wsf, sf->vscat.unit, xmtype, sf->vscat.xdata, ymtype, sf->v… in VecScatterBegin_Internal()
[all …]
/petsc/src/vec/is/sf/tutorials/ !
H A Dex1f.F9015 PetscSF sf
62 PetscCallA(PetscSFCreate(PETSC_COMM_WORLD, sf, ierr))
63 PetscCallA(PetscSFSetFromOptions(sf, ierr))
64 …PetscCallA(PetscSFSetGraph(sf, nrootsalloc, nleaves, mine, PETSC_COPY_VALUES, remote, PETSC_COPY_V…
65 PetscCallA(PetscSFSetUp(sf, ierr))
69 PetscCallA(PetscSFView(sf, PETSC_VIEWER_STDOUT_WORLD, ierr))
88 PetscCallA(PetscSFBcastBegin(sf, MPIU_INTEGER, rootdata, leafdata, MPI_REPLACE, ierr))
89 PetscCallA(PetscSFBcastEnd(sf, MPIU_INTEGER, rootdata, leafdata, MPI_REPLACE, ierr))
96 PetscCallA(PetscSFReduceBegin(sf, MPIU_INTEGER, leafdata, rootdata, MPI_SUM, ierr))
97 PetscCallA(PetscSFReduceEnd(sf, MPIU_INTEGER, leafdata, rootdata, MPI_SUM, ierr))
[all …]
H A Dex3.c9 PetscSF sf; in main() local
33 PetscCall(PetscSFCreate(PETSC_COMM_WORLD, &sf)); in main()
34 PetscCall(PetscSFSetFromOptions(sf)); in main()
45 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in main()
46 PetscCall(PetscSFSetUp(sf)); in main()
47 PetscCall(PetscSFView(sf, PETSC_VIEWER_STDOUT_WORLD)); in main()
70 PetscCall(PetscSFRegisterPersistent(sf, contig, bufA, bufAout)); in main()
72 PetscCall(PetscSFBcastBegin(sf, contig, bufA, bufAout, MPI_REPLACE)); in main()
73 PetscCall(PetscSFBcastEnd(sf, contig, bufA, bufAout, MPI_REPLACE)); in main()
75 PetscCall(PetscSFDeregisterPersistent(sf, contig, bufA, bufAout)); in main()
[all …]
H A Dex1.c18 static PetscErrorCode PetscSFViewCustomLocals_Private(PetscSF sf, const PetscInt locals[], PetscVie… in PetscSFViewCustomLocals_Private() argument
25 PetscCallMPI(MPI_Comm_rank(PetscObjectComm((PetscObject)sf), &rank)); in PetscSFViewCustomLocals_Private()
26 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, NULL, &iremote)); in PetscSFViewCustomLocals_Private()
27 PetscCall(PetscSFGetRootRanks(sf, &nranks, NULL, NULL, NULL, NULL)); in PetscSFViewCustomLocals_Private()
43 PetscSF sf, vsf; in main() local
146 PetscCall(PetscSFCreate(PETSC_COMM_WORLD, &sf)); in main()
147 PetscCall(PetscSFSetFromOptions(sf)); in main()
148 …PetscCall(PetscSFSetGraph(sf, nrootsalloc, nleaves, mine, PETSC_OWN_POINTER, remote, PETSC_OWN_POI… in main()
149 PetscCall(PetscSFSetUp(sf)); in main()
152 PetscCall(PetscSFCreateStridedSF(sf, bs, PETSC_DECIDE, PETSC_DECIDE, &vsf)); in main()
[all …]
H A Dex2.c9 PetscSF sf; in main() local
29 PetscCall(PetscSFCreate(PETSC_COMM_WORLD, &sf)); in main()
30 PetscCall(PetscSFSetFromOptions(sf)); in main()
50 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in main()
51 PetscCall(PetscSFSetUp(sf)); in main()
52 PetscCall(PetscSFView(sf, PETSC_VIEWER_STDOUT_WORLD)); in main()
74 PetscCall(PetscSFBcastBegin(sf, MPIU_SCALAR, (const void *)bufA, (void *)bufAout, MPI_REPLACE)); in main()
75 PetscCall(PetscSFBcastBegin(sf, MPIU_SCALAR, (const void *)bufB, (void *)bufBout, MPI_REPLACE)); in main()
76 PetscCall(PetscSFBcastEnd(sf, MPIU_SCALAR, (const void *)bufA, (void *)bufAout, MPI_REPLACE)); in main()
77 PetscCall(PetscSFBcastEnd(sf, MPIU_SCALAR, (const void *)bufB, (void *)bufBout, MPI_REPLACE)); in main()
[all …]
/petsc/src/ts/trajectory/impls/singlefile/ !
H A Dsinglefile.c9 TSTrajectory_Singlefile *sf = (TSTrajectory_Singlefile *)tj->data; in TSTrajectorySet_Singlefile() local
14 PetscCall(PetscViewerCreate(PetscObjectComm((PetscObject)X), &sf->viewer)); in TSTrajectorySet_Singlefile()
15 PetscCall(PetscViewerSetType(sf->viewer, PETSCVIEWERBINARY)); in TSTrajectorySet_Singlefile()
16 PetscCall(PetscViewerFileSetMode(sf->viewer, FILE_MODE_WRITE)); in TSTrajectorySet_Singlefile()
18 PetscCall(PetscViewerFileSetName(sf->viewer, filename)); in TSTrajectorySet_Singlefile()
20 PetscCall(VecView(X, sf->viewer)); in TSTrajectorySet_Singlefile()
21 PetscCall(PetscViewerBinaryWrite(sf->viewer, &time, 1, PETSC_REAL)); in TSTrajectorySet_Singlefile()
27 TSTrajectory_Singlefile *sf = (TSTrajectory_Singlefile *)tj->data; in TSTrajectoryDestroy_Singlefile() local
30 PetscCall(PetscViewerDestroy(&sf->viewer)); in TSTrajectoryDestroy_Singlefile()
31 PetscCall(PetscFree(sf)); in TSTrajectoryDestroy_Singlefile()
[all …]
/petsc/src/vec/is/sf/impls/basic/neighbor/ !
H A Dsfneighbor.c57 static PetscErrorCode PetscSFGetDistComm_Neighbor(PetscSF sf, PetscSFDirection direction, MPI_Comm … in PetscSFGetDistComm_Neighbor() argument
59 PetscSF_Neighbor *dat = (PetscSF_Neighbor *)sf->data; in PetscSFGetDistComm_Neighbor()
68 …PetscCall(PetscSFGetRootInfo_Basic(sf, &nrootranks, &ndrootranks, &rootranks, NULL, NULL)); … in PetscSFGetDistComm_Neighbor()
69 …PetscCall(PetscSFGetLeafInfo_Basic(sf, &nleafranks, &ndleafranks, &leafranks, NULL, NULL, NULL)); … in PetscSFGetDistComm_Neighbor()
74 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFGetDistComm_Neighbor()
87 static PetscErrorCode PetscSFLinkStartCommunication_Neighbor(PetscSF sf, PetscSFLink link, PetscSFD… in PetscSFLinkStartCommunication_Neighbor() argument
89 PetscSF_Neighbor *dat = (PetscSF_Neighbor *)sf->data; in PetscSFLinkStartCommunication_Neighbor()
96 …PetscCall(PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host bef… in PetscSFLinkStartCommunication_Neighbor()
98 …PetscCall(PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host */)… in PetscSFLinkStartCommunication_Neighbor()
101 PetscCall(PetscSFGetDistComm_Neighbor(sf, direction, &distcomm)); in PetscSFLinkStartCommunication_Neighbor()
[all …]
/petsc/src/vec/is/sf/interface/ftn-custom/ !
H A Dzsf.c31 PETSC_EXTERN void petscsfgetgraph_(PetscSF *sf, PetscInt *nroots, PetscInt *nleaves, F90Array1d *ai… in petscsfgetgraph_() argument
37 *ierr = PetscSFGetGraph(*sf, nroots, nleaves, &ilocal, &iremote); in petscsfgetgraph_()
46 PETSC_EXTERN void petscsfrestoregraph_(PetscSF *sf, PetscInt *nroots, PetscInt *nleaves, F90Array1d… in petscsfrestoregraph_() argument
53 PETSC_EXTERN void petscsfgetleafranks_(PetscSF *sf, PetscMPIInt *niranks, F90Array1d *airanks, F90A… in petscsfgetleafranks_() argument
59 *ierr = PetscSFGetLeafRanks(*sf, niranks, &iranks, &ioffset, &irootloc); in petscsfgetleafranks_()
69 PETSC_EXTERN void petscsfgetrootranks_(PetscSF *sf, PetscMPIInt *nranks, F90Array1d *aranks, F90Arr… in petscsfgetrootranks_() argument
76 *ierr = PetscSFGetRootRanks(*sf, nranks, &ranks, &roffset, &rmine, &rremote); in petscsfgetrootranks_()
89 PETSC_EXTERN void petscsfbcastbegin_(PetscSF *sf, MPI_Fint *unit, const void *rptr, void *lptr, MPI… in petscsfbcastbegin_() argument
96 *ierr = PetscSFBcastBegin(*sf, dtype, rptr, lptr, cop); in petscsfbcastbegin_()
99 PETSC_EXTERN void petscsfbcastend_(PetscSF *sf, MPI_Fint *unit, const void *rptr, void *lptr, MPI_F… in petscsfbcastend_() argument
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/ !
H A DSF.pyx28 self.obj = <PetscObject*> &self.sf
29 self.sf = NULL
48 CHKERR(PetscSFView(self.sf, vwr))
60 CHKERR(PetscSFDestroy(&self.sf))
81 CHKERR(PetscCLEAR(self.obj)); self.sf = newsf
101 CHKERR(PetscSFSetType(self.sf, cval))
114 CHKERR(PetscSFGetType(self.sf, &cval))
127 CHKERR(PetscSFSetFromOptions(self.sf))
139 CHKERR(PetscSFSetUp(self.sf))
151 CHKERR(PetscSFReset(self.sf))
[all …]
/petsc/src/vec/is/sf/utils/ !
H A Dsfutils.c30 PetscErrorCode PetscSFSetGraphLayout(PetscSF sf, PetscLayout layout, PetscInt nleaves, PetscInt ilo… in PetscSFSetGraphLayout() argument
38 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFSetGraphLayout()
59 PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, localmode, remote, PETSC_OWN_POINTER)); in PetscSFSetGraphLayout()
86 PetscErrorCode PetscSFGetGraphLayout(PetscSF sf, PetscLayout *layout, PetscInt *nleaves, const Pets… in PetscSFGetGraphLayout() argument
93 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFGetGraphLayout()
98 PetscCall(PetscSFGetGraph(sf, &nr, &nl, ilocal, &ir)); in PetscSFGetGraphLayout()
99 PetscCall(PetscLayoutCreateFromSizes(PetscObjectComm((PetscObject)sf), nr, PETSC_DECIDE, 1, &lt)); in PetscSFGetGraphLayout()
128 PetscErrorCode PetscSFSetGraphSection(PetscSF sf, PetscSection localSection, PetscSection globalSec… in PetscSFSetGraphSection() argument
139 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFSetGraphSection()
143 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFSetGraphSection()
[all …]

123456