| /petsc/src/vec/is/sf/tutorials/ |
| H A D | ex1.c | 172 PetscInt *rootdata, *leafdata; in main() local 175 PetscCall(PetscMalloc2(nrootsalloc, &rootdata, nleavesalloc, &leafdata)); in main() 177 for (i = 0; i < nrootsalloc; i++) rootdata[i] = -1; in main() 178 for (i = 0; i < nroots; i++) rootdata[i * stride] = 100 * (rank + 1) + i; in main() 183 PetscCall(PetscSFRegisterPersistent(sf, MPIU_INT, rootdata, leafdata)); in main() 185 PetscCall(PetscSFBcastBegin(sf, MPIU_INT, rootdata, leafdata, MPI_REPLACE)); in main() 186 PetscCall(PetscSFBcastEnd(sf, MPIU_INT, rootdata, leafdata, MPI_REPLACE)); in main() 188 PetscCall(PetscSFDeregisterPersistent(sf, MPIU_INT, rootdata, leafdata)); in main() 190 PetscCall(PetscIntView(nrootsalloc, rootdata, PETSC_VIEWER_STDOUT_WORLD)); in main() 193 PetscCall(PetscFree2(rootdata, leafdata)); in main() [all …]
|
| H A D | ex1f.F90 | 16 PetscInt rootdata(6), leafdata(6) 76 rootdata(i) = -1 79 rootdata(1 + (i - 1)*stride) = 100*(rank + 1) + i - 1 88 PetscCallA(PetscSFBcastBegin(sf, MPIU_INTEGER, rootdata, leafdata, MPI_REPLACE, ierr)) 89 PetscCallA(PetscSFBcastEnd(sf, MPIU_INTEGER, rootdata, leafdata, MPI_REPLACE, ierr)) 91 PetscCallA(PetscIntView(nrootsalloc, rootdata, PETSC_VIEWER_STDOUT_WORLD, ierr)) 96 PetscCallA(PetscSFReduceBegin(sf, MPIU_INTEGER, leafdata, rootdata, MPI_SUM, ierr)) 97 PetscCallA(PetscSFReduceEnd(sf, MPIU_INTEGER, leafdata, rootdata, MPI_SUM, ierr)) 101 PetscCallA(PetscIntView(nrootsalloc, rootdata, PETSC_VIEWER_STDOUT_WORLD, ierr))
|
| /petsc/src/vec/is/sf/tests/ |
| H A D | ex3.c | 12 PetscScalar *rootdata, *leafdata, *leafupdate; in main() local 62 PetscCall(VecGetArray(x, &rootdata)); in main() 67 PetscCall(PetscSFBcastBegin(gathersf, MPIU_SCALAR, rootdata, leafdata, MPI_REPLACE)); in main() 68 PetscCall(PetscSFBcastEnd(gathersf, MPIU_SCALAR, rootdata, leafdata, MPI_REPLACE)); in main() 74 PetscCall(PetscSFFetchAndOpBegin(gathersf, MPIU_SCALAR, rootdata, leafdata, leafupdate, op)); in main() 75 PetscCall(PetscSFFetchAndOpEnd(gathersf, MPIU_SCALAR, rootdata, leafdata, leafupdate, op)); in main() 92 PetscCall(VecRestoreArray(x, &rootdata)); in main() 117 PetscCall(VecGetArray(x, &rootdata)); in main() 122 PetscCall(PetscSFBcastBegin(allgathersf, MPIU_SCALAR, rootdata, leafdata, MPI_REPLACE)); in main() 123 PetscCall(PetscSFBcastEnd(allgathersf, MPIU_SCALAR, rootdata, leafdata, MPI_REPLACE)); in main() [all …]
|
| H A D | ex17.c | 13 char *rootdata = NULL, *leafdata = NULL; in main() local 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() 49 …PetscCall(PetscSFBcastBegin(sf, MPI_SIGNED_CHAR, rootdata, leafdata, MPI_REPLACE)); /* rank 0->1, … in main() 50 PetscCall(PetscSFBcastEnd(sf, MPI_SIGNED_CHAR, rootdata, leafdata, MPI_REPLACE)); in main() 51 …PetscCall(PetscSFReduceBegin(sf, MPI_SIGNED_CHAR, leafdata, rootdata, MPI_SUM)); /* rank 1->0, add… in main() 52 PetscCall(PetscSFReduceEnd(sf, MPI_SIGNED_CHAR, leafdata, rootdata, MPI_SUM)); in main() 53 …PetscCheck(rank != 0 || (rootdata[0] == 22 && rootdata[nroots - 1] == 24), PETSC_COMM_SELF, PETSC_… in main() 55 PetscCall(PetscFree2(rootdata, leafdata)); in main()
|
| H A D | ex4k.kokkos.cxx | 41 PetscScalar *rootdata = NULL, *leafdata = NULL, *pbuf, *ebuf; in main() local 74 PetscCall(PetscMalloc2(maxn, &rootdata, maxn, &leafdata)); in main() 76 PetscCallCXX(rootdata = (PetscScalar *)Kokkos::kokkos_malloc(sizeof(PetscScalar) * maxn)); in main() 114 PetscCall(PetscArraycpy(rootdata, pbuf, n)); in main() 117 Kokkos::View<PetscScalar *> dst1((PetscScalar *)rootdata, n); in main() 137 … PetscCall(PetscSFBcastWithMemTypeBegin(sf[j], MPIU_SCALAR, mtype, rootdata, mtype, leafdata, op)); in main() 138 PetscCall(PetscSFBcastEnd(sf[j], MPIU_SCALAR, rootdata, leafdata, op)); in main() 139 …PetscCall(PetscSFReduceWithMemTypeBegin(sf[j], MPIU_SCALAR, mtype, leafdata, mtype, rootdata, op)); in main() 140 PetscCall(PetscSFReduceEnd(sf[j], MPIU_SCALAR, leafdata, rootdata, op)); in main() 155 PetscCall(PetscFree2(rootdata, leafdata)); in main() [all …]
|
| H A D | ex25.c | 13 int *rootdata = NULL, *leafdata = NULL; in main() local 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() 51 …PetscCall(PetscSFBcastBegin(sf, newtype, rootdata, leafdata, MPI_REPLACE)); // bcast rootdata to … in main() 52 PetscCall(PetscSFBcastEnd(sf, newtype, rootdata, leafdata, MPI_REPLACE)); in main() 57 PetscCall(PetscFree2(rootdata, leafdata)); in main()
|
| /petsc/src/vec/is/sf/interface/ftn-custom/ |
| H A D | zsf.c | 134 const void *rootdata; in petscsfbcastbegin_() local 140 *ierr = F90Array1dAccess(rptr, dtype, (void **)&rootdata PETSC_F90_2PTR_PARAM(rptrd)); in petscsfbcastbegin_() 144 *ierr = PetscSFBcastBegin(*sf, dtype, rootdata, leafdata, cop); in petscsfbcastbegin_() 150 const void *rootdata; in petscsfbcastend_() local 156 *ierr = F90Array1dAccess(rptr, dtype, (void **)&rootdata PETSC_F90_2PTR_PARAM(rptrd)); in petscsfbcastend_() 160 *ierr = PetscSFBcastEnd(*sf, dtype, rootdata, leafdata, cop); in petscsfbcastend_() 167 void *rootdata; in petscsfreducebegin_() local 172 *ierr = F90Array1dAccess(rptr, dtype, (void **)&rootdata PETSC_F90_2PTR_PARAM(rptrd)); in petscsfreducebegin_() 176 *ierr = PetscSFReduceBegin(*sf, dtype, leafdata, rootdata, cop); in petscsfreducebegin_() 183 void *rootdata; in petscsfreduceend_() local [all …]
|
| /petsc/src/vec/is/sf/impls/basic/allgatherv/ |
| H A D | sfallgatherv.c | 102 …herv(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType lea… in PetscSFBcastBegin_Allgatherv() argument 112 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_BCAST,… in PetscSFBcastBegin_Allgatherv() 113 PetscCall(PetscSFLinkPackRootData(sf, link, PETSCSF_REMOTE, rootdata)); in PetscSFBcastBegin_Allgatherv() 129 …t, PetscMemType leafmtype, const void *leafdata, PetscMemType rootmtype, void *rootdata, MPI_Op op) in PetscSFReduceBegin_Allgatherv() argument 140 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_REDUCE… in PetscSFReduceBegin_Allgatherv() 144 …PetscCall((*link->Memcpy)(link, rootmtype, rootdata, leafmtype, (const char *)leafdata + (size_t)r… in PetscSFReduceBegin_Allgatherv() 195 …educeEnd_Allgatherv(PetscSF sf, MPI_Datatype unit, const void *leafdata, void *rootdata, MPI_Op op) in PetscSFReduceEnd_Allgatherv() argument 207 PetscCall(PetscSFLinkGetInUse(sf, unit, rootdata, leafdata, PETSC_OWN_POINTER, &link)); in PetscSFReduceEnd_Allgatherv() 210 PetscCall(PetscSFReduceEnd_Basic(sf, unit, leafdata, rootdata, op)); in PetscSFReduceEnd_Allgatherv() 215 …herv(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType lea… in PetscSFBcastToZero_Allgatherv() argument [all …]
|
| /petsc/src/vec/is/sf/impls/window/ |
| H A D | sfwindow.c | 29 void *rootdata; member 374 static PetscErrorCode PetscSFWindowAttach(PetscSF sf, PetscSFWinLink link, void *rootdata, size_t w… in PetscSFWindowAttach() argument 382 void *addr = rootdata; in PetscSFWindowAttach() 427 static PetscErrorCode PetscSFGetWindow(PetscSF sf, MPI_Datatype unit, void *rootdata, void *leafdat… in PetscSFGetWindow() argument 455 …match = (link->flavor == w->flavor && link->rootdata == rootdata && link->leafdata == leafdata) ? … in PetscSFGetWindow() 485 PetscCall(PetscSFWindowAttach(sf, link, rootdata, wsize)); in PetscSFGetWindow() 489 link->rootdata = rootdata; in PetscSFGetWindow() 504 link->rootdata = rootdata; in PetscSFGetWindow() 512 PetscCallMPI(MPI_Win_create(rootdata, wsize, (PetscMPIInt)bytes, w->info, wcomm, &link->win)); in PetscSFGetWindow() 513 link->addr = rootdata; in PetscSFGetWindow() [all …]
|
| /petsc/src/vec/is/sf/impls/basic/allgather/ |
| H A D | sfallgather.c | 31 …ther(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType lea… in PetscSFBcastBegin_Allgather() argument 40 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_BCAST,… in PetscSFBcastBegin_Allgather() 41 PetscCall(PetscSFLinkPackRootData(sf, link, PETSCSF_REMOTE, rootdata)); in PetscSFBcastBegin_Allgather() 51 …t, PetscMemType leafmtype, const void *leafdata, PetscMemType rootmtype, void *rootdata, MPI_Op op) in PetscSFReduceBegin_Allgather() argument 62 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_REDUCE… in PetscSFReduceBegin_Allgather() 66 …PetscCall((*link->Memcpy)(link, rootmtype, rootdata, leafmtype, (const char *)leafdata + (size_t)r… in PetscSFReduceBegin_Allgather() 85 …ther(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType lea… in PetscSFBcastToZero_Allgather() argument 95 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, MPI_REPLACE, PETSC… in PetscSFBcastToZero_Allgather() 96 PetscCall(PetscSFLinkPackRootData(sf, link, PETSCSF_REMOTE, rootdata)); in PetscSFBcastToZero_Allgather() 103 PetscCall(PetscSFLinkGetInUse(sf, unit, rootdata, leafdata, PETSC_OWN_POINTER, &link)); in PetscSFBcastToZero_Allgather()
|
| /petsc/src/vec/is/sf/impls/basic/ |
| H A D | sfbasic.c | 352 …asic(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType lea… in PetscSFBcastBegin_Basic() argument 358 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_BCAST,… in PetscSFBcastBegin_Basic() 360 PetscCall(PetscSFLinkPackRootData(sf, link, PETSCSF_REMOTE, rootdata)); in PetscSFBcastBegin_Basic() 364 PetscCall(PetscSFLinkScatterLocal(sf, link, PETSCSF_ROOT2LEAF, (void *)rootdata, leafdata, op)); in PetscSFBcastBegin_Basic() 368 …orCode PetscSFBcastEnd_Basic(PetscSF sf, MPI_Datatype unit, const void *rootdata, void *leafdata, … in PetscSFBcastEnd_Basic() argument 374 PetscCall(PetscSFLinkGetInUse(sf, unit, rootdata, leafdata, PETSC_OWN_POINTER, &link)); in PetscSFBcastEnd_Basic() 385 …cMemType leafmtype, const void *leafdata, PetscMemType rootmtype, void *rootdata, MPI_Op op, Petsc… in PetscSFLeafToRootBegin_Basic() argument 390 PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, sfop, &link)); in PetscSFLeafToRootBegin_Basic() 398 …t, PetscMemType leafmtype, const void *leafdata, PetscMemType rootmtype, void *rootdata, MPI_Op op) in PetscSFReduceBegin_Basic() argument 403 …PetscCall(PetscSFLeafToRootBegin_Basic(sf, unit, leafmtype, leafdata, rootmtype, rootdata, op, PET… in PetscSFReduceBegin_Basic() [all …]
|
| H A D | sfpack.c | 224 …scInt rootstart, PetscSFPackOpt rootopt, const PetscInt *rootidx, void *rootdata, PetscInt leafsta… 226 Type *rdata = (Type *)rootdata, *lupdate = (Type *)leafupdate; \ 420 …eate(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType lea… 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 448 if (match && (rootdata == link->rootdata) && (leafdata == link->leafdata)) { in PetscSFLinkGetInUse() 471 link->rootdata = NULL; in PetscSFLinkReclaim() [all …]
|
| H A D | sfmpi.c | 64 …MPI(PetscSF sf, MPI_Datatype unit, PetscMemType xrootmtype, const void *rootdata, PetscMemType xle… in PetscSFLinkCreate_MPI() argument 125 …ootreqsinited[direction][rootmtype][1] && link->rootdatadirect[direction][rootmtype] != rootdata) { in PetscSFLinkCreate_MPI() 190 link->rootbuf[i][rootmtype] = (char *)rootdata + bas->rootstart[i] * link->unitbytes; in PetscSFLinkCreate_MPI() 221 if (rootdirect_mpi) link->rootdatadirect[direction][rootmtype] = rootdata; in PetscSFLinkCreate_MPI() 225 link->rootdata = rootdata; /* root/leafdata are keys to look up links in PetscSFXxxEnd */ in PetscSFLinkCreate_MPI()
|
| /petsc/src/vec/is/sf/tests/output/ |
| H A D | ex3_2.out | 3 Vec Object: rootdata 2 MPI processes 33 Vec Object: rootdata 2 MPI processes 73 Vec Object: rootdata 2 MPI processes
|
| H A D | ex3_1.out | 3 Vec Object: rootdata 2 MPI processes 33 Vec Object: rootdata 2 MPI processes 73 Vec Object: rootdata 2 MPI processes
|
| H A D | ex3_4.out | 3 Vec Object: rootdata 3 MPI processes 35 Vec Object: rootdata 3 MPI processes 87 Vec Object: rootdata 3 MPI processes
|
| H A D | ex3_3.out | 3 Vec Object: rootdata 3 MPI processes 35 Vec Object: rootdata 3 MPI processes 87 Vec Object: rootdata 3 MPI processes
|
| /petsc/src/vec/is/sf/impls/basic/gatherv/ |
| H A D | sfgatherv.c | 43 …in_Gatherv(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, void *rootdata, PetscMemType lea… in PetscSFFetchAndOpBegin_Gatherv() argument 47 PetscCall(PetscSFBcastBegin(sf, unit, rootdata, leafupdate, MPI_REPLACE)); in PetscSFFetchAndOpBegin_Gatherv() 48 PetscCall(PetscSFBcastEnd(sf, unit, rootdata, leafupdate, MPI_REPLACE)); in PetscSFFetchAndOpBegin_Gatherv() 49 PetscCall(PetscSFReduceBegin(sf, unit, leafdata, rootdata, op)); in PetscSFFetchAndOpBegin_Gatherv()
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | SF.pyx | 434 def bcastBegin(self, unit: Datatype, ndarray rootdata, ndarray leafdata, op: Op) -> None: argument 446 rootdata 460 CHKERR(PetscSFBcastBegin(self.sf, dtype, <const void*>PyArray_DATA(rootdata), 463 def bcastEnd(self, unit: Datatype, ndarray rootdata, ndarray leafdata, op: Op) -> None: argument 472 rootdata 486 CHKERR(PetscSFBcastEnd(self.sf, dtype, <const void*>PyArray_DATA(rootdata), 489 def reduceBegin(self, unit: Datatype, ndarray leafdata, ndarray rootdata, op: Op) -> None: argument 490 """Begin reduction of leafdata into rootdata. 502 rootdata 515 <void*>PyArray_DATA(rootdata), cop)) [all …]
|
| /petsc/include/ |
| H A D | petscsf.h | 215 …rCode PetscSFBcastAndOpBegin(PetscSF sf, MPI_Datatype unit, const void *rootdata, void *leafdata, … in PetscSFBcastAndOpBegin() argument 217 return PetscSFBcastBegin(sf, unit, rootdata, leafdata, op); in PetscSFBcastAndOpBegin() 221 …rorCode PetscSFBcastAndOpEnd(PetscSF sf, MPI_Datatype unit, const void *rootdata, void *leafdata, … in PetscSFBcastAndOpEnd() argument 223 return PetscSFBcastEnd(sf, unit, rootdata, leafdata, op); in PetscSFBcastAndOpEnd() 227 …egin(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType lea… in PetscSFBcastAndOpWithMemtypeBegin() argument 229 return PetscSFBcastWithMemTypeBegin(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op); in PetscSFBcastAndOpWithMemtypeBegin()
|
| /petsc/src/vec/is/sf/interface/ |
| H A D | sf.c | 1343 signed char *rootdata, *leafdata, *leafmem; in PetscSFCreateEmbeddedRootSF() local 1371 PetscCall(PetscCalloc2(nroots, &rootdata, maxlocal, &leafmem)); in PetscSFCreateEmbeddedRootSF() 1374 for (i = 0; i < nselected; i++) rootdata[selected[i]] = 1; in PetscSFCreateEmbeddedRootSF() 1375 PetscCall(PetscSFBcastBegin(sf, MPI_SIGNED_CHAR, rootdata, leafdata, MPI_REPLACE)); in PetscSFCreateEmbeddedRootSF() 1376 PetscCall(PetscSFBcastEnd(sf, MPI_SIGNED_CHAR, rootdata, leafdata, MPI_REPLACE)); in PetscSFCreateEmbeddedRootSF() 1401 PetscCall(PetscFree2(rootdata, leafmem)); in PetscSFCreateEmbeddedRootSF() 1487 PetscErrorCode PetscSFBcastBegin(PetscSF sf, MPI_Datatype unit, const void *rootdata, void *leafdat… in PetscSFBcastBegin() argument 1495 PetscCall(PetscGetMemType(rootdata, &rootmtype)); in PetscSFBcastBegin() 1497 PetscUseTypeMethod(sf, BcastBegin, unit, rootmtype, rootdata, leafmtype, leafdata, op); in PetscSFBcastBegin() 1523 …egin(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType lea… in PetscSFBcastWithMemTypeBegin() argument [all …]
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexsfc.c | 438 PetscInt *rootdata, *leafdata; in CreateDonorToPeriodicSF() local 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() 459 const PetscInt *donor_dof = rootdata + nroots; in CreateDonorToPeriodicSF() 461 rootdata[2 * p] = -1; in CreateDonorToPeriodicSF() 462 rootdata[2 * p + 1] = -1; in CreateDonorToPeriodicSF() 469 rootdata[2 * p] = root_offset; in CreateDonorToPeriodicSF() 470 rootdata[2 * p + 1] = p_size; in CreateDonorToPeriodicSF() 473 PetscCall(PetscSFBcastBegin(face_sf, MPIU_2INT, rootdata, leafdata, MPI_REPLACE)); in CreateDonorToPeriodicSF() [all …]
|
| /petsc/src/vec/is/sf/impls/basic/nvshmem/ |
| H A D | sfnvshmem.cu | 159 PetscErrorCode PetscSFLinkNvshmemCheck(PetscSF sf, PetscMemType rootmtype, const void *rootdata, Pe… in PetscSFLinkNvshmemCheck() argument 182 PetscInt hasNullRank = (!rootdata && !leafdata) ? 1 : 0; in PetscSFLinkNvshmemCheck() 191 …PetscInt oneCuda = (!rootdata || PetscMemTypeCUDA(rootmtype)) && (!leafdata || PetscMemTypeCUDA(le… in PetscSFLinkNvshmemCheck() 687 …HMEM(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType lea… in PetscSFLinkCreate_NVSHMEM() argument 769 …link->rootbuf[PETSCSF_REMOTE][PETSC_MEMTYPE_DEVICE] = (char *)rootdata + bas->rootstart[PETSCSF_RE… in PetscSFLinkCreate_NVSHMEM() 784 …link->rootdata = rootdata; /* root/leafdata are keys to look up links in PetscSF… in PetscSFLinkCreate_NVSHMEM()
|
| /petsc/src/vec/vec/utils/ |
| H A D | vscat.c | 887 PetscInt inedges=0,*leafdata,*rootdata; in VecScatterCreate() 910 PetscCall(PetscMalloc1(inedges*2,&rootdata)); in VecScatterCreate() 911 PetscCall(PetscSFGatherBegin(tmpsf,MPIU_2INT,leafdata,rootdata)); in VecScatterCreate() 912 PetscCall(PetscSFGatherEnd(tmpsf,MPIU_2INT,leafdata,rootdata)); in VecScatterCreate() 926 ilocal[i] = rootdata[2*i] - ystart; /* convert y's global index to local index */ in VecScatterCreate() 927 …PetscCall(PetscLayoutFindOwnerIndex(xlayout,rootdata[2*i+1],&iremote[i].rank,&iremote[i].index)); … in VecScatterCreate() 929 PetscCall(PetscFree(rootdata)); in VecScatterCreate()
|
| /petsc/doc/manual/ |
| H A D | vec.md | 1391 `PetscSF` communicates between `rootdata` and `leafdata` arrays. `rootdata` is distributed across t… 1404 MPI processes). All these matching ghost values share a common root value in `rootdata`. 1414 // the number of entries in rootdata on this MPI process 1416 // provide the matching location in rootdata for each entry in leafdata 1441 Next we fill `rootdata`: 1444 PetscInt *rootdata, *leafdata; 1447 rootdata[0] = 1; 1448 rootdata[1] = 2; 1450 rootdata[0] = 3; 1454 Finally, we use the `PetscSF` to communicate `rootdata` to `leafdata`: [all …]
|