Lines Matching refs:sf
6 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()
64 PetscErrorCode PetscSFLinkCreate_MPI(PetscSF sf, MPI_Datatype unit, PetscMemType xrootmtype, const … in PetscSFLinkCreate_MPI() argument
66 PetscSF_Basic *bas = (PetscSF_Basic *)sf->data; in PetscSFLinkCreate_MPI()
82 …leafdirect[i] = (sf->leafcontig[i] && op == MPI_REPLACE) ? PETSC_TRUE : PETSC_FALSE; /* Unpack lea… in PetscSFLinkCreate_MPI()
84 …leafdirect[i] = sf->leafcontig[i]; /* Pack leav… in PetscSFLinkCreate_MPI()
98 if (sf->persistent && sf->collective) { in PetscSFLinkCreate_MPI()
103 if (sf->use_gpu_aware_mpi) { in PetscSFLinkCreate_MPI()
115 nleafreqs = sf->nleafreqs; in PetscSFLinkCreate_MPI()
125 …if (rootdirect_mpi && sf->persistent && link->rootreqsinited[direction][rootmtype][1] && link->roo… in PetscSFLinkCreate_MPI()
132 …if (leafdirect_mpi && sf->persistent && link->leafreqsinited[direction][leafmtype][1] && link->lea… in PetscSFLinkCreate_MPI()
146 PetscCall(PetscSFLinkSetUp_Host(sf, link, unit)); in PetscSFLinkCreate_MPI()
147 …PetscCall(PetscCommGetNewTag(PetscObjectComm((PetscObject)sf), &link->tag)); /* One tag per link */ in PetscSFLinkCreate_MPI()
166 PetscTryTypeMethod(sf, SetCommunicationOps, link); in PetscSFLinkCreate_MPI()
173 …if (sf->backend == PETSCSF_BACKEND_CUDA) PetscCall(PetscSFLinkSetUp_CUDA(sf, link, unit)); /* Setu… in PetscSFLinkCreate_MPI()
176 …if (sf->backend == PETSCSF_BACKEND_HIP) PetscCall(PetscSFLinkSetUp_HIP(sf, link, unit)); /* Setup … in PetscSFLinkCreate_MPI()
179 if (sf->backend == PETSCSF_BACKEND_KOKKOS) PetscCall(PetscSFLinkSetUp_Kokkos(sf, link, unit)); in PetscSFLinkCreate_MPI()
192 …if (!link->rootbuf_alloc[i][rootmtype]) PetscCall(PetscSFMalloc(sf, rootmtype, bas->rootbuflen[i] … in PetscSFLinkCreate_MPI()
197 if (sf->leafbuflen[i]) { in PetscSFLinkCreate_MPI()
199 link->leafbuf[i][leafmtype] = (char *)leafdata + sf->leafstart[i] * link->unitbytes; in PetscSFLinkCreate_MPI()
201 …if (!link->leafbuf_alloc[i][leafmtype]) PetscCall(PetscSFMalloc(sf, leafmtype, sf->leafbuflen[i] *… in PetscSFLinkCreate_MPI()
214 …if (!link->leafbuf_alloc[PETSCSF_REMOTE][PETSC_MEMTYPE_HOST]) PetscCall(PetscMalloc(sf->leafbuflen… in PetscSFLinkCreate_MPI()
220 …if (sf->persistent) { /* If data is directly passed to MPI and inits MPI requests, record the data… in PetscSFLinkCreate_MPI()