@@ -390,48 +390,58 @@ AC_ARG_WITH([default-chunk-size],
390390AC_MSG_RESULT ( [ $DEFAULT_CHUNK_SIZE] )
391391AC_DEFINE_UNQUOTED ( [ DEFAULT_CHUNK_SIZE] , [ $DEFAULT_CHUNK_SIZE] , [ default chunk size in bytes] )
392392
393- # Did the user specify a max per-var cache size?
394- AC_MSG_CHECKING ( [ whether a maximum per-variable cache size for HDF5 was specified] )
395- AC_ARG_WITH ( [ max- default-cache-size] ,
396- [ AS_HELP_STRING ( [ --with-max- default-cache-size=<integer>] ,
397- [ Specify maximum size (in bytes) for the default per-var chunk cache.] ) ] ,
398- [ MAX_DEFAULT_CACHE_SIZE=$with_max_default_cache_size ] , [ MAX_DEFAULT_CACHE_SIZE=67108864 ] )
399- AC_MSG_RESULT ( [ $MAX_DEFAULT_CACHE_SIZE ] )
400- AC_DEFINE_UNQUOTED ( [ MAX_DEFAULT_CACHE_SIZE ] , [ $MAX_DEFAULT_CACHE_SIZE ] , [ max size of the default per-var chunk cache.] )
401-
402- # Did the user specify a number of chunks in default per-var cache size?
403- AC_MSG_CHECKING ( [ whether a number of chunks for the default per-variable cache was specified] )
393+ # Did the user specify a default cache size?
394+ AC_MSG_CHECKING ( [ whether a default cache size was specified] )
395+ AC_ARG_WITH ( [ default-chunk -cache-size] ,
396+ [ AS_HELP_STRING ( [ --with-default-chunk -cache-size=<integer>] ,
397+ [ Specify default size (in bytes) for chunk cache.] ) ] ,
398+ [ DEFAULT_CHUNK_CACHE_SIZE=$with_default_chunk_cache_size ] , [ DEFAULT_CHUNK_CACHE_SIZE=16777216U ] )
399+ AC_MSG_RESULT ( [ $DEFAULT_CHUNK_CACHE_SIZE ] )
400+ AC_DEFINE_UNQUOTED ( [ DEFAULT_CHUNK_CACHE_SIZE ] , [ $DEFAULT_CHUNK_CACHE_SIZE ] , [ default size of the chunk cache.] )
401+
402+ # Did the user specify a max number of chunks in default per-var cache size?
403+ AC_MSG_CHECKING ( [ whether a default number of entries for the chunk cache was specified] )
404404AC_ARG_WITH ( [ default-chunks-in-cache] ,
405405 [ AS_HELP_STRING ( [ --with-default-chunks-in-cache=<integer>] ,
406- [ Specify the number of chunks to store in default per-variable cache.] ) ] ,
407- [ DEFAULT_CHUNKS_IN_CACHE=$with_default_chunks_in_cache] , [ DEFAULT_CHUNKS_IN_CACHE=10 ] )
406+ [ Specify the max number of chunks to store in cache.] ) ] ,
407+ [ DEFAULT_CHUNKS_IN_CACHE=$with_default_chunks_in_cache] , [ DEFAULT_CHUNKS_IN_CACHE=1000 ] )
408408AC_MSG_RESULT ( [ $DEFAULT_CHUNKS_IN_CACHE] )
409- AC_DEFINE_UNQUOTED ( [ DEFAULT_CHUNKS_IN_CACHE] , [ $DEFAULT_CHUNKS_IN_CACHE] , [ num chunks in default per-var chunk cache.] )
409+ AC_DEFINE_UNQUOTED ( [ DEFAULT_CHUNKS_IN_CACHE] , [ $DEFAULT_CHUNKS_IN_CACHE] , [ default max num chunks in chunk cache.] )
410410
411+ # Did the user specify a default cache preemption
412+ AC_MSG_CHECKING ( [ whether a default cache preemption was specified] )
413+ AC_ARG_WITH ( [ default-chunk-cache-preemption] ,
414+ [ AS_HELP_STRING ( [ --with-chunk-cache-preemption=<float between 0 and 1 inclusive>] ,
415+ [ Specify default file chunk cache preemption policy (a number between 0 and 1, inclusive).] ) ] ,
416+ [ DEFAULT_CHUNK_CACHE_PREEMPTION=$with_chunk_cache_preemption] , [ DEFAULT_CHUNK_CACHE_PREEMPTION=0.75] )
417+ AC_MSG_RESULT ( [ $DEFAULT_CHUNK_CACHE_PREEMPTION] )
418+ AC_DEFINE_UNQUOTED ( [ DEFAULT_CHUNK_CACHE_PREEMPTION] , [ $DEFAULT_CHUNK_CACHE_PREEMPTION] , [ default file chunk cache preemption policy.] )
419+
420+ # These three options are redundant over the --with-default... options above.
411421# Did the user specify a default cache size for HDF5?
412422AC_MSG_CHECKING ( [ whether a default file cache size for HDF5 was specified] )
413423AC_ARG_WITH ( [ chunk-cache-size] ,
414424 [ AS_HELP_STRING ( [ --with-chunk-cache-size=<integer>] ,
415425 [ Specify default file cache chunk size for HDF5 files in bytes.] ) ] ,
416- [ CHUNK_CACHE_SIZE=$with_chunk_cache_size] , [ CHUNK_CACHE_SIZE=16777216 ] )
426+ [ CHUNK_CACHE_SIZE=$with_chunk_cache_size] , [ CHUNK_CACHE_SIZE=DEFAULT_CHUNK_CACHE_SIZE ] )
417427AC_MSG_RESULT ( [ $CHUNK_CACHE_SIZE] )
418428AC_DEFINE_UNQUOTED ( [ CHUNK_CACHE_SIZE] , [ $CHUNK_CACHE_SIZE] , [ default file chunk cache size in bytes.] )
419429
420- # Did the user specify a default cache nelems?
430+ # Did the user specify a default max cache entries for HDF5
421431AC_MSG_CHECKING ( [ whether a default file cache maximum number of elements for HDF5 was specified] )
422432AC_ARG_WITH ( [ chunk-cache-nelems] ,
423433 [ AS_HELP_STRING ( [ --with-chunk-cache-nelems=<integer>] ,
424434 [ Specify default maximum number of elements in the file chunk cache chunk for HDF5 files (should be prime number).] ) ] ,
425- [ CHUNK_CACHE_NELEMS=$with_chunk_cache_nelems] , [ CHUNK_CACHE_NELEMS=4133 ] )
435+ [ CHUNK_CACHE_NELEMS=$with_chunk_cache_nelems] , [ CHUNK_CACHE_NELEMS=DEFAULT_CHUNKS_IN_CACHE ] )
426436AC_MSG_RESULT ( [ $CHUNK_CACHE_NELEMS] )
427437AC_DEFINE_UNQUOTED ( [ CHUNK_CACHE_NELEMS] , [ $CHUNK_CACHE_NELEMS] , [ default file chunk cache nelems.] )
428438
429- # Did the user specify a default cache preemption?
439+ # Did the user specify a default cache preemption for HDF5 ?
430440AC_MSG_CHECKING ( [ whether a default cache preemption for HDF5 was specified] )
431441AC_ARG_WITH ( [ chunk-cache-preemption] ,
432442 [ AS_HELP_STRING ( [ --with-chunk-cache-preemption=<float between 0 and 1 inclusive>] ,
433443 [ Specify default file chunk cache preemption policy for HDF5 files (a number between 0 and 1, inclusive).] ) ] ,
434- [ CHUNK_CACHE_PREEMPTION=$with_chunk_cache_preemption] , [ CHUNK_CACHE_PREEMPTION=0.75 ] )
444+ [ CHUNK_CACHE_PREEMPTION=$with_chunk_cache_preemption] , [ CHUNK_CACHE_PREEMPTION=DEFAULT_CHUNK_CACHE_PREEMPTION ] )
435445AC_MSG_RESULT ( [ $CHUNK_CACHE_PREEMPTION] )
436446AC_DEFINE_UNQUOTED ( [ CHUNK_CACHE_PREEMPTION] , [ $CHUNK_CACHE_PREEMPTION] , [ default file chunk cache preemption policy.] )
437447
@@ -953,16 +963,6 @@ if test "x$with_s3_testing" = xyes ; then
953963 AC_MSG_WARN ( [ *** DO NOT SPECIFY WITH_S3_TESTING=YES UNLESS YOU HAVE ACCESS TO THE UNIDATA S3 BUCKET! ***] )
954964fi
955965
956- # Set default
957- # Did the user specify a default cache size for NCZarr?
958- AC_MSG_CHECKING ( [ whether a default file cache size for NCZarr was specified] )
959- AC_ARG_WITH ( [ chunk-cache-size-nczarr] ,
960- [ AS_HELP_STRING ( [ --with-chunk-cache-size-nczarr=<integer>] ,
961- [ Specify default maximum space used by the chunk cache NCZarr.] ) ] ,
962- [ CHUNK_CACHE_SIZE_NCZARR=$with_chunk_cache_size_nczarr] , [ CHUNK_CACHE_SIZE_NCZARR=4194304] )
963- AC_MSG_RESULT ( [ $CHUNK_CACHE_SIZE_NCZARR] )
964- AC_DEFINE_UNQUOTED ( [ CHUNK_CACHE_SIZE_NCZARR] , [ $CHUNK_CACHE_SIZE_NCZARR] , [ default nczarr chunk cache size.] )
965-
966966# Check whether we want to enable strict null byte header padding.
967967# See https://github.com/Unidata/netcdf-c/issues/657 for more information.
968968AC_MSG_CHECKING ( [ whether to enable strict null-byte header padding when reading (default off)] )
0 commit comments