Hi,

I found the solution by investigating the code so I'll post it here in case it can be useful to someone else:

When opening a file, ADIOI_xxx_SetInfo is called to copy the info structure. Unless overwritten by the ADIO backend, it's ADIO_GEN_SetInfo (in src/mpi/romio/adio/common/ad_hints.c) that ends up being called and this function only copies the hints that it knows (e.g. cb_buffer_size). So the solution consists in changing ADIO_GEN_SetInfo or (more appropriately) provide an implementation of ADIOI_xxx_SetInfo that copies custom parameters and the called ADIO_GEN_SetInfo.

Matthieu


De: "Matthieu Dorier" <matthieu.dorier@irisa.fr>
À: discuss@mpich.org
Envoyé: Lundi 24 Juin 2013 15:46:21
Objet: [mpich-discuss] Problem with ADIOI_Info_get (MPI_Info_get) from the        ADIO layer

Hi,

I'm implementing an ADIO backend and I'm having problems retrieving values from the MPI_Info attached to the file.
On the application side, I have something like this:

    MPI_Info_create(&info);
    MPI_Info_set(info,"cb_buffer_size","64");
    MPI_Info_set(info,"xyz","3");
    MPI_File_open(comm, "file", 
MPI_MODE_WRONLY | MPI_MODE_CREATE, info, &fh);

then a call to a MPI_File_write, which ends up calling my implementation of ADIOI_xxx_WriteContig. In this function, I try to read back these info:

    int info_flag;
    char* value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
    ADIOI_Info_get(fd->info, "xyz", MPI_MAX_INFO_VAL, value,&info_flag);
    if(info_flag) fprintf(stderr,"xyz = %d\n",atoi(value));
    ADIOI_Info_get(fd->info, "cb_buffer_size", MPI_MAX_INFO_VAL, value,&info_flag);
    if(info_flag) fprintf(stderr,"cb_buffer_size = %d\n",atoi(value));

I can get the 64 associated to the cb_buffer_size key (which is a reserved hint), but I don't get the second value.
Where does the problem come from?
I tried everything: re-ordering the calls, changing the name of the key, calling MPI_Info_get in the application to check that the values are properly set (they are)...

Thanks

Matthieu Dorier
PhD student at ENS Cachan Brittany and IRISA
http://people.irisa.fr/Matthieu.Dorier


_______________________________________________
discuss mailing list     discuss@mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss