| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | Comm.pyx | 23 def __cinit__(self, comm=None): argument 24 self.comm = def_Comm(comm, MPI_COMM_NULL) 26 if self.comm != MPI_COMM_NULL: 27 self.base = comm 33 CHKERR(PetscCommDEALLOC(&self.comm)) 34 self.comm = MPI_COMM_NULL 45 cdef MPI_Comm comm1 = s.comm 46 cdef MPI_Comm comm2 = o.comm 57 return self.comm != MPI_COMM_NULL 71 if self.comm == MPI_COMM_NULL: return [all …]
|
| H A D | petscmpi.pxi | 45 object comm, argument 51 cdef MPI_Comm *ptr = commget(comm) 55 cdef inline object mpi4py_Comm_New(MPI_Comm comm): argument 60 return commnew(comm) 86 cdef inline PetscErrorCode PetscCommDEALLOC(MPI_Comm* comm): argument 87 if comm == NULL: return PETSC_SUCCESS 88 cdef MPI_Comm tmp = comm[0] 90 comm[0] = MPI_COMM_NULL 96 object comm, MPI_Comm defv, argument 99 if comm is None: [all …]
|
| /petsc/src/sys/objects/ |
| H A D | garbage.c | 4 static PetscErrorCode GarbageGetHMap_Private(MPI_Comm comm, PetscGarbage *garbage) in GarbageGetHMap_Private() argument 10 PetscCallMPI(MPI_Comm_get_attr(comm, Petsc_Garbage_HMap_keyval, garbage, &iflg)); in GarbageGetHMap_Private() 15 PetscCallMPI(MPI_Comm_set_attr(comm, Petsc_Garbage_HMap_keyval, garbage->ptr)); in GarbageGetHMap_Private() 54 MPI_Comm comm; in PetscObjectDelayedDestroy() local 74 PetscCall(PetscObjectGetComm(*obj, &comm)); in PetscObjectDelayedDestroy() 75 PetscCallMPI(MPI_Comm_size(comm, &size)); in PetscObjectDelayedDestroy() 80 PetscCall(GarbageGetHMap_Private(comm, &garbage)); in PetscObjectDelayedDestroy() 135 PetscErrorCode GarbageKeyAllReduceIntersect_Private(MPI_Comm comm, PetscInt64 *set, PetscInt *entri… in GarbageKeyAllReduceIntersect_Private() argument 147 PetscCallMPI(MPIU_Allreduce(entries, &max_entries, 1, MPIU_INT, MPI_MAX, comm)); in GarbageKeyAllReduceIntersect_Private() 160 …PetscCallMPI(MPIU_Allreduce(sendset, recvset, 1, keyset_type, Petsc_Garbage_SetIntersectOp, comm)); in GarbageKeyAllReduceIntersect_Private() [all …]
|
| H A D | init.c | 160 static void Petsc_MPI_AbortOnError(PETSC_UNUSED MPI_Comm *comm, PetscMPIInt *flag, ...) in Petsc_MPI_AbortOnError() argument 167 static void Petsc_MPI_DebuggerOnError(MPI_Comm *comm, PetscMPIInt *flag, ...) in Petsc_MPI_DebuggerOnError() argument 171 if (PetscAttachDebugger()) PETSCABORT(*comm, (PetscErrorCode)*flag); /* hopeless so get out */ in Petsc_MPI_DebuggerOnError() 238 MPI_Comm comm = PETSC_COMM_WORLD; in PetscOptionsCheckInitial_Private() local 248 PetscCallMPI(MPI_Comm_rank(comm, &rank)); in PetscOptionsCheckInitial_Private() 325 PetscCall(PetscPrintf(comm, "%s", help)); in PetscOptionsCheckInitial_Private() 326 PetscCall(PetscPrintf(comm, "----------------------------------------\n")); in PetscOptionsCheckInitial_Private() 337 if (PetscExternalVersionFunction) PetscCall((*PetscExternalVersionFunction)(comm)); in PetscOptionsCheckInitial_Private() 340 if (!PetscCIEnabledPortableErrorOutput) PetscCall((*PetscHelpPrintf)(comm, "%s\n", version)); in PetscOptionsCheckInitial_Private() 341 PetscCall((*PetscHelpPrintf)(comm, "%s", PETSC_AUTHOR_INFO)); in PetscOptionsCheckInitial_Private() [all …]
|
| H A D | optionsyaml.c | 20 static inline MPI_Comm PetscYAMLSetComm(MPI_Comm comm) in PetscYAMLSetComm() argument 23 petsc_yaml_comm = comm; in PetscYAMLSetComm() 34 MPI_Comm comm = PetscYAMLGetComm(); in PetscParseLayerYAML() local 39 …PetscCheck(node->type == YAML_MAPPING_NODE, comm, PETSC_ERR_SUP, "Unsupported YAML node type: expe… in PetscParseLayerYAML() 45 PetscCheck(keynode, comm, PETSC_ERR_LIB, "Corrupt YAML document"); in PetscParseLayerYAML() 46 PetscCheck(valnode, comm, PETSC_ERR_LIB, "Corrupt YAML document"); in PetscParseLayerYAML() 47 …PetscCheck(keynode->type == YAML_SCALAR_NODE, comm, PETSC_ERR_SUP, "Unsupported YAML node type: ex… in PetscParseLayerYAML() 55 PetscCheck(itemnode, comm, PETSC_ERR_LIB, "Corrupt YAML document"); in PetscParseLayerYAML() 56 …PetscCheck(itemnode->type == YAML_MAPPING_NODE, comm, PETSC_ERR_SUP, "Unsupported YAML node type: … in PetscParseLayerYAML() 61 … } else SETERRQ(comm, PETSC_ERR_SUP, "Unsupported YAML node type: expected sequence or mapping"); in PetscParseLayerYAML() [all …]
|
| H A D | tagm.c | 39 PetscCall(PetscCommGetNewTag(obj->comm, tag)); in PetscObjectGetNewTag() 63 PetscErrorCode PetscCommGetNewTag(MPI_Comm comm, PetscMPIInt *tag) in PetscCommGetNewTag() argument 71 PetscCallMPI(MPI_Comm_get_attr(comm, Petsc_Counter_keyval, &counter, &flg)); in PetscCommGetNewTag() 86 PetscCallMPI(MPI_Barrier(comm)); in PetscCommGetNewTag() 126 *comm_out = pcomms->comm; in PetscCommGetComm() 162 ncomm->comm = *comm_out; in PetscCommRestoreComm() 212 MPI_Comm comm; in PetscCommDuplicate() member 231 ucomm.comm = *comm_out; /* ONLY the comm part of the union is significant. */ in PetscCommDuplicate() 233 ucomm.comm = comm_in; in PetscCommDuplicate() 236 *comm_out = ucomm.comm; in PetscCommDuplicate() [all …]
|
| /petsc/src/sys/mpiuni/ |
| H A D | mpi.c | 48 #define CommIdx(comm) ((comm) - 1) /* the communicator's internal index used in attr[idx][] and com… argument 226 int MPI_Comm_set_attr(MPI_Comm comm, int keyval, void *attribute_val) in MPI_Comm_set_attr() argument 228 int idx = CommIdx(comm), ret; in MPI_Comm_set_attr() 229 if (comm < 1 || comm > MaxComm) return MPI_FAILURE; in MPI_Comm_set_attr() 232 if ((ret = MPI_Comm_delete_attr(comm, keyval))) return ret; in MPI_Comm_set_attr() 239 int MPI_Comm_delete_attr(MPI_Comm comm, int keyval) in MPI_Comm_delete_attr() argument 241 int idx = CommIdx(comm); in MPI_Comm_delete_attr() 242 if (comm < 1 || comm > MaxComm) return MPI_FAILURE; in MPI_Comm_delete_attr() 251 …if ((ret = (*attr_keyval[keyval].del)(comm, keyval, save_attribute_val, attr_keyval[keyval].extra_… in MPI_Comm_delete_attr() 258 int MPI_Comm_get_attr(MPI_Comm comm, int keyval, void *attribute_val, int *flag) in MPI_Comm_get_attr() argument [all …]
|
| /petsc/src/sys/utils/ |
| H A D | mpiu.c | 8 PETSC_INTERN PetscErrorCode PetscSequentialPhaseBegin_Private(MPI_Comm comm, int ng) in PetscSequentialPhaseBegin_Private() argument 14 PetscCallMPI(MPI_Comm_size(comm, &size)); in PetscSequentialPhaseBegin_Private() 16 PetscCallMPI(MPI_Comm_rank(comm, &rank)); in PetscSequentialPhaseBegin_Private() 17 if (rank) PetscCallMPI(MPI_Recv(NULL, 0, MPI_INT, rank - 1, tag, comm, &status)); in PetscSequentialPhaseBegin_Private() 19 … % ng) < ng - 1 && rank != size - 1) PetscCallMPI(MPI_Send(NULL, 0, MPI_INT, rank + 1, tag, comm)); in PetscSequentialPhaseBegin_Private() 23 PETSC_INTERN PetscErrorCode PetscSequentialPhaseEnd_Private(MPI_Comm comm, int ng) in PetscSequentialPhaseEnd_Private() argument 29 PetscCallMPI(MPI_Comm_rank(comm, &rank)); in PetscSequentialPhaseEnd_Private() 30 PetscCallMPI(MPI_Comm_size(comm, &size)); in PetscSequentialPhaseEnd_Private() 34 …ng - 1 || rank == size - 1) PetscCallMPI(MPI_Send(NULL, 0, MPI_INT, (rank + 1) % size, tag, comm)); in PetscSequentialPhaseEnd_Private() 35 if (rank == 0) PetscCallMPI(MPI_Recv(NULL, 0, MPI_INT, size - 1, tag, comm, &status)); in PetscSequentialPhaseEnd_Private() [all …]
|
| H A D | mpits.c | 27 PetscErrorCode PetscCommBuildTwoSidedSetType(MPI_Comm comm, PetscBuildTwoSidedType twosided) in PetscCommBuildTwoSidedSetType() argument 34 PetscCallMPI(MPIU_Allreduce(b1, b2, 2, MPI_INT, MPI_MAX, comm)); in PetscCommBuildTwoSidedSetType() 35 …PetscCheck(-b2[0] == b2[1], comm, PETSC_ERR_ARG_WRONG, "Enum value must be same on all processes"); in PetscCommBuildTwoSidedSetType() 54 PetscErrorCode PetscCommBuildTwoSidedGetType(MPI_Comm comm, PetscBuildTwoSidedType *twosided) in PetscCommBuildTwoSidedGetType() argument 61 PetscCallMPI(MPI_Comm_size(comm, &size)); in PetscCommBuildTwoSidedGetType() 73 static PetscErrorCode PetscCommBuildTwoSided_Ibarrier(MPI_Comm comm, PetscMPIInt count, MPI_Datatyp… in PetscCommBuildTwoSided_Ibarrier() argument 83 PetscCall(PetscCommDuplicate(comm, &comm, &tag)); in PetscCommBuildTwoSided_Ibarrier() 85 PetscCheck(lb == 0, comm, PETSC_ERR_SUP, "Datatype with nonzero lower bound %ld", (long)lb); in PetscCommBuildTwoSided_Ibarrier() 88 …ssend((void *)(tdata + count * unitbytes * i), count, dtype, toranks[i], tag, comm, sendreqs + i)); in PetscCommBuildTwoSided_Ibarrier() 100 PetscCallMPI(MPI_Iprobe(MPI_ANY_SOURCE, tag, comm, &flag, &status)); in PetscCommBuildTwoSided_Ibarrier() [all …]
|
| H A D | psplit.c | 26 PetscErrorCode PetscSplitOwnershipBlock(MPI_Comm comm, PetscInt bs, PetscInt *n, PetscInt *N) in PetscSplitOwnershipBlock() argument 35 PetscCallMPI(MPIU_Allreduce(n, N, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnershipBlock() 38 PetscCallMPI(MPI_Comm_size(comm, &size)); in PetscSplitOwnershipBlock() 39 PetscCallMPI(MPI_Comm_rank(comm, &rank)); in PetscSplitOwnershipBlock() 67 PetscErrorCode PetscSplitOwnership(MPI_Comm comm, PetscInt *n, PetscInt *N) in PetscSplitOwnership() argument 77 PetscCallMPI(MPI_Comm_size(comm, &size)); in PetscSplitOwnership() 78 PetscCallMPI(MPIU_Allreduce(l, g, 2, MPI_INT, MPI_SUM, comm)); in PetscSplitOwnership() 79 …PetscCheck(!g[0] || g[0] == size, comm, PETSC_ERR_ARG_INCOMP, "All processes must supply PETSC_DEC… in PetscSplitOwnership() 80 …PetscCheck(!g[1] || g[1] == size, comm, PETSC_ERR_ARG_INCOMP, "All processes must supply PETSC_DEC… in PetscSplitOwnership() 84 PetscCallMPI(MPIU_Allreduce(n, N, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnership() [all …]
|
| /petsc/include/petsc/mpiuni/ |
| H A D | mpi.h | 369 MPIUni_PETSC_EXTERN int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag); 406 #define MPI_Comm_f2c(comm) (MPI_Comm)(comm) argument 407 #define MPI_Comm_c2f(comm) (MPI_Fint)(comm) argument 414 …comm) (MPIUNI_ARG(buf), MPIUNI_ARG(count), MPIUNI_ARG(data… argument 416 …comm, status) (MPIUNI_ARG(buf), MPIUNI_ARG(count), MPIUNI_ARG(dataty… argument 419 …comm) (MPIUNI_ARG(buf), MPIUNI_ARG(count), MPIUNI_ARG(datat… argument 420 …comm) (MPIUNI_ARG(buf), MPIUNI_ARG(count), MPIUNI_ARG(datat… argument 421 …comm) (MPIUNI_ARG(buf), MPIUNI_ARG(count), MPIUNI_ARG(datat… argument 424 …comm, request) (MPIUNI_ARG(buf), MPIUNI_ARG(count), MPIUNI_ARG(dataty… argument 425 …comm, request) (MPIUNI_ARG(buf), MPIUNI_ARG(count), MPIUNI_ARG(dataty… argument [all …]
|
| /petsc/src/sys/tests/ |
| H A D | ex17.c | 14 MPI_Comm comm = PETSC_COMM_WORLD; in main() local 15 PetscCallMPI(MPI_Comm_rank(comm, &rank)); in main() 18 PetscCall(PetscFOpen(comm, filename, "w", &fp)); in main() 19 PetscCall(PetscFPrintf(comm, fp, line1)); in main() 20 PetscCall(PetscFPrintf(comm, fp, line2)); in main() 21 PetscCall(PetscSynchronizedFPrintf(comm, fp, "rank: %d\n", rank)); // Print rankid in order in main() 22 PetscCall(PetscSynchronizedFlush(comm, fp)); in main() 23 PetscCall(PetscFClose(comm, fp)); in main() 31 PetscCall(PetscFOpen(comm, filename, "r", &fp)); in main() 32 PetscCall(PetscSynchronizedFGets(comm, fp, sizeof(line), line)); in main() [all …]
|
| /petsc/src/sys/classes/viewer/impls/ascii/ |
| H A D | vcreatea.c | 32 PetscViewer PETSC_VIEWER_STDOUT_(MPI_Comm comm) in PETSC_VIEWER_STDOUT_() argument 37 PetscCallNull(PetscViewerASCIIGetStdout(comm, &viewer)); in PETSC_VIEWER_STDOUT_() 70 PetscErrorCode PetscViewerASCIIGetStderr(MPI_Comm comm, PetscViewer *viewer) in PetscViewerASCIIGetStderr() argument 77 PetscCall(PetscCommDuplicate(comm, &ncomm, NULL)); in PetscViewerASCIIGetStderr() 115 PetscViewer PETSC_VIEWER_STDERR_(MPI_Comm comm) in PETSC_VIEWER_STDERR_() argument 120 PetscCallNull(PetscViewerASCIIGetStderr(comm, &viewer)); in PETSC_VIEWER_STDERR_() 132 PetscMPIInt MPIAPI Petsc_DelViewer(MPI_Comm comm, PetscMPIInt keyval, void *attr_val, void *extra_s… in Petsc_DelViewer() argument 138 … "Removing viewer data attribute in an MPI_Comm %" PETSC_INTPTR_T_FMT "\n", (PETSC_INTPTR_T)comm)); in Petsc_DelViewer() 185 PetscErrorCode PetscViewerASCIIOpen(MPI_Comm comm, const char name[], PetscViewer *viewer) in PetscViewerASCIIOpen() argument 206 PetscCall(PetscCommDuplicate(comm, &comm, NULL)); in PetscViewerASCIIOpen() [all …]
|
| /petsc/src/sys/classes/viewer/interface/ |
| H A D | viewreg.c | 167 static PetscErrorCode PetscOptionsCreateViewers_Single(MPI_Comm comm, const char value[], PetscView… in PetscOptionsCreateViewers_Single() argument 179 PetscCall(PetscViewerASCIIGetStdout(comm, viewer)); in PetscOptionsCreateViewers_Single() 200 …PetscCheck(cnt <= (PetscInt)sizeof(viewers) - 1, comm, PETSC_ERR_ARG_OUTOFRANGE, "Unknown viewer t… in PetscOptionsCreateViewers_Single() 205 PetscCall(PetscViewerASCIIGetStdout(comm, viewer)); in PetscOptionsCreateViewers_Single() 209 if (!(*viewer = PETSC_VIEWER_BINARY_(comm))) PetscCall(PETSC_ERR_PLIB); in PetscOptionsCreateViewers_Single() 213 if (!(*viewer = PETSC_VIEWER_DRAW_(comm))) PetscCall(PETSC_ERR_PLIB); in PetscOptionsCreateViewers_Single() 218 if (!(*viewer = PETSC_VIEWER_SOCKET_(comm))) PetscCall(PETSC_ERR_PLIB); in PetscOptionsCreateViewers_Single() 224 if (!(*viewer = PETSC_VIEWER_MATLAB_(comm))) PetscCall(PETSC_ERR_PLIB); in PetscOptionsCreateViewers_Single() 230 if (!(*viewer = PETSC_VIEWER_SAWS_(comm))) PetscCall(PETSC_ERR_PLIB); in PetscOptionsCreateViewers_Single() 236 if (!(*viewer = PETSC_VIEWER_HDF5_(comm))) PetscCall(PETSC_ERR_PLIB); in PetscOptionsCreateViewers_Single() [all …]
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex31.c | 14 static PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options) in ProcessOptions() argument 21 PetscOptionsBegin(comm, "", "Meshing Interpolation Test Options", "DMPLEX"); in ProcessOptions() 29 static PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *user, DM *dm) in CreateMesh() argument 32 PetscCall(DMCreate(comm, dm)); in CreateMesh() 41 MPI_Comm comm; in main() local 54 comm = PETSC_COMM_WORLD; in main() 55 PetscCallMPI(MPI_Comm_size(comm, &size)); in main() 56 PetscCall(ProcessOptions(comm, &user)); in main() 57 PetscCall(CreateMesh(comm, &user, &dm)); in main() 64 PetscCall(PetscSectionCreate(comm, &s)); in main() [all …]
|
| /petsc/src/binding/petsc4py/demo/legacy/petsc-examples/ksp/ |
| H A D | ex2.py | 27 comm = PETSc.COMM_WORLD variable 28 size = comm.getSize() 29 rank = comm.getRank() 50 A = PETSc.Mat().create(comm=comm) 126 u = PETSc.Vec().create(comm=comm) 151 ksp = PETSc.KSP().create(comm=comm) 200 PETSc.Sys.Print("Norm of error {}, Iterations {}".format(norm,its),comm=comm) 203 PETSc.Sys.Print("- Serial OK",comm=comm) 205 PETSc.Sys.Print("- Parallel OK",comm=comm)
|
| H A D | ex23.py | 23 comm = PETSc.COMM_WORLD variable 24 size = comm.getSize() 25 rank = comm.getRank() 41 x = PETSc.Vec().create(comm=comm) 69 A = PETSc.Mat().create(comm=comm) 174 PETSc.Sys.Print("Norm of error {}, Iterations {}\n".format(norm,its),comm=comm) 177 PETSc.Sys.Print("- Serial OK",comm=comm) 179 PETSc.Sys.Print("- Parallel OK",comm=comm)
|
| /petsc/src/vec/vec/tests/ |
| H A D | ex34.c | 9 MPI_Comm comm; in main() local 17 comm = MPI_COMM_SELF; in main() 19 PetscCall(VecCreate(comm, &V)); in main() 32 PetscCall(PetscPrintf(comm, "Original: norm1=%e,norm2=%e\n", (double)nrm1, (double)nrm2)); in main() 37 PetscCall(PetscPrintf(comm, "cached: norm1=%e,norm2=%e\n", (double)nrm1, (double)nrm2)); in main() 47 PetscCall(PetscPrintf(comm, "Altered: norm1=%e,norm2=%e\n", (double)nrm1, (double)nrm2)); in main() 52 PetscCall(PetscPrintf(comm, "recomputed: norm1=%e,norm2=%e\n", (double)nrm1, (double)nrm2)); in main() 62 PetscCall(PetscPrintf(comm, "Scale: norm1=%e,norm2=%e\n", (double)nrm1, (double)nrm2)); in main() 68 PetscCall(PetscPrintf(comm, "recompute: norm1=%e,norm2=%e\n", (double)nrm1, (double)nrm2)); in main() 78 PetscCall(PetscPrintf(comm, "Normalize: norm1=%e,norm2=%e\n", (double)nrm1, (double)nrm2)); in main() [all …]
|
| H A D | ex48.c | 281 MPI_Comm comm; in CapsuleReadAndCompareAttributes() local 284 PetscCall(PetscObjectGetComm((PetscObject)v, &comm)); in CapsuleReadAndCompareAttributes() 293 PetscCall(PetscPrintf(comm, " %-24s = ", attribute)); in CapsuleReadAndCompareAttributes() 294 if (!hasAttr) PetscCall(PetscPrintf(comm, "---")); in CapsuleReadAndCompareAttributes() 296 …PetscCheck(gd || !hasAttr, comm, PETSC_ERR_PLIB, "Attribute %s/%s/%s exists while its parent %s/%s… in CapsuleReadAndCompareAttributes() 297 …PetscCheck(flg == hasAttr, comm, PETSC_ERR_PLIB, "Attribute %s/%s should exist? %s Exists? %s", pa… in CapsuleReadAndCompareAttributes() 316 …PetscCheck(flg, comm, PETSC_ERR_PLIB, "Value of attribute %s/%s/%s is not equal to the original va… in CapsuleReadAndCompareAttributes() 317 if (verbose) PetscCall(PetscPrintf(comm, " (=)")); in CapsuleReadAndCompareAttributes() 320 if (verbose && gd) PetscCall(PetscPrintf(comm, "\n")); in CapsuleReadAndCompareAttributes() 345 MPI_Comm comm; in testGroupsDatasets() local [all …]
|
| /petsc/src/vec/is/is/tests/ |
| H A D | ex7.c | 7 MPI_Comm comm = PETSC_COMM_SELF; in TestGeneral() local 13 PetscCall(ISCreateGeneral(comm, n, idx, PETSC_COPY_VALUES, &is)); in TestGeneral() 15 …PetscCheck(location == keylocation, comm, PETSC_ERR_PLIB, "Key %" PetscInt_FMT " not at %" PetscIn… in TestGeneral() 17 …PetscCheck(location < 0, comm, PETSC_ERR_PLIB, "Nonkey %" PetscInt_FMT " found at %" PetscInt_FMT,… in TestGeneral() 20 …PetscCheck(location == sortedlocation, comm, PETSC_ERR_PLIB, "Key %" PetscInt_FMT " not at %" Pets… in TestGeneral() 22 …PetscCheck(location < 0, comm, PETSC_ERR_PLIB, "Nonkey %" PetscInt_FMT " found at %" PetscInt_FMT,… in TestGeneral() 29 MPI_Comm comm = PETSC_COMM_SELF; in TestBlock() local 37 PetscCall(ISCreateBlock(comm, bs, n, idx, PETSC_COPY_VALUES, &is)); in TestBlock() 39 …PetscCheck(location == keylocation, comm, PETSC_ERR_PLIB, "Key %" PetscInt_FMT " not at %" PetscIn… in TestBlock() 41 …PetscCheck(location < 0, comm, PETSC_ERR_PLIB, "Nonkey %" PetscInt_FMT " found at %" PetscInt_FMT,… in TestBlock() [all …]
|
| H A D | ex13.c | 11 static PetscErrorCode CreateIS(MPI_Comm comm, PetscInt type, PetscInt n, PetscInt first, PetscInt s… in CreateIS() argument 17 PetscCallMPI(MPI_Comm_rank(comm, &rank)); in CreateIS() 23 PetscCall(ISCreateGeneral(comm, n, idx, PETSC_OWN_POINTER, is)); in CreateIS() 26 PetscCall(ISCreateStride(comm, n, first, step, is)); in CreateIS() 31 PetscCall(ISCreateBlock(comm, 1, n, idx, PETSC_OWN_POINTER, is)); in CreateIS() 44 MPI_Comm comm; in main() local 48 comm = PETSC_COMM_WORLD; in main() 57 PetscCall(CreateIS(comm, type, n, first + offset, step, &is[j])); in main() 60 PetscCall(CreateIS(comm, type, n, first + offset, step, &is[j])); in main() 64 PetscCall(CreateIS(comm, type, n, first + offset, step, &tmp)); in main() [all …]
|
| /petsc/src/vec/vec/utils/ |
| H A D | comb.c | 23 …d *recvbuf, PetscMPIInt count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *reque… in MPIU_Iallreduce() argument 28 err = MPI_Iallreduce(sendbuf, recvbuf, count, datatype, op, comm, request); in MPIU_Iallreduce() 30 err = MPIU_Allreduce(sendbuf, recvbuf, count, datatype, op, comm); in MPIU_Iallreduce() 41 static PetscErrorCode PetscSplitReductionCreate(MPI_Comm comm, PetscSplitReduction **sr) in PetscSplitReductionCreate() argument 52 (*sr)->comm = comm; in PetscSplitReductionCreate() 113 PetscErrorCode PetscCommSplitReductionBegin(MPI_Comm comm) in PetscCommSplitReductionBegin() argument 119 PetscCall(PetscSplitReductionGet(comm, &sr)); in PetscCommSplitReductionBegin() 126 MPI_Comm comm = sr->comm; in PetscCommSplitReductionBegin() local 130 PetscCallMPI(MPI_Comm_size(sr->comm, &size)); in PetscCommSplitReductionBegin() 148 …values_mix, sr->gvalues_mix, numops, MPIU_SCALAR_INT, PetscSplitReduction_Op, comm, &sr->request)); in PetscCommSplitReductionBegin() [all …]
|
| /petsc/src/vec/is/utils/ |
| H A D | psort.c | 5 static PetscErrorCode PetscParallelSortInt_Bitonic_Merge(MPI_Comm comm, PetscMPIInt tag, PetscMPIIn… in PetscParallelSortInt_Bitonic_Merge() argument 32 …drecv(keys, n, MPIU_INT, partner, tag, buffer, n, MPIU_INT, partner, tag, comm, MPI_STATUS_IGNORE)… in PetscParallelSortInt_Bitonic_Merge() 41 …PetscCall(PetscParallelSortInt_Bitonic_Merge(comm, tag, rankStart, mid, rank, n, keys, buffer, for… in PetscParallelSortInt_Bitonic_Merge() 43 …PetscCall(PetscParallelSortInt_Bitonic_Merge(comm, tag, mid, rankEnd, rank, n, keys, buffer, forwa… in PetscParallelSortInt_Bitonic_Merge() 49 static PetscErrorCode PetscParallelSortInt_Bitonic_Recursive(MPI_Comm comm, PetscMPIInt tag, PetscM… in PetscParallelSortInt_Bitonic_Recursive() argument 67 …PetscCall(PetscParallelSortInt_Bitonic_Recursive(comm, tag, rankStart, mid, rank, n, keys, buffer,… in PetscParallelSortInt_Bitonic_Recursive() 69 …PetscCall(PetscParallelSortInt_Bitonic_Recursive(comm, tag, mid, rankEnd, rank, n, keys, buffer, f… in PetscParallelSortInt_Bitonic_Recursive() 72 …PetscCall(PetscParallelSortInt_Bitonic_Merge(comm, tag, rankStart, rankEnd, rank, n, keys, buffer,… in PetscParallelSortInt_Bitonic_Recursive() 76 static PetscErrorCode PetscParallelSortInt_Bitonic(MPI_Comm comm, PetscInt n, PetscInt keys[]) in PetscParallelSortInt_Bitonic() argument 83 PetscCall(PetscCommGetNewTag(comm, &tag)); in PetscParallelSortInt_Bitonic() [all …]
|
| /petsc/src/binding/petsc4py/demo/legacy/ode/ |
| H A D | heat.py | 13 def __init__(self, comm, N): argument 14 self.comm = comm 17 self.n = N // comm.size + int( 18 comm.rank < (N % comm.size) 20 self.start = comm.exscan(self.n) 21 if comm.rank == 0: 27 self.mat = PETSc.Mat().create(comm=comm) 36 lgmap = PETSc.LGMap().create(list(gindices), comm=comm) 41 self.lvec = PETSc.Vec().create(comm=PETSc.COMM_SELF) 45 isg = PETSc.IS().createGeneral(list(gindices), comm=comm) [all …]
|
| /petsc/src/dm/impls/plex/tutorials/ |
| H A D | ex15.c | 15 static PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options) in ProcessOptions() argument 24 PetscOptionsBegin(comm, "", "Meshing Problem Options", "DMPLEX"); in ProcessOptions() 30 PetscCheck(flg, comm, PETSC_ERR_USER_INPUT, "-infile needs to be specified"); in ProcessOptions() 31 PetscCheck(flg, comm, PETSC_ERR_USER_INPUT, "-outfile needs to be specified"); in ProcessOptions() 36 PetscErrorCode ReadCGNSDM(MPI_Comm comm, const char filename[], DM *dm) in ReadCGNSDM() argument 41 PetscCall(DMPlexCreateFromFile(comm, filename, "ex15_plex", PETSC_TRUE, dm)); in ReadCGNSDM() 89 MPI_Comm comm = PetscObjectComm((PetscObject)dm_load); in VerifyLoadedSolution() local 114 PetscCall(PetscSFCreate(comm, &load_to_serial_sf)); in VerifyLoadedSolution() 148 …if (PetscAbs(array_serial[i] - array_load_bcast[i]) > tol) PetscCall(PetscPrintf(comm, "DoF %" Pet… in VerifyLoadedSolution() 161 MPI_Comm comm; in main() local [all …]
|