Skip to content

Commit

Permalink
Check for either the old default cache nelems value, or the new one i…
Browse files Browse the repository at this point in the history
…ntroduced in netcdf-c commit #f1a3a64
  • Loading branch information
WardF committed Nov 30, 2023
1 parent 155d387 commit 7eff7de
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions nf_test4/ftst_vars.F
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ program ftst_vars
integer endianness

C Cache size stuff.
integer DEFAULT_CACHE_SIZE, DEFAULT_CACHE_NELEMS
integer DEFAULT_CACHE_SIZE, DEFAULT_CACHE_NELEMS_OLD
integer DEFAULT_CACHE_NELEMS_NEW
integer DEFAULT_CACHE_PREEMPTION
parameter (DEFAULT_CACHE_SIZE = 16777216)
parameter (DEFAULT_CACHE_NELEMS = 4133)
parameter (DEFAULT_CACHE_NELEMS_OLD = 4133)
parameter (DEFAULT_CACHE_NELEMS_NEW = 1000)
parameter (DEFAULT_CACHE_PREEMPTION = 75)
integer CACHE_SIZE, CACHE_NELEMS, CACHE_PREEMPTION
parameter (CACHE_SIZE = 8000, CACHE_NELEMS = 500)
Expand All @@ -63,7 +65,8 @@ program ftst_vars
& cache_preemption_in)
if (retval .ne. nf_noerr) stop 1
if (cache_size_in .ne. DEFAULT_CACHE_SIZE .or.
& cache_nelems_in .ne. DEFAULT_CACHE_NELEMS .or.
& (cache_nelems_in .ne. DEFAULT_CACHE_NELEMS_OLD .and.
& cache_nelems_in .ne. DEFAULT_CACHE_NELEMS_NEW) .or.
& cache_preemption_in .ne. DEFAULT_CACHE_PREEMPTION) stop 4

C Change the cache size for the files created/opened in this program.
Expand Down

0 comments on commit 7eff7de

Please sign in to comment.