<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Hi,<div><br></div><div>I found the solution by investigating the code so I'll post it here in case it can be useful to someone else:</div><div><br></div><div>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.<br><br>Matthieu</div><div><br><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: </b>"Matthieu Dorier" <matthieu.dorier@irisa.fr><br><b>À: </b>discuss@mpich.org<br><b>Envoyé: </b>Lundi 24 Juin 2013 15:46:21<br><b>Objet: </b>[mpich-discuss] Problem with ADIOI_Info_get (MPI_Info_get) from the ADIO layer<br><br><style>p { margin: 0; }</style><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000"><font face="times new roman, new york, times, serif" size="3">Hi,</font><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">I'm implementing an ADIO backend and I'm having problems retrieving values from the MPI_Info attached to the file.</div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">On the application side, I have something like this:</div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div><div><font face="times new roman, new york, times, serif"> MPI_Info_create(&info);</font></div><div><font face="times new roman, new york, times, serif"> MPI_Info_set(info,"cb_buffer_size","64");</font></div><div><font face="times new roman, new york, times, serif"> MPI_Info_set(info,"xyz","3");</font></div><div><font face="times new roman, new york, times, serif"> MPI_File_open(comm, "file", </font></div><div><font face="times new roman, new york, times, serif"><span class="Apple-tab-span" style="white-space: pre;"> </span>MPI_MODE_WRONLY | MPI_MODE_CREATE, info, &fh);</font></div><div><font face="times new roman, new york, times, serif"><br></font></div><div><font face="times new roman, new york, times, serif">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:</font></div><div><font face="times new roman, new york, times, serif"><br></font></div><div><font face="times new roman, new york, times, serif"><div> int info_flag;</div><div> char* value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));</div><div> ADIOI_Info_get(fd->info, "xyz", MPI_MAX_INFO_VAL, value,&info_flag);</div><div> if(info_flag) fprintf(stderr,"xyz = %d\n",atoi(value));</div><div> ADIOI_Info_get(fd->info, "cb_buffer_size", MPI_MAX_INFO_VAL, value,&info_flag);</div><div> if(info_flag) fprintf(stderr,"cb_buffer_size = %d\n",atoi(value));</div><div><br></div><div>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.</div><div>Where does the problem come from?</div><div>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)...</div><div><br></div><div>Thanks</div></font></div><br><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><span></span><font size="2"><font size="3">Matthieu Dorier<br>
</font>PhD student at ENS Cachan Brittany and IRISA<br><a href="http://people.irisa.fr/Matthieu.Dorier" target="_blank">http://people.irisa.fr/Matthieu.Dorier</a></font><span></span><br></div></div></div><br>_______________________________________________<br>discuss mailing list discuss@mpich.org<br>To manage subscription options or unsubscribe:<br>https://lists.mpich.org/mailman/listinfo/discuss</blockquote><br></div></div></body></html>