Skip to content

Commit

Permalink
Merge pull request ESMCI#1619 from NCAR/ejh_ncint_perf_2
Browse files Browse the repository at this point in the history
improvements in performance program
  • Loading branch information
edwardhartnett authored Dec 3, 2019
2 parents b9b900b + b596695 commit 6c03fdb
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions tests/ncint/tst_ncint_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,29 @@ main(int argc, char **argv)
size_t elements_per_pe;
size_t *compdof; /* The decomposition mapping. */
int *my_data;
int *data_in;
int num_procs2[COMPONENT_COUNT] = {3};
int num_io_procs = 1;
int num_procs2[COMPONENT_COUNT];
int num_io_procs;
int i;

/* Turn on logging for PIO library. */
/* PIOc_set_log_level(4); */
/* if (!my_rank) */
/* nc_set_log_level(3); */
if (ntasks <= 16)
num_io_procs = 1;
else if (ntasks <= 64)
num_io_procs = 4;
else if (ntasks <= 128)
num_io_procs = 16;
else if (ntasks <= 512)
num_io_procs = 64;
else if (ntasks <= 1024)
num_io_procs = 128;
else if (ntasks <= 2048)
num_io_procs = 256;

/* Figure out how many computation processors. */
num_procs2[0] = ntasks - num_io_procs;

/* Initialize the intracomm. The IO task will not return from
* this call until the PIOc_finalize() is called by the
Expand All @@ -72,7 +86,7 @@ main(int argc, char **argv)
num_procs2, NULL, NULL, NULL, PIO_REARR_BOX, &iosysid))
PERR;

if (my_rank)
if (my_rank > num_io_procs)
{
struct timeval starttime, endtime;
long long startt, endt;
Expand Down

0 comments on commit 6c03fdb

Please sign in to comment.