Home
last modified time | relevance | path

Searched refs:PETSC_COMM_WORLD (Results 1 – 25 of 1385) sorted by relevance

12345678910>>...56

/petsc/src/sys/tests/
H A Dex25.c8 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Real tests:\n")); in main()
15 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "sqrt(%f) = %f\n", (double)a, (double)b)); in main()
17 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "cbrt(%f) = %f\n", (double)a, (double)b)); in main()
20 … PetscCall(PetscPrintf(PETSC_COMM_WORLD, "hypot(%f,%f) = %f\n", (double)a, (double)c, (double)b)); in main()
22 … PetscCall(PetscPrintf(PETSC_COMM_WORLD, "atan2(%f,%f) = %f\n", (double)a, (double)c, (double)b)); in main()
25 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "pow(%f,%f) = %f\n", (double)a, (double)c, (double)b)); in main()
27 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "exp(%f) = %f\n", (double)a, (double)b)); in main()
29 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "log(%f) = %f\n", (double)a, (double)b)); in main()
31 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "log10(%f) = %f\n", (double)a, (double)b)); in main()
33 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "log2(%f) = %f\n", (double)a, (double)b)); in main()
[all …]
H A Dex16.c14 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in main()
16 PetscCall(PetscMatlabEngineGetOutput(PETSC_MATLAB_ENGINE_(PETSC_COMM_WORLD), &output)); in main()
18 PetscCall(PetscMatlabEngineEvaluate(PETSC_MATLAB_ENGINE_(PETSC_COMM_WORLD), "MPI_Comm_rank")); in main()
19 PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "[%d]Processor rank is %s", rank, output)); in main()
20 PetscCall(PetscSynchronizedFlush(PETSC_COMM_WORLD, PETSC_STDOUT)); in main()
21 PetscCall(PetscPrintf(PETSC_COMM_WORLD, ">>")); in main()
22 PetscCall(PetscSynchronizedFGets(PETSC_COMM_WORLD, stdin, 256, user)); in main()
25 PetscCall(PetscMatlabEngineEvaluate(PETSC_MATLAB_ENGINE_(PETSC_COMM_WORLD), user)); in main()
26 PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "[%d]The result is %s", rank, output)); in main()
27 PetscCall(PetscSynchronizedFlush(PETSC_COMM_WORLD, PETSC_STDOUT)); in main()
[all …]
H A Dex17f.F9016 PetscCallMPIA(MPI_Comm_rank(PETSC_COMM_WORLD, rank, ierr))
18 PetscCallA(PetscFOpen(PETSC_COMM_WORLD, 'testfile', 'w', file, ierr))
20 PetscCallA(PetscFPrintf(PETSC_COMM_WORLD, file, 'Hi once \n', ierr))
21 PetscCallA(PetscSynchronizedFPrintf(PETSC_COMM_WORLD, file, 'Hi twice \n', ierr))
22 PetscCallA(PetscSynchronizedFlush(PETSC_COMM_WORLD, file, ierr))
25 PetscCallA(PetscSynchronizedFPrintf(PETSC_COMM_WORLD, file, joe, ierr))
26 PetscCallA(PetscSynchronizedFlush(PETSC_COMM_WORLD, file, ierr))
28 PetscCallA(PetscFClose(PETSC_COMM_WORLD, file, ierr))
30 PetscCallA(PetscSynchronizedPrintf(PETSC_COMM_WORLD, 'Hi twice \n', ierr))
31 PetscCallA(PetscSynchronizedFlush(PETSC_COMM_WORLD, PETSC_STDOUT, ierr))
H A Dex37.c21 PetscCheck(sz == 29, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Format size %zu should be 29", sz); in main()
23 PetscCheck(sz == 27, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Format size %zu should be 27", sz); in main()
27 PetscCall(PetscPrintf(PETSC_COMM_WORLD, newformatstr, twentytwo, 3.47, 3.0)); in main()
37 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "buffer :%s: fullLength %d\n", buffer, (int)fullLength)); in main()
43 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "longstr fullLength %d\n", (int)fullLength)); in main()
49 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Greetings %s", superlongstr)); in main()
52 PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "Greetings %s", superlongstr)); in main()
53 PetscCall(PetscSynchronizedFlush(PETSC_COMM_WORLD, stdout)); in main()
56 PetscCall(PetscSynchronizedFPrintf(PETSC_COMM_WORLD, stdout, "Greetings %s", superlongstr)); in main()
57 PetscCall(PetscSynchronizedFlush(PETSC_COMM_WORLD, stdout)); in main()
[all …]
/petsc/src/vec/is/tests/
H A Dex2.c21 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in main()
22 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
23 …PetscCheck(size < 4, PETSC_COMM_WORLD, PETSC_ERR_WRONG_MPI_SIZE, "Example only works with up to th… in main()
26 …for (i = 0; i < 3; i++) PetscCall(ISCreateGeneral(PETSC_COMM_WORLD, n, ix[i][rank], PETSC_COPY_VAL… in main()
29 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "testfile", FILE_MODE_WRITE, &vx)); in main()
33 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "testfile", FILE_MODE_READ, &vl)); in main()
34 PetscCall(ISCreate(PETSC_COMM_WORLD, &il)); in main()
37 …PetscCheck(equal, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Iteration %" PetscInt_FMT " - Index set loade… in main()
41 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "testfile", FILE_MODE_APPEND, &vx)); in main()
46 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "testfile", FILE_MODE_READ, &vl)); in main()
[all …]
/petsc/src/vec/vec/tests/
H A Dex100cu.cu49 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in main()
50 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
56 PetscCall(VecCreate(PETSC_COMM_WORLD, &u)); in main()
73 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "writing vector in binary to vector.dat ...\n")); in main()
74 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "vector.dat", FILE_MODE_WRITE, &viewer)); in main()
77 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "writing vector in hdf5 to vector.dat ...\n")); in main()
78 PetscCall(PetscViewerHDF5Open(PETSC_COMM_WORLD, "vector.dat", FILE_MODE_WRITE, &viewer)); in main()
82 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "writing vector in adios to vector.dat ...\n")); in main()
83 PetscCall(PetscViewerADIOSOpen(PETSC_COMM_WORLD, "vector.dat", FILE_MODE_WRITE, &viewer)); in main()
85 …} else SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "No data format specified, run with one of -binary… in main()
[all …]
H A Dex41.c14 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "============== %s ==============\n", PETSC_FUNCTION_NAME)… in test_vec_ops()
17 PetscCall(VecCreate(PETSC_COMM_WORLD, &c)); in test_vec_ops()
25 PetscCall(VecCreate(PETSC_COMM_WORLD, &g)); in test_vec_ops()
28 PetscCall(VecCreate(PETSC_COMM_WORLD, &h)); in test_vec_ops()
41 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "a = [c d] \n")); in test_vec_ops()
45 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, NULL, tmp_buf, &a)); in test_vec_ops()
47 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "a = [d c] \n")); in test_vec_ops()
55 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "b = [e f] \n")); in test_vec_ops()
59 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, NULL, tmp_buf, &b)); in test_vec_ops()
61 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "b = [f e] \n")); in test_vec_ops()
[all …]
H A Dex51.c39 PetscCall(VecCreate(PETSC_COMM_WORLD, &testvec)); in main()
45 PetscCall(VecCreate(PETSC_COMM_WORLD, &writevec)); in main()
53 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "writing vector in hdf5 to vector.dat ...\n")); in main()
54 PetscCall(PetscViewerHDF5Open(PETSC_COMM_WORLD, "vector.dat", FILE_MODE_WRITE, &viewer)); in main()
56 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "writing vector in binary to vector.dat ...\n")); in main()
57 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "vector.dat", FILE_MODE_WRITE, &viewer)); in main()
75 PetscCall(ISCreateStride(PETSC_COMM_WORLD, issize, isstart, 1, &loadis)); in main()
83 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "reading vector in hdf5 from vector.dat ...\n")); in main()
84 PetscCall(PetscViewerHDF5Open(PETSC_COMM_WORLD, "vector.dat", FILE_MODE_READ, &viewer)); in main()
86 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "reading vector in binary from vector.dat ...\n")); in main()
[all …]
H A Dex37.c13 …PetscCall(ISCreateStride(PETSC_COMM_WORLD, rend[0] - rstart[0], rstart[0] + rstart[1], 1, &is[0])); in GetISs()
14 … PetscCall(ISCreateStride(PETSC_COMM_WORLD, rend[1] - rstart[1], rend[0] + rstart[1], 1, &is[1])); in GetISs()
16 …PetscCall(ISCreateStride(PETSC_COMM_WORLD, rend[0] - rstart[0], rend[0] + rend[1] - 1, -1, &is[0])… in GetISs()
17 …PetscCall(ISCreateStride(PETSC_COMM_WORLD, rend[1] - rstart[1], rstart[0] + rend[1] - 1, -1, &is[1… in GetISs()
56 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "\n\n============== %s ==============\n", PETSC_FUNCTION_N… in test_view()
58 PetscCall(VecCreate(PETSC_COMM_WORLD, &c)); in test_view()
77 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, explcit ? tmp_is : NULL, tmp_buf, &b)); in test_view()
85 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, NULL, tmp_buf, &a)); in test_view()
94 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, tmp_is, tmp_buf, &X)); in test_view()
98 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, NULL, tmp_buf, &X)); in test_view()
[all …]
H A Dex44.c44 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "The vector sizes are %" PetscInt_FMT ". The number of ele… in main()
45 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Adjust the parameters such that m>=n\n")); in main()
47 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "The vector sizes are %" PetscInt_FMT ". The number of ele… in main()
48 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "For the Strided Scatter, toFirst=%" PetscInt_FMT " and to… in main()
49 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "This produces an index (toFirst+(n-1)*toStep)>=m\n")); in main()
50 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Adjust the parameterrs accordingly with -m, -n, -toFirst,… in main()
52 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "The vector sizes are %" PetscInt_FMT ". The number of ele… in main()
53 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "For the Strided Scatter, fromFirst=%" PetscInt_FMT " and … in main()
54 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "This produces an index (fromFirst+(n-1)*fromStep)>=m\n")); in main()
55 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Adjust the parameterrs accordingly with -m, -n, -fromFirs… in main()
[all …]
/petsc/src/vec/vec/tutorials/
H A Dex10.c42 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in main()
43 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
51 PetscCall(VecCreate(PETSC_COMM_WORLD, &u)); in main()
67 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "writing vector in binary to vector.dat ...\n")); in main()
68 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "vector.dat", FILE_MODE_WRITE, &viewer)); in main()
71 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "writing vector in hdf5 to vector.dat ...\n")); in main()
72 PetscCall(PetscViewerHDF5Open(PETSC_COMM_WORLD, "vector.dat", FILE_MODE_WRITE, &viewer)); in main()
76 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "writing vector in adios to vector.dat ...\n")); in main()
77 PetscCall(PetscViewerADIOSOpen(PETSC_COMM_WORLD, "vector.dat", FILE_MODE_WRITE, &viewer)); in main()
79 …} else SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "No data format specified, run with one of -binary… in main()
[all …]
H A Dex44.c25 PetscCall(VecCreate(PETSC_COMM_WORLD, &x[i])); in main()
39 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Original X[%" PetscInt_FMT "] vector\n", i)); in main()
42 PetscCall(VecCreate(PETSC_COMM_WORLD, &y)); in main()
55 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Expected Y vector\n")); in main()
57 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "---------------------------------------------------------… in main()
61 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Testing VecConcatenate() for Y = [X[1], X[2], ...]\n")); in main()
66 PetscCall(PetscPrintf(PETSC_COMM_WORLD, " FAIL\n")); in main()
68 PetscCall(PetscPrintf(PETSC_COMM_WORLD, " PASS\n")); in main()
70 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "---------------------------------------------------------… in main()
75 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Testing VecConcatenate() for Y = [X[1], X[2], ...] w/o IS… in main()
[all …]
H A Dex11.c30 PetscCall(VecCreate(PETSC_COMM_WORLD, &x)); in main()
41 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "L_2 Norm of entire vector: %g\n", (double)norm)); in main()
44 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "L_1 Norm of entire vector: %g\n", (double)norm)); in main()
47 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "L_inf Norm of entire vector: %g\n", (double)norm)); in main()
50 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "L_2 Norm of sub-vector 0: %g\n", (double)norm)); in main()
53 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "L_1 Norm of sub-vector 0: %g\n", (double)norm)); in main()
56 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "L_inf Norm of sub-vector 0: %g\n", (double)norm)); in main()
59 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "L_2 Norm of sub-vector 1: %g\n", (double)norm)); in main()
62 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "L_1 Norm of sub-vector 1: %g\n", (double)norm)); in main()
65 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "L_inf Norm of sub-vector 1: %g\n", (double)norm)); in main()
/petsc/src/dm/tests/
H A Dex33.c27 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in main()
28 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
56 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, stencil_type, M, N, PETSC_DECIDE, PETSC_DECIDE, d… in main()
58 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P, PETSC_DECIDE, PETSC_DE… in main()
60 PetscCall(DMDACreate1d(PETSC_COMM_WORLD, bx, M, dof, stencil_width, NULL, &da)); in main()
67 PetscCall(PetscRandomCreate(PETSC_COMM_WORLD, &rdm)); in main()
72 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "temp", FILE_MODE_WRITE, &viewer)); in main()
75 PetscCall(PetscViewerHDF5Open(PETSC_COMM_WORLD, "temp", FILE_MODE_WRITE, &viewer)); in main()
77 …} else SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "Invalid Viewer : Run with -binary or -hdf5 option… in main()
81 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Global vector written to temp file is \n")); in main()
[all …]
H A Dex23.c44 …PetscCall(DMDACreate2d(PETSC_COMM_WORLD, bx, by, stencil_type, M, N, m, n, dof, stencil_width, 0, … in main()
46 …PetscCall(DMDACreate3d(PETSC_COMM_WORLD, bx, by, bz, stencil_type, M, N, P, m, n, p, dof, stencil_… in main()
48 PetscCall(DMDACreate1d(PETSC_COMM_WORLD, bx, M, dof, stencil_width, NULL, &da)); in main()
54 PetscCall(PetscRandomCreate(PETSC_COMM_WORLD, &rdm)); in main()
60 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "temp", FILE_MODE_WRITE, &viewer)); in main()
69 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "temp", FILE_MODE_READ, &viewer)); in main()
79 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "temp", FILE_MODE_READ, &viewer)); in main()
87 … PetscCall(PetscPrintf(PETSC_COMM_WORLD, "ex23: global vector does not match contents of file\n")); in main()
98 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
99 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "ex23: Norm of difference %g should be zero\n", (double)no… in main()
[all …]
/petsc/src/benchmarks/streams/
H A DSSEVersion.c84 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
88 PetscPrintf(PETSC_COMM_WORLD, HLINE); in main()
90 …PetscPrintf(PETSC_COMM_WORLD, "This system uses %d bytes per DOUBLE PRECISION word.\n", BytesPerWo… in main()
92 PetscPrintf(PETSC_COMM_WORLD, HLINE); in main()
93 PetscPrintf(PETSC_COMM_WORLD, "Array size = %d, Offset = %d\n", N, OFFSET); in main()
94 …PetscPrintf(PETSC_COMM_WORLD, "Total memory required = %.1f MB per process.\n", (3 * N * BytesPerW… in main()
95 PetscPrintf(PETSC_COMM_WORLD, "Each test is run %d times, but only\n", NTIMES); in main()
96 PetscPrintf(PETSC_COMM_WORLD, "the *best* time for each is used.\n"); in main()
129 PetscPrintf(PETSC_COMM_WORLD, HLINE); in main()
131 …if ((quantum = checktick()) >= 1) PetscPrintf(PETSC_COMM_WORLD, "Your clock granularity/precision … in main()
[all …]
/petsc/src/ksp/ksp/tests/
H A Dex25.c20 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in main()
21 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
24 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "\n Load dataset ...\n")); in main()
26 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, filein, FILE_MODE_READ, &view)); in main()
27 PetscCall(MatCreate(PETSC_COMM_WORLD, &C)); in main()
30 PetscCall(VecCreate(PETSC_COMM_WORLD, &b)); in main()
31 PetscCall(VecCreate(PETSC_COMM_WORLD, &u)); in main()
52 PetscCall(KSPCreate(PETSC_COMM_WORLD, &ksp)); in main()
55 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "\n CG: \n")); in main()
57 PetscCall(KSPCreate(PETSC_COMM_WORLD, &ksp)); in main()
[all …]
H A Dex31.c23 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
24 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in main()
32 …PetscCheck(flg, PETSC_COMM_WORLD, PETSC_ERR_USER_INPUT, "Must indicate binary file with the -f opt… in main()
37 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, file, FILE_MODE_READ, &fd)); in main()
38 PetscCall(MatCreate(PETSC_COMM_WORLD, &A)); in main()
45 PetscCall(VecCreate(PETSC_COMM_WORLD, &b)); in main()
64 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Before partitioning/reordering, A:\n")); in main()
69 PetscCall(MatPartitioningCreate(PETSC_COMM_WORLD, &mpart)); in main()
76 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "mis, new processor assignment:\n")); in main()
82 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "nis:\n")); in main()
[all …]
H A Dex11.c50 PetscCall(MatCreate(PETSC_COMM_WORLD, A11)); in LSCLoadTestOperators()
51 PetscCall(MatCreate(PETSC_COMM_WORLD, A12)); in LSCLoadTestOperators()
52 PetscCall(MatCreate(PETSC_COMM_WORLD, A21)); in LSCLoadTestOperators()
53 PetscCall(MatCreate(PETSC_COMM_WORLD, A22)); in LSCLoadTestOperators()
58 PetscCall(VecCreate(PETSC_COMM_WORLD, b1)); in LSCLoadTestOperators()
59 PetscCall(VecCreate(PETSC_COMM_WORLD, b2)); in LSCLoadTestOperators()
62 PetscCheck(flg, PETSC_COMM_WORLD, PETSC_ERR_USER, "Must provide a matrix file with -f"); in LSCLoadTestOperators()
63 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, filename, FILE_MODE_READ, &viewer)); in LSCLoadTestOperators()
97 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in LoadTestMatrices()
98 …PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "[%d] lnu = %" PetscInt_FMT " | lnp = %" Petsc… in LoadTestMatrices()
[all …]
/petsc/src/dm/impls/stag/tests/
H A Dex14.c16 …PetscCheck(flg, PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONG, "Supply -dim option with value 1, 2, or 3"); in main()
25 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
28 …PetscCheck(size == ranksx, PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONG, "Must run on %" PetscInt_FMT " r… in main()
29 …PetscCall(DMStagCreate1d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, mx, 1, 1, DMSTAG_STENCIL_BOX, 1, lx, … in main()
32 …PetscCheck(size == ranksx * ranksy, PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONG, "Must run on %" PetscIn… in main()
33 …PetscCall(DMStagCreate2d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, mx, my, ranksx, ran… in main()
36 …PetscCheck(size == ranksx * ranksy * ranksz, PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONG, "Must run on %… in main()
37 …PetscCall(DMStagCreate3d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, m… in main()
40 SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "No support for dimension %" PetscInt_FMT, dim); in main()
44 …PetscCall(DMStagCreate1d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, 2, 2, 3, DMSTAG_STENCIL_BOX, 1, NULL,… in main()
[all …]
H A Dex1.c26 …PetscCall(DMStagCreate1d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, 3, 1, 1, DMSTAG_STENCIL_BOX, 1, NULL,… in main()
29 …PetscCall(DMStagCreate2d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, 3, 2, PETSC_DECIDE,… in main()
32 …PetscCall(DMStagCreate3d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, 3… in main()
35 SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "No support for dimension %" PetscInt_FMT, dim); in main()
44 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
47 …PetscCheck(size == ranksx, PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONG, "Must run on %" PetscInt_FMT " r… in main()
48 …PetscCall(DMStagCreate1d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, mx, 1, 1, DMSTAG_STENCIL_BOX, 1, lx, … in main()
51 …PetscCheck(size == ranksx * ranksy, PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONG, "Must run on %" PetscIn… in main()
52 …PetscCall(DMStagCreate2d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, mx, my, ranksx, ran… in main()
55 …PetscCheck(size == ranksx * ranksy * ranksz, PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONG, "Must run on %… in main()
[all …]
/petsc/src/dm/impls/plex/tests/
H A Dex96.c25 PetscOptionsBegin(PETSC_COMM_WORLD, NULL, "PetscViewer_ExodusII test", "ex96"); in main()
34 PetscCall(DMPlexCreateFromFile(PETSC_COMM_WORLD, ifilename, NULL, PETSC_TRUE, &dm)); in main()
40 PetscCall(PetscViewerExodusIIOpen(PETSC_COMM_WORLD, ofilename, FILE_MODE_WRITE, &viewer)); in main()
55 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Number of zonal variables: %d\n", nZonalVar)); in main()
60 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Number of nodal variables: %d\n", nNodalVar)); in main()
66 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Testing PetscViewerExodusIISet[Nodal/Zonal]VariableNames\… in main()
75 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "\n\nReopenning the output file in Read-only mode\n")); in main()
76 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Testing PetscViewerExodusIIGet[Nodal/Zonal]VariableNames\… in main()
77 PetscCall(PetscViewerExodusIIOpen(PETSC_COMM_WORLD, ofilename, FILE_MODE_APPEND, &viewer)); in main()
83 …PetscCall(PetscPrintf(PETSC_COMM_WORLD, " Nodal variable %d: %s, index in file %d\n", i, varName… in main()
[all …]
/petsc/src/sys/tutorials/
H A Dex2.c24 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
25 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in main()
33 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Number of processors = %d, rank = %d\n", size, rank)); in main()
44 PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "[%d] Synchronized Hello World.\n", rank)); in main()
45 …PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "[%d] Synchronized Hello World - Part II.\n", … in main()
46 PetscCall(PetscSynchronizedFlush(PETSC_COMM_WORLD, PETSC_STDOUT)); in main()
50 PetscCallMPI(MPI_Barrier(PETSC_COMM_WORLD)); in main()
/petsc/src/mat/tests/
H A Dex177.c18 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank)); in main()
19 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size)); in main()
23 PetscCheck(flg, PETSC_COMM_WORLD, PETSC_ERR_USER, "Must indicate binary file with the -f option"); in main()
24 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, file, FILE_MODE_READ, &fd)); in main()
25 PetscCall(MatCreate(PETSC_COMM_WORLD, &A)); in main()
54 PetscCheck(!flg, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Error in Test 1: MatKAIJGetScaledIdentity()"); in main()
57 …PetscCheck(flg, PETSC_COMM_WORLD, PETSC_ERR_CONV_FAILED, "Error in Test 1: MatMult() for KAIJ matr… in main()
60 …PetscCheck(flg, PETSC_COMM_WORLD, PETSC_ERR_CONV_FAILED, "Error in Test 1: MatMultAdd() for KAIJ m… in main()
76 PetscCheck(!flg, PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Error in Test 2: MatKAIJGetScaledIdentity()"); in main()
79 …PetscCheck(flg, PETSC_COMM_WORLD, PETSC_ERR_CONV_FAILED, "Error in Test 2: MatMult() for KAIJ matr… in main()
[all …]
/petsc/src/dm/tutorials/
H A Dex19.c17 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "1D -- DM_BOUNDARY_NONE\n")); in main()
18 PetscCall(DMDACreate(PETSC_COMM_WORLD, &da)); in main()
33 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "1D -- DM_BOUNDARY_GHOSTED\n")); in main()
34 PetscCall(DMDACreate(PETSC_COMM_WORLD, &da)); in main()
49 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "1D -- DM_BOUNDARY_PERIODIC\n")); in main()
50 PetscCall(DMDACreate(PETSC_COMM_WORLD, &da)); in main()
65 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "2D -- DM_BOUNDARY_NONE\n")); in main()
66 PetscCall(DMDACreate(PETSC_COMM_WORLD, &da)); in main()
81 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "2D -- DM_BOUNDARY_GHOSTED\n")); in main()
82 PetscCall(DMDACreate(PETSC_COMM_WORLD, &da)); in main()
[all …]

12345678910>>...56