[Darshan-commits] [Git][darshan/darshan][master] bug fix in filtering out dxt traces

Shane Snyder xgitlab at cels.anl.gov
Wed Sep 25 12:56:55 CDT 2019



Shane Snyder pushed to branch master at darshan / darshan


Commits:
1383589c by Shane Snyder at 2019-09-25T17:56:07Z
bug fix in filtering out dxt traces

- - - - -


1 changed file:

- darshan-runtime/lib/darshan-dxt.c


Changes:

=====================================
darshan-runtime/lib/darshan-dxt.c
=====================================
@@ -673,27 +673,32 @@ static void dxt_posix_filter_dynamic_traces_iterator(void *rec_ref_p, void *user
     /* drop the record if no dynamic trace triggers occurred */
     if(!should_keep)
     {
-        printf("DROP RECORD %lu on rank %d\n", psx_file->base_rec.id, dxt_my_rank);
-        /* first check the MPI-IO traces to see if we should drop there */
-        mpiio_rec_ref = darshan_delete_record_ref(&dxt_mpiio_runtime->rec_id_hash,
-            &psx_file->base_rec.id, sizeof(darshan_record_id));
-        if(mpiio_rec_ref)
+        if(dxt_mpiio_runtime && dxt_mpiio_runtime->rec_id_hash)
         {
-            free(mpiio_rec_ref->write_traces);
-            free(mpiio_rec_ref->read_traces);
-            free(mpiio_rec_ref->file_rec);
-            free(mpiio_rec_ref);
+            /* first check the MPI-IO traces to see if we should drop there */
+            mpiio_rec_ref = darshan_delete_record_ref(&dxt_mpiio_runtime->rec_id_hash,
+                &psx_file->base_rec.id, sizeof(darshan_record_id));
+            if(mpiio_rec_ref)
+            {
+                free(mpiio_rec_ref->write_traces);
+                free(mpiio_rec_ref->read_traces);
+                free(mpiio_rec_ref->file_rec);
+                free(mpiio_rec_ref);
+            }
         }
 
-        /* then delete the POSIX trace records */
-        psx_rec_ref = darshan_delete_record_ref(&dxt_posix_runtime->rec_id_hash,
-            &psx_file->base_rec.id, sizeof(darshan_record_id));
-        if(psx_rec_ref)
+        if(dxt_posix_runtime && dxt_posix_runtime->rec_id_hash)
         {
-            free(psx_rec_ref->write_traces);
-            free(psx_rec_ref->read_traces);
-            free(psx_rec_ref->file_rec);
-            free(psx_rec_ref);
+            /* then delete the POSIX trace records */
+            psx_rec_ref = darshan_delete_record_ref(&dxt_posix_runtime->rec_id_hash,
+                &psx_file->base_rec.id, sizeof(darshan_record_id));
+            if(psx_rec_ref)
+            {
+                free(psx_rec_ref->write_traces);
+                free(psx_rec_ref->read_traces);
+                free(psx_rec_ref->file_rec);
+                free(psx_rec_ref);
+            }
         }
     }
 



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/1383589c2cb32f2f65dfbde2f9b50c76941c1a6a

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/1383589c2cb32f2f65dfbde2f9b50c76941c1a6a
You're receiving this email because of your account on xgitlab.cels.anl.gov.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20190925/4fcee4cf/attachment-0001.html>


More information about the Darshan-commits mailing list