[Darshan-users] Problem with darshan_log_getmounts and darshan_log_getexe

Matthieu Dorier matthieu.dorier at irisa.fr
Sun Apr 14 15:03:20 CDT 2013


I couldn't wait for tomorrow and I checked now, it works by re-ordering the calls. 
Thanks again! 

Matthieu 

----- Mail original -----

> De: "Matthieu Dorier" <matthieu.dorier at irisa.fr>
> À: "Phil Carns" <carns at mcs.anl.gov>
> Cc: darshan-users at lists.mcs.anl.gov
> Envoyé: Dimanche 14 Avril 2013 21:33:17
> Objet: Re: [Darshan-users] Problem with darshan_log_getmounts and
> darshan_log_getexe

> Hi Phil,

> Thanks for your answer to this and my other messages.
> 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.

> Thanks again,

> Matthieu

> ----- Mail original -----

> > De: "Phil Carns" <carns at mcs.anl.gov>
> 
> > À: darshan-users at lists.mcs.anl.gov
> 
> > Envoyé: Dimanche 14 Avril 2013 14:25:58
> 
> > Objet: Re: [Darshan-users] Problem with darshan_log_getmounts and
> > darshan_log_getexe
> 

> > On 04/13/2013 07:15 PM, Matthieu Dorier wrote:
> 

> > > Hi,
> > 
> 

> > > I'm using the C API of Darshan and I have some problems with the
> > > two
> > > functions mentioned in the title of this mail.
> > 
> 
> > > I'm testing them using 10024744407537054797.bz2 (in
> > > http://ftp.mcs.anl.gov/pub/darshan/data/intrepid/2012/9/1/ ).
> > 
> 
> > > 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.
> > 
> 
> > > The "exe" field is supposed to contain "3979759305", but when
> > > calling
> > > darshan_log_getexe I get the string "2.02".
> > 
> 
> > > These functions do not return any error code.
> > 
> 

> > > All other functions are working properly. I'm using version 2.2.5
> > > of
> > > Darshan.
> > 
> 

> > > Just to check, here is how I use these functions:
> > 
> 

> > > int64_t** devs;
> > 
> 
> > > char*** mnt_pts;
> > 
> 
> > > char*** fs_types;
> > 
> 
> > > int count;
> > 
> 
> > > int err = darshan_log_getmounts(fd,devs,mnt_pts,fs_types,&count);
> > 
> 
> > > // here c = 0
> > 
> 
> > > free(devs); free(mnt_pts); free(fs_types);
> > 
> 

> > > char buffer[CP_EXE_LEN+2];
> > 
> 
> > > darshan_log_getexe(fd, buffer);
> > 
> 

> > > Is there a bug somewhere or am I misusing these functions?
> > 
> 
> > > Thanks!
> > 
> 
> > Hi Matthieu,
> 

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

> > int64_t* devs;
> 
> > char** mnt_pts;
> 
> > char** fs_types;
> 
> > int count;
> 
> > int err =
> > darshan_log_getmounts(fd,&devs,&mnt_pts,&fs_types,&count);
> 
> > 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.
> 

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

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

> > thanks,
> 
> > -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
> > 
> 
> > _______________________________________________
> 
> > Darshan-users mailing list
> 
> > Darshan-users at lists.mcs.anl.gov
> 
> > https://lists.mcs.anl.gov/mailman/listinfo/darshan-users
> 

> _______________________________________________
> 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/ba3c2a3c/attachment-0001.html>


More information about the Darshan-users mailing list