Lines Matching refs:len_s
162 PetscMPIInt proc_end = 0, size, rank, tag1, tag2, *len_s, nrqr, nrqs, *id_r1, *len_r1, flag, *iwork;
216 PetscCall(PetscMalloc4(size, &len_s, size, &btable, size, &iwork, size + 1, &Bowners));
249 for (i = 0; i < size; i++) len_s[i] = 0;
278 len_s[proc_id]++;
284 *(data1 + proc_id * len + 1 + i) = len_s[proc_id] - iwork[proc_id];
285 iwork[proc_id] = len_s[proc_id];
294 if (len_s[i]) {
296 len_s[i] += 1 + is_max; /* add no. of header msg */
305 PetscCall(PetscGatherNumberOfMessages(comm, NULL, len_s, &nrqr));
306 PetscCall(PetscGatherMessageLengths(comm, nrqs, nrqr, len_s, &id_r1, &len_r1));
312 if (len_s[proc_id]) {
313 PetscCallMPI(MPIU_Isend(data1_start[proc_id], len_s[proc_id], MPIU_INT, proc_id, tag1, comm, s_waits1 + k));
326 for (PetscMPIInt proc_id = 0; proc_id < size; proc_id++) len_s[proc_id] = iwork[proc_id] = 0;
372 PetscCall(PetscMPIIntCast(len, &len_s[proc_id])); /* length of message sending back to proc_id */
393 PetscCallMPI(MPIU_Allreduce(len_s, iwork, size, MPI_INT, MPI_MAX, comm));
395 PetscCall(PetscFree4(len_s, btable, iwork, Bowners));