|
11 | 11 | * All rights reserved. |
12 | 12 | * Copyright (c) 2015-2017 Research Organization for Information Science |
13 | 13 | * and Technology (RIST). All rights reserved. |
14 | | - * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. |
| 14 | + * Copyright (c) 2016-2019 IBM Corporation. All rights reserved. |
15 | 15 | * $COPYRIGHT$ |
16 | 16 | * |
17 | 17 | * Additional copyrights may follow |
@@ -162,51 +162,32 @@ mca_io_romio321_file_get_amode (ompi_file_t *fh, |
162 | 162 |
|
163 | 163 | int |
164 | 164 | mca_io_romio321_file_set_info (ompi_file_t *fh, |
165 | | - opal_info_t *info) |
| 165 | + ompi_info_t *info) |
166 | 166 | { |
167 | 167 | int ret; |
168 | 168 | mca_io_romio321_data_t *data; |
169 | 169 |
|
170 | | -// An opal_info_t isn't a full ompi_info_t. so if we're using an MPI call |
171 | | -// below with an MPI_Info, we need to create an equivalent MPI_Info. This |
172 | | -// isn't ideal but it only happens a few places. |
173 | | - ompi_info_t *ompi_info; |
174 | | - ompi_info = OBJ_NEW(ompi_info_t); |
175 | | - if (!ompi_info) { return(MPI_ERR_NO_MEM); } |
176 | | - opal_info_t *opal_info = &(ompi_info->super); |
177 | | - opal_info_dup (info, &opal_info); |
178 | | - |
179 | 170 | data = (mca_io_romio321_data_t *) fh->f_io_selected_data; |
180 | 171 | OPAL_THREAD_LOCK (&mca_io_romio321_mutex); |
181 | | - ret = ROMIO_PREFIX(MPI_File_set_info) (data->romio_fh, ompi_info); |
| 172 | + ret = ROMIO_PREFIX(MPI_File_set_info) (data->romio_fh, info); |
182 | 173 | OPAL_THREAD_UNLOCK (&mca_io_romio321_mutex); |
183 | 174 |
|
184 | | - ompi_info_free(&ompi_info); |
185 | 175 | return ret; |
186 | 176 | } |
187 | 177 |
|
188 | 178 |
|
189 | 179 | int |
190 | 180 | mca_io_romio321_file_get_info (ompi_file_t *fh, |
191 | | - opal_info_t ** info_used) |
| 181 | + ompi_info_t ** info_used) |
192 | 182 | { |
193 | 183 | int ret; |
194 | 184 | mca_io_romio321_data_t *data; |
195 | 185 |
|
196 | | -// An opal_info_t isn't a full ompi_info_t. so if we're using an MPI call |
197 | | -// below with an MPI_Info, we need to create an equivalent MPI_Info. This |
198 | | -// isn't ideal but it only happens a few places. |
199 | | - ompi_info_t *ompi_info; |
200 | | - ompi_info = OBJ_NEW(ompi_info_t); |
201 | | - if (!ompi_info) { return(MPI_ERR_NO_MEM); } |
202 | | - |
203 | 186 | data = (mca_io_romio321_data_t *) fh->f_io_selected_data; |
204 | 187 | OPAL_THREAD_LOCK (&mca_io_romio321_mutex); |
205 | | - ret = ROMIO_PREFIX(MPI_File_get_info) (data->romio_fh, &ompi_info); |
| 188 | + ret = ROMIO_PREFIX(MPI_File_get_info) (data->romio_fh, info_used); |
206 | 189 | OPAL_THREAD_UNLOCK (&mca_io_romio321_mutex); |
207 | 190 |
|
208 | | - opal_info_dup (&(ompi_info->super), info_used); |
209 | | - ompi_info_free(&ompi_info); |
210 | 191 | return ret; |
211 | 192 | } |
212 | 193 |
|
|
0 commit comments