Commit 7ba0dfe3 authored by Shane Snyder's avatar Shane Snyder

add dummy counter to test lustre module

parent b920e005
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
/* TODO: add integer counters here (e.g., counter for stripe width, stripe size, etc etc) */ /* TODO: add integer counters here (e.g., counter for stripe width, stripe size, etc etc) */
#define LUSTRE_COUNTERS \ #define LUSTRE_COUNTERS \
/* dummy counter */\
X(LUSTRE_TEST_COUNTER) \
/* end of counters */\ /* end of counters */\
X(LUSTRE_NUM_INDICES) X(LUSTRE_NUM_INDICES)
......
...@@ -105,6 +105,7 @@ void darshan_instrument_lustre_file(char *filepath) ...@@ -105,6 +105,7 @@ void darshan_instrument_lustre_file(char *filepath)
/* TODO: gather lustre data, store in record hash */ /* TODO: gather lustre data, store in record hash */
/* counters in lustre_ref->record->counters */ /* counters in lustre_ref->record->counters */
lustre_ref->record->counters[LUSTRE_TEST_COUNTER] = 88;
HASH_ADD(hlink, lustre_runtime->record_hash, record->rec_id, HASH_ADD(hlink, lustre_runtime->record_hash, record->rec_id,
sizeof(darshan_record_id), lustre_ref); sizeof(darshan_record_id), lustre_ref);
...@@ -199,6 +200,9 @@ static void lustre_get_output_data( ...@@ -199,6 +200,9 @@ static void lustre_get_output_data(
* given file should be the same on each process * given file should be the same on each process
*/ */
*lustre_buf = (void *)(lustre_runtime->record_array);
*lustre_buf_sz = lustre_runtime->record_array_ndx * sizeof(struct darshan_lustre_record);
return; return;
} }
...@@ -207,7 +211,11 @@ static void lustre_shutdown(void) ...@@ -207,7 +211,11 @@ static void lustre_shutdown(void)
assert(lustre_runtime); assert(lustre_runtime);
/* TODO: free data structures */ /* TODO: free data structures */
HASH_CLEAR(hlink, lustre_runtime->record_hash);
free(lustre_runtime->ref_array);
free(lustre_runtime->record_array);
free(lustre_runtime);
lustre_runtime = NULL; lustre_runtime = NULL;
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment