Skip to content

Commit

Permalink
working on performance test
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Mar 27, 2019
1 parent 5c1fa0e commit 65202a2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/cunit/test_perf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ int create_decomposition_3d(int ntasks, int my_rank, int iosysid, int *ioid)
* @param flavor array of available iotypes.
* @param my_rank rank of this task.
* @param provide_fill 1 if fillvalue should be provided to PIOc_write_darray().
* @param rearranger the rearranger in use.
* @returns 0 for success, error code otherwise.
*/
int test_darray(int iosysid, int ioid, int num_flavors, int *flavor, int my_rank,
int provide_fill)
int provide_fill, int rearranger)
{
char filename[PIO_MAX_NAME + 1]; /* Name for the output files. */
int dimids[NDIM]; /* The dimension IDs. */
Expand Down Expand Up @@ -220,7 +221,7 @@ int test_darray(int iosysid, int ioid, int num_flavors, int *flavor, int my_rank
endt = (1000000 * endtime.tv_sec) + endtime.tv_usec;
delta = (endt - startt)/NUM_TIMESTEPS;
if (!my_rank)
printf("%d\t%lld\n", fmt, delta);
printf("%d\t%d\t%d\t%lld\n", rearranger, provide_fill, fmt, delta);

/* Reopen the file. */
if ((ret = PIOc_openfile(iosysid, &ncid2, &flavor[fmt], filename, PIO_NOWRITE)))
Expand Down Expand Up @@ -382,7 +383,8 @@ int test_all_darray(int iosysid, int num_flavors, int *flavor, int my_rank,
for (int provide_fill = 0; provide_fill < NUM_TEST_CASES_FILLVALUE; provide_fill++)
{
/* Run a simple darray test. */
if ((ret = test_darray(iosysid, ioid, num_flavors, flavor, my_rank, provide_fill)))
if ((ret = test_darray(iosysid, ioid, num_flavors, flavor, my_rank,
provide_fill, rearranger)))
return ret;
}

Expand Down Expand Up @@ -424,6 +426,10 @@ int main(int argc, char **argv)
if ((ret = get_iotypes(&num_flavors, flavor)))
ERR(ret);

if (!my_rank)
printf("rearr\tfill\tformat\ttime\n");


for (int r = 0; r < NUM_REARRANGERS_TO_TEST; r++)
{
/* Initialize the PIO IO system. This specifies how
Expand Down

0 comments on commit 65202a2

Please sign in to comment.