[Darshan-users] documentation for darshan-logutils

Phil Carns carns at mcs.anl.gov
Sun Apr 14 07:09:04 CDT 2013


Hi Matthieu,

On 04/13/2013 05:34 AM, Matthieu Dorier wrote:
> Hi,
>
> 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 
> (http://www.mcs.anl.gov/research/projects/darshan/docs/darshan-util.html), 
> advising to take a look at darshan-logutils.h and I don't find 
> anywhere the explanation on how to use these functions.

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.

> 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?

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.

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.

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.).

>
> 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.

That would be great if you don't mind!

-Phil

>
> Matthieu Dorier
> PhD student at ENS Cachan Brittany and IRISA
> http://people.irisa.fr/Matthieu.Dorier
>
>
> _______________________________________________
> Darshan-users mailing list
> Darshan-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/darshan-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-users/attachments/20130414/16d385b8/attachment.html>


More information about the Darshan-users mailing list