+
+ /* Test#4: setting info key "no_lock" to true and getting the key */
+
+ MPI_Info_create(&info_in);
+ MPI_Info_set(info_in, (char *)"no_locks", (char *)"true");
+
+ MPI_Win_set_info(win, info_in);
+ MPI_Win_get_info(win, &info_out);
+
+ MPI_Info_get(info_out, (char *)"no_locks", MPI_MAX_INFO_VAL, buf, &flag);
+ if (!flag || strncmp(buf, "true", strlen("true")) != 0) {
+ if (!flag)
+ printf("%d: no_locks is not defined\n", rank);
+ else
+ printf("%d: no_locks = %s, expected true\n", rank, buf);
+ errors++;
+ }
+ if (flag && VERBOSE)
+ printf("%d: no_locks = %s\n", rank, buf);
+
+ MPI_Info_free(&info_in);
+ MPI_Info_free(&info_out);
+
+ /* Test#4: getting other info keys */
+
+ MPI_Win_get_info(win, &info_out);
+
+ MPI_Info_get(info_out, (char *)"accumulate_ordering", MPI_MAX_INFO_VAL, buf, &flag);
+ if (flag && VERBOSE)
+ printf("%d: accumulate_ordering = %s\n", rank, buf);
+
+ MPI_Info_get(info_out, (char *)"accumulate_ops", MPI_MAX_INFO_VAL, buf, &flag);
+ if (flag && VERBOSE)
+ printf("%d: accumulate_ops = %s\n", rank, buf);
+
+ MPI_Info_get(info_out, (char *)"same_size", MPI_MAX_INFO_VAL, buf, &flag);
+ if (flag && VERBOSE)
+ printf("%d: same_size = %s\n", rank, buf);
+
+ MPI_Info_get(info_out, (char *)"alloc_shm", MPI_MAX_INFO_VAL, buf, &flag);
+ if (flag && VERBOSE)
+ printf("%d: alloc_shm = %s\n", rank, buf);
+
+ MPI_Info_free(&info_out);