| 1 |
/* |
| 2 |
* Copyright (C) by Argonne National Laboratory |
| 3 |
* See COPYRIGHT in top-level directory |
| 4 |
*/ |
| 5 |
|
| 6 |
#include "ad_daos.h" |
| 7 |
|
| 8 |
#include "hint_fns.h" |
| 9 |
|
| 10 |
void ADIOI_DAOS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) |
| 11 |
{ |
| 12 |
static char myname[] = "ADIOI_DAOS_SETINFO"; |
| 13 |
|
| 14 |
if ((fd->info) == MPI_INFO_NULL) { |
| 15 |
/* part of the open call */ |
| 16 |
MPI_Info_create(&(fd->info)); |
| 17 |
|
| 18 |
ADIOI_Info_set(fd->info, "romio_daos_chunk_size", "0"); |
| 19 |
fd->hints->fs_hints.daos.chunk_size = 0; |
| 20 |
|
| 21 |
ADIOI_Info_set(fd->info, "romio_daos_obj_class", "OC_UNKNOWN"); |
| 22 |
fd->hints->fs_hints.daos.obj_class = OC_UNKNOWN; |
| 23 |
|
| 24 |
if (users_info != MPI_INFO_NULL) { |
| 25 |
char *oclass = NULL; |
| 26 |
|
| 27 |
/* Chunk size in each dkey */ |
| 28 |
ADIOI_Info_check_and_install_int(fd, users_info, "romio_daos_chunk_size", |
| 29 |
&(fd->hints->fs_hints.daos.chunk_size), myname, |
| 30 |
error_code); |
| 31 |
|
| 32 |
/* object class for each file */ |
| 33 |
ADIOI_Info_check_and_install_str(fd, users_info, "romio_daos_obj_class", |
| 34 |
&oclass, myname, error_code); |
| 35 |
|
| 36 |
if (oclass) { |
| 37 |
fd->hints->fs_hints.daos.obj_class = daos_oclass_name2id(oclass); |
| 38 |
ADIOI_Free(oclass); |
| 39 |
} |
| 40 |
} |
| 41 |
} |
| 42 |
|
| 43 |
/* set the values for collective I/O and data sieving parameters */ |
| 44 |
ADIOI_GEN_SetInfo(fd, users_info, error_code); |
| 45 |
|
| 46 |
*error_code = MPI_SUCCESS; |
| 47 |
} |