Commit Graph

96 Commits

Author SHA1 Message Date
Sean McBride
56844001f5 Replaced ancient K&R function declarations to be C23 compatible 2023-12-13 22:49:04 -05:00
Sean McBride
dfc2ac7296 Replaced trivial uses of sprintf with snprintf
In all these cases the size of the buffer can be computed with sizeof.
2023-12-08 13:30:38 -05:00
Ward Fisher
efa0c8df45 Add execute bit to test scripts 2023-02-16 15:58:42 -07:00
Ward Fisher
cd655eb442 Correct typo in CMakeLists.txt 2023-02-16 15:09:14 -07:00
Ward Fisher
2efb340488 Wiring performance benchmarks into cmake, cleaned up serial compression performance test dependency on MPI. 2023-02-16 15:06:27 -07:00
Dennis Heimbigner
36102e3c32 Improve UTF8 Support On Windows
re: Issue https://github.com/Unidata/netcdf-c/issues/2190

The primary purpose of this PR is to improve the utf8 support
for windows. This is persuant to a change in Windows that
supports utf8 natively (almost). The almost means that it is
still utf16 internally and the set of characters representable
by utf8 is larger than those representable by utf16.

This leaves open the question in the Issue about handling
the Windows 1252 character set.

This required the following changes:

1. Test the Windows build and major version in order to see if
   native utf8 is supported.
2. If native utf8 is supported, Modify dpathmgr.c to call the 8-bit
   version of the windows fopen() and open() functions.
3. In support of this, programs that use XGetOpt (Windows versions)
   need to get the command line as utf8 and then parse to
   arc+argv as utf8. This requires using a homegrown command line parser
   named XCommandLineToArgvA.
4. Add a utility program called "acpget" that prints out the
   current Windows code page and locale.

Additionally, some technical debt was cleaned up as follows:

1. Unify all the places which attempt to read all or a part
   of a file into the dutil.c#NC_readfile code.
2. Similary unify all the code that creates temp files into
   dutil.c#NC_mktmp code.
3. Convert almost all remaining calls to fopen() and open()
   to NCfopen() and NCopen3(). This is to ensure that path management
   is used consistently. This touches a number of files.
4. extern->EXTERNL as needed to get it to work under Windows.
2022-02-08 20:53:30 -07:00
Ward Fisher
abcbd9e1d5
Merge pull request #2156 from edwardhartnett/ejh_t1
Now setting deflate_level of 0 is interpreted to mean no deflate.
2022-01-18 17:02:30 -07:00
Dennis Heimbigner
d06938fd1d 1. Fix an additional flaw in fill_value handling where non-atomic default values were not properly being handled.
2. Rename the NC4_inq_any_type to NC_inq_any_type
3. Fix performance test cases affected by this PR.
2022-01-10 22:26:19 -07:00
Edward Hartnett
3ecf6a452e more test development 2021-12-03 06:41:35 -07:00
Edward Hartnett
34a0cfc46a more test development 2021-12-03 06:41:20 -07:00
Edward Hartnett
5508a7aba4 added sequential benchmark program for compression 2021-11-27 07:40:44 -07:00
Edward Hartnett
b7b4e53687 now setting deflate_level to zero does not turn on deflate 2021-11-27 07:40:02 -07:00
Edward Hartnett
7806ded5f2 tinker with data algorithm for tst_compress_par.c 2021-09-09 07:53:55 -06:00
Edward Hartnett
e8587b52a8 changed name of tst_gfs_data_1.c to tst_compress_par.c 2021-09-09 07:20:40 -06:00
Edward Hartnett
9cc39fe70f changed makefile to make benchmark bm_file work properly with zlib-ng 2021-09-09 05:58:13 -06:00
Edward Hartnett
db72457db2 changed makefile to allow tst_gfs_data_1 to pick up libz from LD_LIBRARY_PATH first 2021-09-08 09:31:30 -06:00
Edward Hartnett
7943172d17 improving benchmark program 2021-09-07 10:47:24 -06:00
Edward Hartnett
1b4322d88b turned off running of run_knmi_bm.sh benchmark with make check 2021-08-13 03:19:36 -06:00
Edward Hartnett
39de5eb6b5 added H5public.h to includes 2021-08-12 06:21:34 -06:00
Edward Hartnett
7353c8da1b turned of tst_gfs_data_1.c benchmark for HDF5 less than 1.10.2 2021-08-12 06:00:53 -06:00
Edward Hartnett
3aab4e284f made nc_perf not build and run benchmarks in parallel 2021-08-12 02:19:48 -06:00
Edward Hartnett
b832ee3ad9 remove nc_perf/tst_mem1 from tests run 2021-08-09 13:43:17 -06:00
Edward Hartnett
3955376af6 remove nc_perf/tst_mem1 from tests run 2021-08-09 13:42:04 -06:00
Ward Fisher
9f798e2ed6 Merge branch 'virtual_datasets' of https://github.com/d70-t/netcdf-c into gh1983.wif 2021-07-19 09:44:35 -07:00
Edward Hartnett
a71e777c56 improved program nc_perf/tst_gfs_data_1.c 2021-05-18 10:41:59 -06:00
Dennis Heimbigner
d2316f866c Additional Fixes to NCZarr
Primary Fixes:
* Add a whole variable optimization -- used in the rare case that nc_get/put_vara covers the whole of a variable and the variable has a single chunk.
* Fix chunking error when stride causes whole chunks to be skipped.
* Fix some memory leaks
* Add test cases
* Add one performance test to nczarr_test/. This uses the timer utils from unit_test: timer_utils.[ch].
* Move ncdumpchunks utility from ncdump to nczarr_test

Misc. Other Changes:
* Make check for aws libraries conditional on --enable-nczarr-s3
* Remove all but one bm tests from nczarr_test until they are working.
* Remove another dependency on HDF5 from supposedly non-HDF5 specific code; specifically hdf5_log_hdf5.
* Make the BAIL2 macro be hdf5 specific and replace elsewhere with an HDF5 independent equivalent.
* Move hdf5cache.c to libsrc4/nc4cache.c because it is used by nczarr.
* Modify unit_tests so that some of them are run even if using Windows.
* Misc. small bug fixes and refactors and memory leaks.
* Rename some conflicting tests for cmake.
* Attempted to make nc_perf work with cmake and failed.
2020-12-16 20:48:02 -07:00
Tobias Kölling
4b80965491 ange H5F_CLOSE_SEMI -> H5F_CLOSE_WEAK for netcdf related tests 2020-09-02 21:29:26 +02:00
Edward Hartnett
98088adb46 getting tst_gfs_data_1 ready to merge 2020-07-08 14:20:42 -06:00
Edward Hartnett
2571552686 changed output to be more readable 2020-07-07 11:25:49 -06:00
Edward Hartnett
2dad8d1bff now checking lat/lon coord values 2020-07-07 09:04:07 -06:00
Edward Hartnett
d539e03c68 further checking of metadata 2020-07-07 09:01:38 -06:00
Edward Hartnett
d13035b01e further checking of metadata 2020-07-07 08:58:38 -06:00
Edward Hartnett
a13c0a2d23 starting to use get_vara functions to check metadata 2020-07-07 08:49:12 -06:00
Edward Hartnett
f9e753495e more checking of metadata and coord vars 2020-07-07 08:04:06 -06:00
Edward Hartnett
6b2820ca95 now checking some coord vars 2020-07-06 08:26:35 -06:00
Edward Hartnett
661cde5203 more checking metadata 2020-07-06 08:14:15 -06:00
Edward Hartnett
7b477784f5 starting to check metadata 2020-07-06 07:53:11 -06:00
Edward Hartnett
8faa7ed946 added new metadata writing function 2020-07-05 15:57:07 -06:00
Edward Hartnett
a9b5c33ba7 dealing with coord var cleanup 2020-07-05 15:33:26 -06:00
Edward Hartnett
6e2a3cb3e3 cleaned up grid code 2020-07-05 14:27:19 -06:00
Edward Hartnett
aa1af2f456 cleaned up lat/lon code 2020-07-05 12:23:27 -06:00
Edward Hartnett
4a80190c64 code cleanup 2020-07-05 08:54:50 -06:00
Edward Hartnett
86c39cf7a2 working on 2D decomposition code 2020-07-04 10:45:33 -06:00
Edward Hartnett
7a9397aed8 cleanup of 2d decomposition 2020-07-04 10:31:12 -06:00
Edward Hartnett
b72dee72a1 starting to add decomp for 36 tasks 2020-07-02 09:37:55 -06:00
Edward Hartnett
ab25b62892 more benchmark development 2020-07-01 15:33:48 -06:00
Edward Hartnett
5b14cc1496 added attributes 2020-07-01 14:48:10 -06:00
Edward Hartnett
fd4e388002 added attributes 2020-07-01 14:47:59 -06:00
Edward Hartnett
527589a0d7 now create metadata in a function with many parameters 2020-07-01 13:30:24 -06:00
Edward Hartnett
3f6a367381 further development 2020-07-01 12:26:12 -06:00