main
test-branch
| Line | |
|---|
| 1 | #include <mpi.h>
|
|---|
| 2 | #include <civl-mpi.cvh>
|
|---|
| 3 |
|
|---|
| 4 | int main() {
|
|---|
| 5 | MPI_Init(NULL, NULL);
|
|---|
| 6 |
|
|---|
| 7 | MPI_Datatype datatype;
|
|---|
| 8 | void * buf = NULL;
|
|---|
| 9 | double * dbuf;
|
|---|
| 10 |
|
|---|
| 11 | $havoc(&datatype);
|
|---|
| 12 | $assume(datatype == MPI_DOUBLE || datatype == MPI_INT || datatype == MPI_CHAR || datatype == MPI_2INT);
|
|---|
| 13 | buf = $mpi_valid(2, datatype);
|
|---|
| 14 | if (datatype == MPI_DOUBLE) {
|
|---|
| 15 | dbuf = (double *)buf;
|
|---|
| 16 | dbuf[0] = 2.0;
|
|---|
| 17 | $assert(dbuf[0] > 0);
|
|---|
| 18 | }
|
|---|
| 19 | $free(buf);
|
|---|
| 20 | MPI_Finalize();
|
|---|
| 21 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.