Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cut time of nc_test runs by ~ 50%? #556

Closed
edhartnett opened this issue Oct 30, 2017 · 2 comments
Closed

cut time of nc_test runs by ~ 50%? #556

edhartnett opened this issue Oct 30, 2017 · 2 comments
Milestone

Comments

@edhartnett
Copy link
Contributor

While working on nc_test I notice that it is running the tests for netCDF-4 classic model twice. Since this is by far the slowest part of the test, running it twice almost doubles overall test time, from ~12s to ~23s on my machine.

In light of Ward's recent comments about the length of time that a single CI cycle is taking, would you like me to submit a PR with this simple fix? I already have it working, and it's quite trivial. I change the main loop to:

	  case NC_FORMAT_NETCDF4: /* skip pure netCDF-4. */
	      continue; /* loop i */
	     
	  case NC_FORMAT_NETCDF4_CLASSIC:
#ifdef USE_NETCDF4
	     nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL);
	     strcpy(testfile, "nc_test_netcdf4.nc");
	     fprintf(stderr, "\n\nSwitching to netCDF-4 format (with NC_CLASSIC_MODEL).\n");
	     break;
#else
	     continue; /* loop i */
#endif

@WardF
Copy link
Member

WardF commented Oct 31, 2017

I'll wrap it in to the current ball of pull requests I'm handling by hand. Thanks!

@WardF WardF added this to the 4.5.1 milestone Oct 31, 2017
WardF added a commit that referenced this issue Oct 31, 2017
@WardF
Copy link
Member

WardF commented Oct 31, 2017

Merged!

@WardF WardF closed this as completed Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants