diff --git a/tests/cunit/test_async_multi2.c b/tests/cunit/test_async_multi2.c index bedafd611bb..cf2cd276d24 100644 --- a/tests/cunit/test_async_multi2.c +++ b/tests/cunit/test_async_multi2.c @@ -32,16 +32,8 @@ int main(int argc, char **argv) { int my_rank; /* Zero-based rank of processor. */ int ntasks; /* Number of processors involved in current execution. */ - int iosysid[COMPONENT_COUNT]; /* The ID for the parallel I/O system. */ int num_iotypes; /* Number of PIO netCDF iotypes in this build. */ - int iotype[NUM_IOTYPES]; /* iotypes for the supported netCDF IO iotypes. */ - int num_procs[COMPONENT_COUNT] = {1, 1}; /* Num procs for IO and computation. */ - int io_proc_list[NUM_IO_PROCS] = {0}; - int comp_proc_list1[NUM_COMP_PROCS] = {1}; - int comp_proc_list2[NUM_COMP_PROCS] = {2}; - int *proc_list[COMPONENT_COUNT] = {comp_proc_list1, comp_proc_list2}; MPI_Comm test_comm; - int verbose = 0; int ret; /* Return code. */ /* Initialize test. */ @@ -55,6 +47,14 @@ int main(int argc, char **argv) /* Only do something on TARGET_NTASKS tasks. */ if (my_rank < TARGET_NTASKS) { + int iosysid[COMPONENT_COUNT]; /* The ID for the parallel I/O system. */ + int iotype[NUM_IOTYPES]; /* iotypes for the supported netCDF IO iotypes. */ + int num_procs[COMPONENT_COUNT] = {1, 1}; /* Num procs for IO and computation. */ + int io_proc_list[NUM_IO_PROCS] = {0}; + int comp_proc_list1[NUM_COMP_PROCS] = {1}; + int comp_proc_list2[NUM_COMP_PROCS] = {2}; + int *proc_list[COMPONENT_COUNT] = {comp_proc_list1, comp_proc_list2}; + /* Figure out iotypes. */ if ((ret = get_iotypes(&num_iotypes, iotype))) ERR(ret); @@ -65,9 +65,6 @@ int main(int argc, char **argv) if ((ret = PIOc_init_async(test_comm, NUM_IO_PROCS, io_proc_list, COMPONENT_COUNT, num_procs, (int **)proc_list, NULL, NULL, PIO_REARR_BOX, iosysid))) ERR(ERR_INIT); - if (verbose) - for (int c = 0; c < COMPONENT_COUNT; c++) - printf("my_rank %d cmp %d iosysid[%d] %d\n", my_rank, c, c, iosysid[c]); /* All the netCDF calls are only executed on the computation * tasks. */ @@ -89,12 +86,12 @@ int main(int argc, char **argv) /* Create sample file. */ if ((ret = create_nc_sample_4(iosysid[my_comp_idx], iotype[i], my_rank, my_comp_idx, - filename, TEST_NAME, verbose, num_types))) + filename, TEST_NAME, 0, num_types))) ERR(ret); /* Check the file for correctness. */ if ((ret = check_nc_sample_4(iosysid[my_comp_idx], iotype[i], my_rank, my_comp_idx, - filename, verbose, num_types))) + filename, 0, num_types))) ERR(ret); /* Free the decompositions. */