Commit 5a3d1bdc authored by Shane Snyder's avatar Shane Snyder

slightly improved lustre OST diffing

parent c38ee987
...@@ -212,14 +212,14 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1, ...@@ -212,14 +212,14 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
} }
} }
/* would it be more or less useful to sort the OST IDs before comparing? */ /* TODO: would it be more or less useful to sort the OST IDs before comparing? */
if ( lustre_rec1->counters[LUSTRE_STRIPE_WIDTH] == lustre_rec2->counters[LUSTRE_STRIPE_WIDTH] ) { i = 0;
for (i = 0; i < lustre_rec1->counters[LUSTRE_STRIPE_WIDTH]; i++ ) while (1)
{
if (lustre_rec1->ost_ids[i] != lustre_rec2->ost_ids[i])
{ {
char strbuf[25]; char strbuf[25];
snprintf( strbuf, 25, "LUSTRE_OST_ID_%d", i ); snprintf( strbuf, 25, "LUSTRE_OST_ID_%d", i );
if (!lustre_rec2 || (i >= lustre_rec2->counters[LUSTRE_STRIPE_WIDTH]))
{
printf("- "); printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD], DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec1->base_rec.rank, lustre_rec1->base_rec.rank,
...@@ -229,6 +229,9 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1, ...@@ -229,6 +229,9 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
file_name1, file_name1,
"", "",
""); "");
}
else if (!lustre_rec1 || (i >= lustre_rec1->counters[LUSTRE_STRIPE_WIDTH]))
{
printf("+ "); printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD], DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec2->base_rec.rank, lustre_rec2->base_rec.rank,
...@@ -239,7 +242,32 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1, ...@@ -239,7 +242,32 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
"", "",
""); "");
} }
else if (lustre_rec1->ost_ids[i] != lustre_rec2->ost_ids[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec1->base_rec.rank,
lustre_rec1->base_rec.id,
strbuf,
lustre_rec1->ost_ids[i],
file_name1,
"",
"");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec2->base_rec.rank,
lustre_rec2->base_rec.id,
strbuf,
lustre_rec2->ost_ids[i],
file_name2,
"",
"");
} }
i++;
if ((!lustre_rec1 || (i >= lustre_rec1->counters[LUSTRE_STRIPE_WIDTH])) &&
(!lustre_rec2 || (i >= lustre_rec2->counters[LUSTRE_STRIPE_WIDTH])))
break;
} }
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