<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">Hi Matthieu,<br>
<br>
On 04/13/2013 05:34 AM, Matthieu Dorier wrote:<br>
</div>
<blockquote
cite="mid:1060709987.21694191.1365845685087.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">Hi,
<div><br>
</div>
<div>I'd like to use the C API of Darshan, yet the only mention
of this API is at the end of the darshan-util documentation
(<a class="moz-txt-link-freetext" href="http://www.mcs.anl.gov/research/projects/darshan/docs/darshan-util.html">http://www.mcs.anl.gov/research/projects/darshan/docs/darshan-util.html</a>),
advising to take a look at darshan-logutils.h and I don't find
anywhere the explanation on how to use these functions.</div>
</div>
</blockquote>
<br>
That's a good point. I just opened up a trac ticket. I think we
can add some doxygen comments and use them to generate documentation
with the releases.<br>
<br>
<blockquote
cite="mid:1060709987.21694191.1365845685087.JavaMail.root@irisa.fr"
type="cite">
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt; color: #000000">
<div>I can guess how most of them work, but there are at least
two that I don't understand: darshan_log_getmounts and
darshan_log_setmounts. Could you give an example for them?</div>
</div>
</blockquote>
<br>
The darshan-convert tool is probably the only example using both.
getmounts() allocates and fills in three arrays to hold the device
ids, mount points, and type of each mounted file system. It is up
to the caller to free each of those. The mount points and types are
actually arrays of strings and you have to free the strings as
well. The count is an output argument telling you the size of the
arrays, or how many mounted file systems were recorded in the log
file.<br>
<br>
The putmounts() is the same thing in reverse, it writes the same
information in the same format to a log file. It is only useful if
you are trying to generate a new log file.<br>
<br>
Some of the logutils functions also have a limitation in that they
cannot necessarily be called in an arbitrary order. The putmounts()
call is a good example- you have to write a log file in order (job
information, exe information, mount information, etc.).<br>
<br>
<blockquote
cite="mid:1060709987.21694191.1365845685087.JavaMail.root@irisa.fr"
type="cite">
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt; color: #000000">
<div><br>
</div>
<div>Also a remark for later versions of Darshan (here I'm using
2.2.5): building a libdarshan-util.a library and installing
it, along with the necessary include files, in the --prefix
directory provided at configure time, would ease the use of
this C API. I have myself modified the Makefile.in in
darshan-util to have this done, I can share these
modifications if you wish.<br>
</div>
</div>
</blockquote>
<br>
That would be great if you don't mind!<br>
<br>
-Phil<br>
<br>
<blockquote
cite="mid:1060709987.21694191.1365845685087.JavaMail.root@irisa.fr"
type="cite">
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt; color: #000000">
<div><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>