Lines Matching refs:nranks

74   PetscMPIInt     nranks;  in PetscSFWindowGetDataTypes()  local
91 PetscCall(PetscSFGetRootRanks(sf, &nranks, NULL, &roffset, NULL, NULL)); in PetscSFWindowGetDataTypes()
94 PetscCall(PetscMalloc2(nranks, &link->mine, nranks, &link->remote)); in PetscSFWindowGetDataTypes()
95 for (PetscMPIInt i = 0; i < nranks; i++) { in PetscSFWindowGetDataTypes()
363 PetscCall(PetscMalloc1(sf->nranks, &remotes)); in PetscSFWindowCreateDynamicSF()
364 for (PetscInt i = 0; i < sf->nranks; i++) { in PetscSFWindowCreateDynamicSF()
370 …PetscCall(PetscSFSetGraph(*dynsf, 1, sf->nranks, NULL, PETSC_OWN_POINTER, remotes, PETSC_OWN_POINT… in PetscSFWindowCreateDynamicSF()
383 PetscMPIInt nranks; in PetscSFWindowAttach() local
389 PetscCall(PetscSFGetRootRanks(w->dynsf, &nranks, NULL, NULL, NULL, NULL)); in PetscSFWindowAttach()
391 if (!link->dyn_target_addr) PetscCall(PetscMalloc1(nranks, &link->dyn_target_addr)); in PetscSFWindowAttach()
507 PetscCall(PetscMalloc1(sf->nranks, &link->reqs)); in PetscSFGetWindow()
508 for (PetscMPIInt i = 0; i < sf->nranks; i++) link->reqs[i] = MPI_REQUEST_NULL; in PetscSFGetWindow()
750 PetscInt nroots, nleaves, nranks; in PetscSFSetUp_Window() local
759 nranks = sf->nranks; in PetscSFSetUp_Window()
760 PetscCall(PetscMalloc1(nranks, &w->wcommranks)); in PetscSFSetUp_Window()
781 PetscCall(PetscMalloc1(sf->nranks, &remotes)); in PetscSFSetUp_Window()
782 for (PetscInt i = 0; i < sf->nranks; i++) { in PetscSFSetUp_Window()
786 …PetscCall(PetscSFSetGraph(w->dynsf, 1, sf->nranks, NULL, PETSC_OWN_POINTER, remotes, PETSC_OWN_POI… in PetscSFSetUp_Window()
790 PetscCall(PetscArraycpy(w->wcommranks, sf->ranks, nranks)); in PetscSFSetUp_Window()
833 for (i = 0; i < sf->nranks; i++) { in PetscSFReset_Window()
895 PetscCall(PetscMalloc1(sf->nranks, &link->reqs)); in PetscSFRegisterPersistent_Window()
896 for (i = 0; i < sf->nranks; i++) link->reqs[i] = MPI_REQUEST_NULL; in PetscSFRegisterPersistent_Window()
1004 PetscMPIInt nranks; in PetscSFBcastBegin_Window() local
1013 PetscCall(PetscSFGetRootRanks(sf, &nranks, NULL, NULL, NULL, NULL)); in PetscSFBcastBegin_Window()
1017 for (PetscMPIInt i = 0; i < nranks; i++) { in PetscSFBcastBegin_Window()
1043 if (reqs) PetscCallMPI(MPI_Waitall(sf->nranks, reqs, MPI_STATUSES_IGNORE)); in PetscSFBcastEnd_Window()
1045 PetscMPIInt nranks; in PetscSFBcastEnd_Window() local
1048 PetscCall(PetscSFGetRootRanks(sf, &nranks, NULL, NULL, NULL, NULL)); in PetscSFBcastEnd_Window()
1050 for (PetscMPIInt i = 0; i < nranks; i++) PetscCallMPI(MPI_Win_unlock(ranks[i], win)); in PetscSFBcastEnd_Window()
1059 PetscMPIInt nranks; in PetscSFReduceBegin_Window() local
1066 PetscCall(PetscSFGetRootRanks(sf, &nranks, NULL, NULL, NULL, NULL)); in PetscSFReduceBegin_Window()
1071 for (PetscMPIInt i = 0; i < nranks; i++) { in PetscSFReduceBegin_Window()
1089 if (reqs) PetscCallMPI(MPI_Waitall(sf->nranks, reqs, MPI_STATUSES_IGNORE)); in PetscSFReduceEnd_Window()
1096 PetscMPIInt nranks; in PetscSFFetchAndOpBegin_Window() local
1107 PetscCall(PetscSFGetRootRanks(sf, &nranks, NULL, NULL, NULL, NULL)); in PetscSFFetchAndOpBegin_Window()
1120 for (PetscMPIInt i = 0; i < nranks; i++) { in PetscSFFetchAndOpBegin_Window()
1150 if (reqs) PetscCallMPI(MPI_Waitall(sf->nranks, reqs, MPI_STATUSES_IGNORE)); in PetscSFFetchAndOpEnd_Window()