<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I see. Thanks for the clarification.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The only issue I'm aware of that currently causes us to lose some log data is in the case of applications calling fork(). Maybe that or something similar is happening in the import of tensorflow, with the h5/numpy I/O then happening in the child process?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I can try to reproduce the issue to see if I can get a better idea of what's happening. We'd like to make sure tensorflow use cases work, but admittedly haven't really tested it.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
--Shane<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Devarajan, Hariharan <hdevarajan@anl.gov><br>
<b>Sent:</b> Wednesday, July 8, 2020 9:45 AM<br>
<b>To:</b> Snyder, Shane <ssnyder@mcs.anl.gov><br>
<b>Cc:</b> Jeffrey Layton <laytonjb@gmail.com>; darshan-users@lists.mcs.anl.gov <darshan-users@lists.mcs.anl.gov><br>
<b>Subject:</b> Re: [Darshan-users] Darshan not tracing with tensorflow import.</font>
<div> </div>
</div>
<div dir="auto">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.
<div><br>
</div>
<div>Hari<br>
<div dir="ltr"><br>
<blockquote type="cite">On Jul 8, 2020, at 9:41 AM, Snyder, Shane <ssnyder@mcs.anl.gov> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi <span style="color:#212121">Hariharan</span>,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thanks for letting us know about this issue.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Just to verify whether Darshan is even being properly initialized/shutdown, could you try setting the DARSHAN_INTERNAL_TIMING env variable (i.e., export
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
--Shane<br>
</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Darshan-users <darshan-users-bounces@lists.mcs.anl.gov> on behalf of Devarajan, Hariharan <hdevarajan@anl.gov><br>
<b>Sent:</b> Monday, July 6, 2020 9:56 AM<br>
<b>To:</b> Jeffrey Layton <laytonjb@gmail.com><br>
<b>Cc:</b> darshan-users@lists.mcs.anl.gov <darshan-users@lists.mcs.anl.gov><br>
<b>Subject:</b> Re: [Darshan-users] Darshan not tracing with tensorflow import.</font>
<div> </div>
</div>
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.x_x_MsoNormal, li.x_x_MsoNormal, div.x_x_MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
a:link, span.x_x_MsoHyperlink
{color:blue;
text-decoration:underline}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
-->
</style>
<div lang="EN-US">
<div class="x_x_WordSection1">
<p class="x_x_MsoNormal">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. </p>
<p class="x_x_MsoNormal"> </p>
<p class="x_x_MsoNormal">Hari</p>
<p class="x_x_MsoNormal"> </p>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_x_MsoNormal" style="border:none; padding:0in"><b>From: </b><a href="mailto:laytonjb@gmail.com">Jeffrey Layton</a><br>
<b>Sent: </b>Monday, July 6, 2020 9:41 AM<br>
<b>To: </b><a href="mailto:hdevarajan@anl.gov">Devarajan, Hariharan</a><br>
<b>Cc: </b><a href="mailto:darshan-users@lists.mcs.anl.gov">darshan-users@lists.mcs.anl.gov</a><br>
<b>Subject: </b>Re: [Darshan-users] Darshan not tracing with tensorflow import.</p>
</div>
<p class="x_x_MsoNormal"> </p>
<div>
<div>
<p class="x_x_MsoNormal">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</p>
</div>
<div>
<p class="x_x_MsoNormal"> </p>
</div>
<div>
<p class="x_x_MsoNormal">(BTW - it's possible to build TensorFlow so it doesn't use mmap() for reading files.)</p>
</div>
<div>
<p class="x_x_MsoNormal"> </p>
</div>
<div>
<p class="x_x_MsoNormal">Jeff</p>
</div>
<div>
<p class="x_x_MsoNormal"> </p>
</div>
<div>
<p class="x_x_MsoNormal"> </p>
</div>
<p class="x_x_MsoNormal"> </p>
<div>
<div>
<p class="x_x_MsoNormal">On Mon, Jul 6, 2020 at 1:08 PM Devarajan, Hariharan <<a href="mailto:hdevarajan@anl.gov">hdevarajan@anl.gov</a>> wrote:</p>
</div>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0in 0in 0in 6.0pt; margin-left:4.8pt; margin-right:0in">
<div>
<div>
<p class="x_x_MsoNormal" style=""> </p>
<p class="x_x_MsoNormal" style="background:white; background-attachment:scroll"><span style="color:#212121">Hello,</span></p>
<p class="x_x_MsoNormal" style="background:white; background-attachment:scroll"><span style="color:#212121"> </span></p>
<p class="x_x_MsoNormal" style="background:white; background-attachment:scroll"><span style="color:#212121">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.</span></p>
<p class="x_x_MsoNormal" style="background:white; background-attachment:scroll"><span style="color:#212121"> </span></p>
<p class="x_x_MsoNormal" style="background:white; background-attachment:scroll"><span style="color:#212121">Can you please assist on how I can further debug the problem?
</span></p>
<p class="x_x_MsoNormal" style="background:white; background-attachment:scroll"><span style="color:#212121"> </span></p>
<p class="x_x_MsoNormal" style="background:white; background-attachment:scroll"><span style="color:#212121">Regards</span></p>
<p class="x_x_MsoNormal" style="background:white; background-attachment:scroll"><span style="color:#212121">Hariharan</span></p>
<p class="x_x_MsoNormal" style=""> </p>
</div>
</div>
</blockquote>
</div>
</div>
<p class="x_x_MsoNormal" style="margin-left:4.8pt">_______________________________________________<br>
Darshan-users mailing list<br>
<a href="mailto:Darshan-users@lists.mcs.anl.gov" target="_blank">Darshan-users@lists.mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/darshan-users" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/darshan-users</a></p>
<p class="x_x_MsoNormal"> </p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>