Commit bf5cf039 authored by Kevin Harms's avatar Kevin Harms

Fix the performance estimation in darshan-parser for file-per-process

data.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@386 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 9bd64e7d
...@@ -67,6 +67,8 @@ typedef struct perf_data_s ...@@ -67,6 +67,8 @@ typedef struct perf_data_s
double agg_perf_by_open; double agg_perf_by_open;
double agg_perf_by_open_lastio; double agg_perf_by_open_lastio;
double agg_perf_by_slowest; double agg_perf_by_slowest;
double *rank_cumul_io_time;
double *rank_cumul_md_time;
} perf_data_t; } perf_data_t;
typedef struct file_data_s typedef struct file_data_s
...@@ -319,6 +321,20 @@ int main(int argc, char **argv) ...@@ -319,6 +321,20 @@ int main(int argc, char **argv)
CP_PRINT_HEADER(); CP_PRINT_HEADER();
} }
pdata.rank_cumul_io_time = malloc(sizeof(double)*job.nprocs);
pdata.rank_cumul_md_time = malloc(sizeof(double)*job.nprocs);
if (!pdata.rank_cumul_io_time || !pdata.rank_cumul_md_time)
{
perror("malloc failed");
darshan_log_close(file);
return(-1);
}
else
{
memset(pdata.rank_cumul_io_time, 0, sizeof(double)*job.nprocs);
memset(pdata.rank_cumul_md_time, 0, sizeof(double)*job.nprocs);
}
while((ret = darshan_log_getfile(file, &job, &cp_file)) == 1) while((ret = darshan_log_getfile(file, &job, &cp_file)) == 1)
{ {
char* mnt_pt = NULL; char* mnt_pt = NULL;
...@@ -771,6 +787,9 @@ void accum_perf(struct darshan_file *dfile, ...@@ -771,6 +787,9 @@ void accum_perf(struct darshan_file *dfile,
dfile->fcounters[CP_F_POSIX_WRITE_TIME]; dfile->fcounters[CP_F_POSIX_WRITE_TIME];
hfile->meta_time += dfile->fcounters[CP_F_POSIX_META_TIME]; hfile->meta_time += dfile->fcounters[CP_F_POSIX_META_TIME];
} }
pdata->rank_cumul_io_time[dfile->rank] += hfile->cumul_time;
pdata->rank_cumul_md_time[dfile->rank] += hfile->meta_time;
} }
return; return;
...@@ -780,20 +799,18 @@ void calc_perf(struct darshan_job *djob, ...@@ -780,20 +799,18 @@ void calc_perf(struct darshan_job *djob,
hash_entry_t *hash_rank_uniq, hash_entry_t *hash_rank_uniq,
perf_data_t *pdata) perf_data_t *pdata)
{ {
hash_entry_t *curr = NULL; int64_t i;
hash_entry_t *tmp = NULL;
pdata->shared_time_by_cumul = pdata->shared_time_by_cumul =
pdata->shared_time_by_cumul / (double)djob->nprocs; pdata->shared_time_by_cumul / (double)djob->nprocs;
pdata->shared_meta_time = pdata->shared_meta_time / (double)djob->nprocs; pdata->shared_meta_time = pdata->shared_meta_time / (double)djob->nprocs;
HASH_ITER(hlink, hash_rank_uniq, curr, tmp) for (i=0; i<djob->nprocs; i++)
{ {
if (pdata->slowest_rank_time < curr->cumul_time) if (pdata->rank_cumul_io_time[i] > pdata->slowest_rank_time)
{ {
pdata->slowest_rank_time = curr->cumul_time; pdata->slowest_rank_time = pdata->rank_cumul_io_time[i];
pdata->slowest_rank_meta_time = curr->meta_time;
} }
} }
......
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