[mpich-discuss] Problem with ADIOI_Info_get (MPI_Info_get) from the ADIO layer

Rob Latham robl at mcs.anl.gov
Wed Jun 26 10:21:36 CDT 2013


On Tue, Jun 25, 2013 at 05:10:48PM +0200, Matthieu Dorier wrote:
> 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. 

Yeah, consider the way ad_pvfs2 deals with this:
the function pointers in ad_pvfs2.c  point to ADIOI_PVFS2_SetInfo

In src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_hints.c ,  all the
PVFS2-specific hints are processed, then it calls ADIOI_GEN_SetInfo

(Now that I look at this, maybe the order should be reversed)

==rob

> Matthieu 
> 
> ----- Mail original -----
> 
> > De: "Matthieu Dorier" <matthieu.dorier at irisa.fr>
> > À: discuss at 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 at mpich.org
> > To manage subscription options or unsubscribe:
> > https://lists.mpich.org/mailman/listinfo/discuss

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


-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA



More information about the discuss mailing list