This source file includes following definitions.
- ADIOI_PVFS2_SetInfo
1
2
3
4
5
6
7
8 #include <stdlib.h>
9 #include "ad_pvfs2.h"
10
11 #include "hint_fns.h"
12
13 void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
14 {
15 char *value;
16 int flag, tmp_value;
17 static char myname[] = "ADIOI_PVFS_SETINFO";
18
19 if ((fd->info) == MPI_INFO_NULL) {
20
21 MPI_Info_create(&(fd->info));
22 ADIOI_Info_set(fd->info, "romio_pvfs2_debugmask", "0");
23 fd->hints->fs_hints.pvfs2.debugmask = 0;
24
25 ADIOI_Info_set(fd->info, "striping_factor", "0");
26 fd->hints->striping_factor = 0;
27
28 ADIOI_Info_set(fd->info, "striping_unit", "0");
29 fd->hints->striping_unit = 0;
30
31
32 ADIOI_Info_set(fd->info, "romio_pvfs2_posix_read", "disable");
33 ADIOI_Info_set(fd->info, "romio_pvfs2_posix_write", "disable");
34 fd->hints->fs_hints.pvfs2.posix_read = ADIOI_HINT_DISABLE;
35 fd->hints->fs_hints.pvfs2.posix_write = ADIOI_HINT_DISABLE;
36
37 ADIOI_Info_set(fd->info, "romio_pvfs2_dtype_read", "disable");
38 ADIOI_Info_set(fd->info, "romio_pvfs2_dtype_write", "disable");
39 fd->hints->fs_hints.pvfs2.dtype_read = ADIOI_HINT_DISABLE;
40 fd->hints->fs_hints.pvfs2.dtype_write = ADIOI_HINT_DISABLE;
41
42 ADIOI_Info_set(fd->info, "romio_pvfs2_listio_read", "disable");
43 ADIOI_Info_set(fd->info, "romio_pvfs2_listio_write", "disable");
44 fd->hints->fs_hints.pvfs2.listio_read = ADIOI_HINT_DISABLE;
45 fd->hints->fs_hints.pvfs2.listio_write = ADIOI_HINT_DISABLE;
46
47
48
49 if (users_info != MPI_INFO_NULL) {
50 value = (char *) ADIOI_Malloc( (MPI_MAX_INFO_VAL+1)*sizeof(char));
51
52 ADIOI_Info_get(users_info, "romio_pvfs2_debugmask",
53 MPI_MAX_INFO_VAL, value, &flag);
54 if (flag) {
55 tmp_value = fd->hints->fs_hints.pvfs2.debugmask =
56 PVFS_debug_eventlog_to_mask(value);
57
58 MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm);
59
60 if (tmp_value != fd->hints->fs_hints.pvfs2.debugmask) {
61 MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
62 "romio_pvfs2_debugmask",
63 error_code);
64 return;
65 }
66
67
68 ADIOI_Info_set(fd->info, "romio_pvfs2_debugmask", value);
69 }
70
71
72 ADIOI_Info_check_and_install_int(fd, users_info, "striping_factor",
73 &(fd->hints->striping_factor), myname, error_code);
74
75
76
77 ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit",
78 &(fd->hints->striping_unit), myname, error_code);
79
80
81 ADIOI_Info_get(users_info, "romio_pvfs2_distribution_name",
82 MPI_MAX_INFO_VAL, value, &flag);
83 if (flag) {
84 }
85
86
87 ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_posix_read",
88 &(fd->hints->fs_hints.pvfs2.posix_read), myname, error_code);
89
90
91 ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_posix_write",
92 &(fd->hints->fs_hints.pvfs2.posix_write), myname, error_code);
93
94
95 ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_dtype_read",
96 &(fd->hints->fs_hints.pvfs2.dtype_read), myname, error_code);
97
98
99 ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_dtype_write",
100 &(fd->hints->fs_hints.pvfs2.dtype_write), myname, error_code);
101
102
103 ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_listio_read",
104 &(fd->hints->fs_hints.pvfs2.listio_read), myname, error_code);
105
106
107 ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_listio_write",
108 &(fd->hints->fs_hints.pvfs2.listio_write), myname, error_code);
109 ADIOI_Free(value);
110 }
111 }
112
113 ADIOI_GEN_SetInfo(fd, users_info, error_code);
114
115 *error_code = MPI_SUCCESS;
116 }
117
118
119
120