[Darshan-users] Darshan not tracing with tensorflow import.

Devarajan, Hariharan hdevarajan at anl.gov
Wed Jul 8 09:45:45 CDT 2020

It produces logs but it stops tracing h5py and np.load calls. If u run the working version, u will notice we get traces from both files but when u add import of tensorflow, this stops. I have verified that darshan is initializing as we get logs just not giving tracing for those two files in the code.


On Jul 8, 2020, at 9:41 AM, Snyder, Shane <ssnyder at mcs.anl.gov> wrote:

Hi Hariharan,

Thanks for letting us know about this issue.

I can't really think of any reason why the import of tensorflow module would result in Darshan no longer producing log files. Just to make sure I'm fully understanding, you aren't getting any logfiles at all in the case where tensorflow is imported? I ask because when using this non-MPI instrumentation, I've noticed it tends to create a lot of log files, particularly for Python modules that like to call subprocesses for using things like ls, sed, etc. I just want to make sure it's not an issue of you missing one particular log file of interest or whether you don't get any log files at all.

At any rate, the environment setup looks correct in both cases to preload the Darshan library and to enable the non-MPI instrumentation support. So, that doesn't appear to be the issue.

Just to verify whether Darshan is even being properly initialized/shutdown, could you try setting the DARSHAN_INTERNAL_TIMING env variable (i.e., export
DARSHAN_INTERNAL_TIMING=1) before running? That should spit out some more verbose output about how long it takes Darshan to init/finalize. If you do see some additional output indicating Darshan is at least initializing, you might want to double check that there are no errors in your output logs that indicate some issue Darshan encountered.

From: Darshan-users <darshan-users-bounces at lists.mcs.anl.gov> on behalf of Devarajan, Hariharan <hdevarajan at anl.gov>
Sent: Monday, July 6, 2020 9:56 AM
To: Jeffrey Layton <laytonjb at gmail.com>
Cc: darshan-users at lists.mcs.anl.gov <darshan-users at lists.mcs.anl.gov>
Subject: Re: [Darshan-users] Darshan not tracing with tensorflow import.

The I/O is not through tensorflow. Its through h5py and numpy.load and I verified both without tensorflow import are getting traced. I already verified that import of tensorflow doesn’t change any environment variables.


From: Jeffrey Layton<mailto:laytonjb at gmail.com>
Sent: Monday, July 6, 2020 9:41 AM
To: Devarajan, Hariharan<mailto:hdevarajan at anl.gov>
Cc: darshan-users at lists.mcs.anl.gov<mailto:darshan-users at lists.mcs.anl.gov>
Subject: Re: [Darshan-users] Darshan not tracing with tensorflow import.

About 2 months ago, I tried using Darshan to trace a TensorFlow2 DL training. I could not trace the input. What I _think_ happens is the TF2 uses mmap() for reading the input files and I don't think Darshan can capture that file IO. But I'm not a Darshan expert so perhaps someone has tried this before and can help

(BTW - it's possible to build TensorFlow so it doesn't use mmap() for reading files.)


On Mon, Jul 6, 2020 at 1:08 PM Devarajan, Hariharan <hdevarajan at anl.gov<mailto:hdevarajan at anl.gov>> wrote:


I was able to run my test program with 3.2.1 darshan. However, when i trace an app which load tensorflow it seems darshan doesn't produce trace. I am attaching two tars one with working example and one without. The only difference between the two is in test.py where i import tensorflow on first line.

Can you please assist on how I can further debug the problem?



Darshan-users mailing list
Darshan-users at lists.mcs.anl.gov<mailto:Darshan-users at lists.mcs.anl.gov>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-users/attachments/20200708/95a0f5d7/attachment-0001.html>

More information about the Darshan-users mailing list