<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<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"
type="cite">
<style type="text/css">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/">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"
type="cite">
<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 name="x"></span><font size="2"><font size="3">Matthieu
Dorier<br>
</font>PhD student at ENS Cachan Brittany and IRISA<br>
<a moz-do-not-send="true"
href="http://people.irisa.fr/Matthieu.Dorier">http://people.irisa.fr/Matthieu.Dorier</a></font><span
name="x"></span><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Darshan-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Darshan-users@lists.mcs.anl.gov">Darshan-users@lists.mcs.anl.gov</a>
<a class="moz-txt-link-freetext" href="https://lists.mcs.anl.gov/mailman/listinfo/darshan-users">https://lists.mcs.anl.gov/mailman/listinfo/darshan-users</a>
</pre>
</blockquote>
<br>
</body>
</html>