[Darshan-commits] [Git][darshan/darshan][autoperf-mod-update] Autoperf module name updates

Sudheer Chunduri xgitlab at cels.anl.gov
Tue Jan 12 21:12:35 CST 2021



Sudheer Chunduri pushed to branch autoperf-mod-update at darshan / darshan


Commits:
c77d86a4 by Sudheer Chunduri at 2021-01-13T03:11:59+00:00
Autoperf module name updates

- - - - -


4 changed files:

- darshan-log-format.h
- darshan-runtime/lib/darshan-core.c
- darshan-util/pydarshan.py
- modules/autoperf


Changes:

=====================================
darshan-log-format.h
=====================================
@@ -142,17 +142,17 @@ struct darshan_base_record
  * in the module id space
  */
 #ifdef DARSHAN_USE_APXC
-#define __DARSHAN_APXC_VER DARSHAN_APXC_VER
+#define __APXC_VER APXC_VER
 #define __apxc_logutils &apxc_logutils
 #else
-#define __DARSHAN_APXC_VER 0
+#define __APXC_VER 0
 #define __apxc_logutils NULL
 #endif
 #ifdef DARSHAN_USE_APMPI
-#define __DARSHAN_APMPI_VER DARSHAN_APMPI_VER
+#define __APMPI_VER APMPI_VER
 #define __apmpi_logutils &apmpi_logutils
 #else
-#define __DARSHAN_APMPI_VER 0
+#define __APMPI_VER 0
 #define __apmpi_logutils NULL
 #endif
 
@@ -169,8 +169,8 @@ struct darshan_base_record
     X(DXT_POSIX_MOD,       "DXT_POSIX",  DXT_POSIX_VER,         &dxt_posix_logutils) \
     X(DXT_MPIIO_MOD,       "DXT_MPIIO",  DXT_MPIIO_VER,         &dxt_mpiio_logutils) \
     X(DARSHAN_MDHIM_MOD,   "MDHIM",      DARSHAN_MDHIM_VER,     &mdhim_logutils) \
-    X(DARSHAN_APXC_MOD,    "DARSHAN_APXC", __DARSHAN_APXC_VER,  __apxc_logutils) \
-    X(DARSHAN_APMPI_MOD,    "DARSHAN_APMPI", __DARSHAN_APMPI_VER,  __apmpi_logutils) 
+    X(APXC_MOD,    "APXC", __APXC_VER,  __apxc_logutils) \
+    X(APMPI_MOD,    "APMPI", __APMPI_VER,  __apmpi_logutils) 
 
 /* unique identifiers to distinguish between available darshan modules */
 /* NOTES: - valid ids range from [0...DARSHAN_MAX_MODS-1]


=====================================
darshan-runtime/lib/darshan-core.c
=====================================
@@ -521,7 +521,7 @@ void darshan_core_shutdown()
 
         /* get a list of records which are shared across all processes */
         darshan_get_shared_records(final_core, &shared_recs, &shared_rec_cnt);
-
+        printf(" L 524 --- my_rank: %d shared_rec_cnt: %d\n", my_rank, shared_rec_cnt);
         mod_shared_recs = malloc(shared_rec_cnt * sizeof(darshan_record_id));
         assert(mod_shared_recs);
     }
@@ -593,7 +593,7 @@ void darshan_core_shutdown()
             mod_buf = final_core->mod_array[i]->rec_buf_start;
             mod_buf_sz = final_core->mod_array[i]->rec_buf_p - mod_buf;
             
-            printf("l 596 --- MOD_ID: %d mod_buf_sz: %d\n", i, mod_buf_sz);
+            printf("l 596 --- MOD_ID: %d my_rank: %d mod_buf_sz: %d\n", i, my_rank, mod_buf_sz);
 
 #ifdef HAVE_MPI
             if(using_mpi)
@@ -608,13 +608,13 @@ void darshan_core_shutdown()
                     HASH_FIND(hlink, final_core->name_hash, &shared_recs[j],
                         sizeof(darshan_record_id), ref);
                     assert(ref);
-                    printf("l 611 --- MOD_ID: %d ref->global_mod_flags: %d \n", i, ref->global_mod_flags );
+                    printf("l 611 --- MOD_ID: %d my_rank: %d j: %d ref->mod_flags: %d ref->global_mod_flags: %d \n", i, my_rank, j, ref->mod_flags, ref->global_mod_flags );
                     if(DARSHAN_MOD_FLAG_ISSET(ref->global_mod_flags, i))
                     {
                         mod_shared_recs[mod_shared_rec_cnt++] = shared_recs[j];
                     }
                 }
-                printf("l 617 --- MOD_ID: %d shared_rec_cnt:%d mod_shared_rec_cnt:%d\n", i, shared_rec_cnt, mod_shared_rec_cnt);
+                printf("l 617 --- MOD_ID: %d my_rank: %d shared_rec_cnt:%d mod_shared_rec_cnt:%d\n", i, my_rank, shared_rec_cnt, mod_shared_rec_cnt);
 
                 /*  int comm_size;
                    MPI_Comm_size(final_core->mpi_comm, &comm_size);
@@ -622,7 +622,7 @@ void darshan_core_shutdown()
                    int name_length;
                    MPI_Comm_get_name(final_core->mpi_comm, name, &name_length);
                 */
-                printf("l 624 --- MOD_ID: %d DARSHAN_DISABLE_SHARED_REDUCTION:%d \n", i, getenv("DARSHAN_DISABLE_SHARED_REDUCTION"));
+                printf("l 624 --- MOD_ID: %d my_rank: %d DARSHAN_DISABLE_SHARED_REDUCTION:%d \n", i, my_rank, getenv("DARSHAN_DISABLE_SHARED_REDUCTION"));
                 /* allow the module an opportunity to reduce shared files */
                 if(this_mod->mod_funcs.mod_redux_func && (mod_shared_rec_cnt > 0) &&
                    (!getenv("DARSHAN_DISABLE_SHARED_REDUCTION"))){
@@ -1227,7 +1227,7 @@ static int darshan_add_name_record_ref(struct darshan_core_runtime *core,
     ref->name_record->id = rec_id;
     strcpy(ref->name_record->name, name);
     DARSHAN_MOD_FLAG_SET(ref->mod_flags, mod_id);
-
+printf(" L 1230 ---- my_rank:%d mod_id: %d name: %s ref->mod_flags: %d ref->global_mod_flags:%d \n", my_rank, mod_id, name, ref->mod_flags, ref->global_mod_flags);
     /* add the record to the hash table */
     HASH_ADD(hlink, core->name_hash, name_record->id,
         sizeof(darshan_record_id), ref);
@@ -1291,7 +1291,7 @@ static void darshan_get_shared_records(struct darshan_core_runtime *core,
 
     /* broadcast root's number of records to all other processes */
     PMPI_Bcast(&tmp_cnt, 1, MPI_INT, 0, core->mpi_comm);
-
+    printf("L 1294 --- my_rank: %d core->name_hash: %lu tmp_cnt: %d\n", my_rank, core->name_hash, tmp_cnt);
     /* use root record count to allocate data structures */
     id_array = malloc(tmp_cnt * sizeof(darshan_record_id));
     mod_flags = malloc(tmp_cnt * sizeof(uint64_t));
@@ -1326,6 +1326,7 @@ static void darshan_get_shared_records(struct darshan_core_runtime *core,
             /* we opened that record too, save the mod_flags */
             mod_flags[i] = ref->mod_flags;
         }
+        printf(" --- L 1329 my_rank: %d mod_flags[%d]: %d \n", my_rank, i, mod_flags[i]);
     }
 
     /* now allreduce so everyone agrees which records are shared and
@@ -1333,10 +1334,11 @@ static void darshan_get_shared_records(struct darshan_core_runtime *core,
      */
     PMPI_Allreduce(mod_flags, global_mod_flags, tmp_cnt,
         MPI_UINT64_T, MPI_BAND, core->mpi_comm);
-
+    
     j = 0;
     for(i=0; i<tmp_cnt; i++)
     {
+        printf(" --- L 1341 my_rank: %d mod_flags[%d]: %d global_mod_flags[%d]: %d\n", my_rank, i, mod_flags[i], i, global_mod_flags[i]);
         if(global_mod_flags[i] != 0)
         {
             (*shared_recs)[j++] = id_array[i];
@@ -1348,6 +1350,7 @@ static void darshan_get_shared_records(struct darshan_core_runtime *core,
             HASH_FIND(hlink, core->name_hash, &id_array[i], sizeof(darshan_record_id), ref);
             assert(ref);
             ref->global_mod_flags = global_mod_flags[i];
+            printf(" L 1351 --- i: %d ref->mod_flags: %d ref->global_mod_flags: %d\n", i, ref->mod_flags, ref->global_mod_flags);
         }
     }
     *shared_rec_cnt = j;
@@ -2283,7 +2286,8 @@ void *darshan_core_register_record(
         DARSHAN_CORE_UNLOCK();
         return(NULL);
     }
-
+    printf("L 2289 --- my_rank: %d mod_id: %d name: %s \n\n\n\n\n\n\n\n\n\n\n", my_rank, mod_id, name);
+    printf("L 2286 --- my_rank: %d mod_id: %d darshan_core->mod_array[mod_id]->rec_mem_avail: %d rec_len:%d \n", my_rank, mod_id, darshan_core->mod_array[mod_id]->rec_mem_avail, rec_len);
     /* check to see if this module has enough space to store a new record */
     if(darshan_core->mod_array[mod_id]->rec_mem_avail < rec_len)
     {
@@ -2300,8 +2304,10 @@ void *darshan_core_register_record(
          */
         HASH_FIND(hlink, darshan_core->name_hash, &rec_id,
             sizeof(darshan_record_id), ref);
+        printf("L 2303 --- my_rank: %d rec_id: %d ref: %d darshan_core->name_hash: %d \n", my_rank, rec_id, ref, darshan_core->name_hash);
         if(!ref)
         {
+            printf(" 2306 --- my_rank:%d mod_id: %d, rec_id: %lu name: %s \n", my_rank, mod_id, rec_id, name );
             ret = darshan_add_name_record_ref(darshan_core, rec_id, name, mod_id);
             if(ret == 0)
             {
@@ -2309,6 +2315,7 @@ void *darshan_core_register_record(
                 DARSHAN_CORE_UNLOCK();
                 return(NULL);
             }
+            printf(" 2314 --- my_rank: %d mod_id: %d ret: %d\n", my_rank, mod_id, ret);
         }
         else
         {


=====================================
darshan-util/pydarshan.py
=====================================
@@ -242,7 +242,7 @@ def log_get_apxc_record(log):
   memory_modes = ['unknown', 'flat', 'equal', 'split', 'cache']
   cluster_modes = ['unknown', 'all2all', 'quad', 'hemi', 'snc4', 'snc2']
   buf = ffi.new("void **")
-  r = libdutil.darshan_log_get_record(log, modules['DARSHAN_APXC']['idx'], buf)
+  r = libdutil.darshan_log_get_record(log, modules['APXC']['idx'], buf)
   if r < 1:
     return None
   prf = ffi.cast("struct darshan_apxc_perf_record **", buf)


=====================================
modules/autoperf
=====================================
@@ -1 +1 @@
-Subproject commit 7c34b6a4fb05b4197641c7c8e9b07be3fe089fad
+Subproject commit 5f40cfef242df9463ea877be852fbfff97e0191b



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/commit/c77d86a48c80251dc06b87e53f53ee3777ce67da

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/commit/c77d86a48c80251dc06b87e53f53ee3777ce67da
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/20210112/07bd0233/attachment-0001.html>


More information about the Darshan-commits mailing list