1 /*
2 * Copyright (C) by Argonne National Laboratory
3 * See COPYRIGHT in top-level directory
4 */
5
6 #include "mpi.h"
7 #include <stdio.h>
8 #include "mpitest.h"
9 #include "win_sync.h"
10
main(int argc,char * argv[])11 int main(int argc, char *argv[])
12 {
13 int rank;
14 int errors = 0, errs = 0;
15 int buf = 0;
16 MPI_Win win;
17
18 MTest_Init(&argc, &argv);
19 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
20
21 MPI_Win_create(&buf, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
22
23 MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN);
24
25 /* This should fail because the window is not locked. */
26 CHECK_ERR(MPI_Win_unlock(0, win));
27
28 MPI_Win_free(&win);
29
30 MTest_Finalize(errors);
31
32 return MTestReturnValue(errs);
33 }
34