<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'><span style="font-size: 12pt;">I couldn't wait for tomorrow and I checked now, it works by re-ordering the calls.</span><div>Thanks again!</div><div><br></div><div>Matthieu<br><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>"Phil Carns" <carns@mcs.anl.gov><br><b>Cc: </b>darshan-users@lists.mcs.anl.gov<br><b>Envoyé: </b>Dimanche 14 Avril 2013 21:33:17<br><b>Objet: </b>Re: [Darshan-users] Problem with darshan_log_getmounts and darshan_log_getexe<br><br><style>p { margin: 0; }</style><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000">Hi Phil,<div><br></div><div>Thanks for your answer to this and my other messages.</div><div>If the order of function calls matters, then it probably makes sense that I don't get the right data. I'll check that tomorrow.</div><div><br></div><div>Thanks again,</div><div><br></div><div>Matthieu<br><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>"Phil Carns" <carns@mcs.anl.gov><br><b>À: </b>darshan-users@lists.mcs.anl.gov<br><b>Envoyé: </b>Dimanche 14 Avril 2013 14:25:58<br><b>Objet: </b>Re: [Darshan-users] Problem with darshan_log_getmounts and darshan_log_getexe<br><br>
<div class="moz-cite-prefix">On 04/13/2013 07:15 PM, Matthieu Dorier
wrote:<br>
</div>
<blockquote cite="mid:979537724.21858123.1365894927794.JavaMail.root@irisa.fr">
<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 using the C
API of Darshan and I have some problems with the two functions
mentioned in the title of this mail.</div>
<div style="color: rgb(0, 0, 0); font-family: 'times new roman',
'new york', times, serif; font-size: 12pt;">I'm testing them
using 10024744407537054797.bz2
(in <a class="moz-txt-link-freetext" href="http://ftp.mcs.anl.gov/pub/darshan/data/intrepid/2012/9/1/" target="_blank">http://ftp.mcs.anl.gov/pub/darshan/data/intrepid/2012/9/1/</a>).</div>
<div style="color: rgb(0, 0, 0); font-family: 'times new roman',
'new york', times, serif; font-size: 12pt;">This trace is
supposed to show 4 mount points, which I see when using the
darshan-parse command line tool, yet darshan_log_getmounts
gives me 0 mount points.</div>
<div style="color: rgb(0, 0, 0); font-family: 'times new roman',
'new york', times, serif; font-size: 12pt;">The "exe" field is
supposed to contain "3979759305", but when
calling darshan_log_getexe I get the string "2.02".</div>
<div style="color: rgb(0, 0, 0); font-family: 'times new roman',
'new york', times, serif; font-size: 12pt;">These functions do
not return any error code.</div>
<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;">All other
functions are working properly. I'm using version 2.2.5 of
Darshan.</div>
<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;">Just to check,
here is how I use these functions:</div>
<div style="color: rgb(0, 0, 0); font-family: 'times new roman',
'new york', times, serif; font-size: 12pt;"><br>
</div>
<div><font face="times new roman, new york, times, serif">int64_t**
devs;</font></div>
<div><font face="times new roman, new york, times, serif">char***
mnt_pts;</font></div>
<div><font face="times new roman, new york, times, serif">char***
fs_types;</font></div>
<div><font face="times new roman, new york, times, serif">int
count;</font></div>
<div><font face="times new roman, new york, times, serif">int
err =
darshan_log_getmounts(fd,devs,mnt_pts,fs_types,&count);</font></div>
<div><font face="times new roman, new york, times, serif">//
here c = 0</font></div>
<div><font face="times new roman, new york, times, serif">free(devs);
free(mnt_pts); free(fs_types);</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">char
buffer[CP_EXE_LEN+2];</font></div>
<div><font face="times new roman, new york, times, serif">darshan_log_getexe(fd,
buffer);</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">Is
there a bug somewhere or am I misusing these functions?</font></div>
<div><font face="times new roman, new york, times, serif">Thanks!</font></div>
</div>
</blockquote>
<br>
Hi Matthieu,<br>
<br>
You'll need to make a slight change to the arguments to getmounts to
pass in references to the pointers to be filled in, I think:<br>
<br>
<div><font face="times new roman, new york, times, serif">int64_t*
devs;</font></div>
<div><font face="times new roman, new york, times, serif">char**
mnt_pts;</font></div>
<div><font face="times new roman, new york, times, serif">char**
fs_types;</font></div>
<div><font face="times new roman, new york, times, serif">int count;</font></div>
<div><font face="times new roman, new york, times, serif">int err =
darshan_log_getmounts(fd,&devs,&mnt_pts,&fs_types,&count);</font></div>
<br>
<font face="times new roman, new york, times, serif">If that doesn't
work, its also possible that the calls to getexe() and getmounts()
may need to be in the opposite order, but I'll need to
double-check on Monday. From glancing at the code it looks like
either way should be fine.</font><br>
<br>
One other minor detail is that technically when free'ing mnt_pts and
fs_types you need to loop from i=0 to i=count-1 and free mnt_pts[i]
and fs_types[i] as well, though.<br>
<br>
As you can see this API has not been used much beyond our own
internal tools so far, so isn't as polished as it probably should be
:)<br>
<br>
thanks,<br>
-Phil<br>
<br>
<blockquote cite="mid:979537724.21858123.1365894927794.JavaMail.root@irisa.fr">
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt; color: #000000">
<div style="color: rgb(0, 0, 0); font-family: 'times new roman',
'new york', times, serif; font-size: 12pt;"><br>
<div><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>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Darshan-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Darshan-users@lists.mcs.anl.gov" target="_blank">Darshan-users@lists.mcs.anl.gov</a>
<a class="moz-txt-link-freetext" href="https://lists.mcs.anl.gov/mailman/listinfo/darshan-users" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/darshan-users</a>
</pre>
</blockquote>
<br>
<br>_______________________________________________<br>Darshan-users mailing list<br>Darshan-users@lists.mcs.anl.gov<br>https://lists.mcs.anl.gov/mailman/listinfo/darshan-users<br></blockquote><br></div></div><br>_______________________________________________<br>Darshan-users mailing list<br>Darshan-users@lists.mcs.anl.gov<br>https://lists.mcs.anl.gov/mailman/listinfo/darshan-users<br></blockquote><br></div></div></body></html>