Commit Graph

7523 Commits

Author SHA1 Message Date
Ward Fisher
11799a5c24
Merge pull request #1731 from ZedThree/fix-fedora-hdf5
Fix wrong header include in testing HDF5 for zlib
2020-05-19 15:35:17 -06:00
Dennis Heimbigner
c68c4c804d Fix undefined references when using Visual Studio
Fix Issue https://github.com/Unidata/netcdf-c/issues/1725.
Replace PR https://github.com/Unidata/netcdf-c/pull/1726
Also replace PR https://github.com/Unidata/netcdf-c/pull/1694

The general problem is that under Visual Studio, we are seeing
a number of undefined reference and other scoping errors.
The reason is that the code is not properly using Visual Studio
_declspec() declarations.

The basic solution is to ensure that when compiling the code itself
one needs to ensure that _declspec(dllexport) is used. There
are several sets of macros to handle this, but they all rely
on the flag DLL_EXPORT being define when the code is compiled,
but not being defined when the code is used via a .h file.

As a test, I modified XGetOpt.c to build properly. I also
fixed the oc2 library to properly _declspec things like ocdebug.

I also made some misc. changes to get all the tests to run
if cygwin is installed (to get bash, sed, etc).

Misc. Changes:
* Put XGetOpt.c into libsrc and copy at build time
  to the other directories where it is needed.
2020-05-18 19:36:28 -06:00
Dennis Heimbigner
173339759f Merge remote-tracking branch 'Unidata/master' 2020-05-16 15:13:28 -06:00
Peter Hill
e1ef7a958c Fix wrong header include in testing HDF5 for zlib 2020-05-16 12:45:13 +01:00
Ward Fisher
0ab5b1bab0
Merge pull request #1727 from ddirks/nav-tree_fix
Ensure nav-tree is the correct height
2020-05-14 17:19:34 -06:00
Ward Fisher
afd110ba6b
Merge pull request #1728 from lesserwhirls/nctime
Improve ncdump handling of time units
2020-05-14 15:58:55 -06:00
Dennis Heimbigner
d6b2b76054 Expanded RELEASE_NOTES description 2020-05-14 15:49:53 -06:00
Dennis Heimbigner
2aef2d2e9a restore 2020-05-14 14:55:38 -06:00
Dennis Heimbigner
518d70ef64 ocdebug 2020-05-14 14:44:48 -06:00
Dennis Heimbigner
a9cede7647 handle missing H5Dread_chunks 2020-05-14 12:59:00 -06:00
Dennis Heimbigner
c4faca3bcc make ncdumpchunks conditional 2020-05-14 12:18:42 -06:00
Dennis Heimbigner
68a98f6e81 Fix ncgen handling of big data sections
The current ncgen does not properly handle very large
data sections. Apparently this is very uncommon because
it was only discovered in testing the new zarr code.

The fix required a new approach to processing data sections.
Unfortunately, the resulting ncgen is slower than before
but at least it is, I think, now correct.

The added test cases are in libnczarr, and so will
not show up until that is incorporated into master.

Note also that fortran code generation changed, but
has not been tested here.

Misc. Changes
1. Cleanup error handling in ncgen -lc and -lb output
2. Cleanup Makefiles for ncgen to remove unused code
3. Added a program, ncgen/ncdumpchunks, to print
   the data for a .nc file on a per-chunk format.
4. Made the XGetOpt change in PR https://github.com/Unidata/netcdf-c/pull/1694
   for ncdump/ncvalidator
2020-05-14 11:20:46 -06:00
Dennis Heimbigner
9e5f08d0e1 Merge remote-tracking branch 'Unidata/master' 2020-05-14 10:36:23 -06:00
Sean Arms
7e2408680c Define strncasecmp as _strnicmp on Windows 2020-05-14 07:27:30 -06:00
Sean Arms
c37cc13dca Treat time units as case-insensitive in ncdump
Enables ncdump -t (-i) to recognize a wider variety of time related units
and calendar names. This brings ncdump closer to what it advertises in its
man page regarding its understanding of udunits compliant time units.
2020-05-14 06:48:03 -06:00
Sean Arms
9c84724d5e Test ncdump time unit name case-insensitivity
As ugly as it is, "DaYs since ..." is a valid UDUNITS unit.
Only symbols are case-sensitive in UDUNITS.
2020-05-14 06:42:12 -06:00
Douglas Dirks
ccdac4bf60 Ensure that the nav-tree extends to the full height of the content area. The footer must be enclosed in a div element with the id="nav-path" for this to work. 2020-05-13 16:45:35 -06:00
Ward Fisher
fc1d75f842
Merge pull request #1721 from gsjaardema/patch-39
Different method of setting Parallel Filters variables
2020-05-13 15:05:34 -06:00
Dennis Heimbigner
7ad0d97bce Merge remote-tracking branch 'Unidata/master' 2020-05-12 19:42:09 -06:00
Ward Fisher
9f6981bc6b
Merge pull request #1719 from DennisHeimbigner/filterrepeat.dmh
Allow redefinition of variable filters
2020-05-12 16:03:51 -06:00
Ward Fisher
3214967163
Merge pull request #1724 from gsjaardema/patch-41
Fix CMake generation of netcdf_meta.h
2020-05-12 16:01:35 -06:00
Dennis Heimbigner
528829c97e Merge remote-tracking branch 'Unidata/master' 2020-05-12 12:32:00 -06:00
Greg Sjaardema
485810262d
Fix CMake generation of netcdf_meta.h
These changes seem to be correct for the generation of `netcdf_meta.h` in a CMake build.  I think this addresses #1723 

There is still an issue with the libnetcdf.settings
2020-05-11 16:53:30 -06:00
Ward Fisher
625d3337f1
Merge pull request #1722 from gsjaardema/patch-40
Remove duplicate references to error4.c
2020-05-11 14:26:03 -06:00
Greg Sjaardema
605b9ccd66
Remove duplicate references to error4.c
The `error4.c` file is already listed in `libsrc4_SOURCES`, so does not need to be added again later.  The file's contents are only compiled if `LOGGING` is defined, so is ok to always compile.
2020-05-11 13:21:10 -06:00
Greg Sjaardema
8d7d5ac9e5
Different method of setting Parallel Filters variables
The current method of setting the `HDF5_HAS_PAR_FILTERS` and `HAS_PAR_FILTERS` variables is done purely based on the `HDF5_VERSION` and that variable is only set inside the if block which finds the HDF5 library based on CMake package files.  If the user specifies the explicit location of the HDF5 library and include files (for example, via:
```
         -DHDF5_C_LIBRARY:PATH=${INSTALL_PATH}/lib/libhdf5.${LD_EXT} \
         -DHDF5_HL_LIBRARY:PATH=${INSTALL_PATH}/lib/libhdf5_hl.${LD_EXT} \
         -DHDF5_INCLUDE_DIR:PATH=${INSTALL_PATH}/include
```
Then, the code path which determines whether the par filters variables is set is not run.  However, later on in the file, there is another check for parallel filter support (near line 759):
```
  # Check to see if this is hdf5-1.10.3 or later.
  CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Dread_chunk "" HDF5_SUPPORTS_PAR_FILTERS)
```

This PR moves the code that sets the two other par filters variables down after this check and instead of setting their values based on the version, it bases it on the results of this test.

I'm not totally sure why there are three variables; it looks like the `HDF5_SUPPORTS_PAR_FILTERS` and `HDF5_HAS_PAR_FILTERS` could be combined.  I think the `HAS_PAR_FILTERS` is a string which is used to show the results of the configuration and the other two are booleans.

The new check should work for both types of HDF5 installs (cmake-based and configure-based)
2020-05-11 11:11:24 -06:00
Dennis Heimbigner
4e37d68cb1 uintptr for VS 2020-05-11 10:35:56 -06:00
Dennis Heimbigner
84c69afca7 Allow redefinition of variable filters
re: Github issue https://github.com/Unidata/netcdf-c/issues/1713

If nc_def_var_filter or nc_def_var_deflate or nc_def_var_szip is
called multiple times with the same filter id, but possibly with
different sets of parameters, then the first invocation is
sticky and later invocations are ignored. The desired behavior
is to have the last invocation be used.

This PR implements that desired behavior, with some special
cases.  If you call nc_def_var_deflate multiple times, then the
last invocation rule applies with respect to deflate. However,
the shuffle filter, if enabled, is always applied just before
applying deflate.

Misc unrelated changes:
1. Make client-side filters be disabled by default
2. Fix the definition of uintptr_t and use in oc2 and libdap4
3. Add some test cases
4. modify filter order tests to use plugin filters rather
   than client-side filters
2020-05-11 09:42:31 -06:00
Dennis Heimbigner
e47a2a3037 Merge branch 'master' of https://github.com/DennisHeimbigner/netcdf-c 2020-05-08 15:18:20 -06:00
Dennis Heimbigner
2d51f61687 Merge branch 'master' of https://github.com/DennisHeimbigner/netcdf-c 2020-05-08 15:17:28 -06:00
Ward Fisher
b490c457e9
Merge pull request #1717 from NOAA-GSD/ejh_cache
now properly setting HDF5 file cache for files created/opened sequentially on parallel I/O builds
2020-05-08 15:00:45 -06:00
Edward Hartnett
1fb8d161ce updated RELEASE_NOTES 2020-05-08 11:12:47 -06:00
Edward Hartnett
1267358e9b whitespace cleanup 2020-05-08 11:11:56 -06:00
Edward Hartnett
7414880060 updated RELEASE_NOTES 2020-05-08 11:03:25 -06:00
Edward Hartnett
6aa6eff710 now properly setting HDF5 file cache for files created/opened sequentially on parallel IO builds 2020-05-08 11:00:56 -06:00
Edward Hartnett
e3c9e83ecf adding internal function, plus some documentation 2020-05-08 08:58:42 -06:00
Dennis Heimbigner
4710dea7d1 Merge branch 'master' of https://github.com/DennisHeimbigner/netcdf-c 2020-05-07 20:41:08 -06:00
Dennis Heimbigner
d28c65ec2b updae 2020-05-07 20:40:25 -06:00
Ward Fisher
2a78af1115
Merge pull request #1716 from Unidata/stand-alone-doxygen.wif
Added a stand-alone user level doxygen configuration file
2020-05-07 16:48:09 -06:00
Ward Fisher
31654e650b Added a stand-alone user level doxygen configuration file. It must be used from the top-level netcdf-c directory, e.g. doxygen docs/Doxyfile.user. 2020-05-07 16:23:43 -06:00
Dennis Heimbigner
54216078a7 Merge branch 'master' of https://github.com/DennisHeimbigner/netcdf-c 2020-05-07 15:58:02 -06:00
Dennis Heimbigner
c6105b3a38 updae 2020-05-07 15:57:45 -06:00
Ward Fisher
4bd52474f0
Merge pull request #1714 from NOAA-GSD/ejh_deflate
added demonstration of nc_def_var_deflate() issue
2020-05-07 15:47:40 -06:00
Edward Hartnett
2e2f3e7d29 added demonstration of nc_def_var_deflate() issue 2020-05-07 07:08:52 -06:00
Dennis Heimbigner
9f8e1a859c updae 2020-05-06 13:27:51 -06:00
Ward Fisher
524bdd5224
Merge pull request #1698 from DennisHeimbigner/dispnoop.dmh
Support no-op dispatch functions
2020-05-04 13:39:06 -06:00
Dennis Heimbigner
91060e9362 Remove RELEASE_NOTES.md conflict 2020-05-01 20:48:38 -06:00
Ward Fisher
aa0b0db6b3
Merge pull request #1709 from gsjaardema/patch-39
Proof-of-Concept:  Avoid N^2 behavior in NC4_inq_dim
2020-04-30 16:11:29 -06:00
Greg Sjaardema
3e919a568f
Remove line that was missed in original patch 2020-04-30 14:00:18 -06:00
Greg Sjaardema
1db3d07beb
Proof-of-Concept: Avoid N^2 behavior in NC4_inq_dim
The current library seems to have some behavior which is N^2 in the number of vars in a file.

The `NC4_inq_dim` routine calls down to `nc4_find_dim_len` which iterates through each `var` in the file/group and calls `find_var_dim_max_length` on each var and finds the largest length of the dim on each of those vars. This is done only for unlimited vars.

I have a file with 129 dim and 1630 vars.  The unlimited dimension is of length 41.  In my test program, I am reading data from 4 files which have the same dim and var count and reading every 4th time step (unlimited dimension).  If I run a profile, I see that 98.2% of the program time is in the `nc_get_vara_float` call tree and most of that is in `find_var_dim_max_length` (94.8%).

There are 66,142 calls to `nc_get_vara_float` resulting in 107,307,290 calls to `find_var_dim_max_length` with twice that number of calls to `malloc/free` and calls to 5 HDF5 routines.  All of this, at least in my case, to return the same `41` each time.

The proof of concept patch here will check whether the file is read-only (or no_write) and if so, it will cache the value of the dim length the first time it is calculated.   With this change, my example run is sped up by a factor of 60.  The time for `NC4_inq_dim` and below drops from 97.2% down to 2.7%.

I'm not sure whether this is the correct fix, or if there is some behavior that I am overlooking, but my users would definitely like a 10 second run compared to a 10 minute run... 

This is on current Netcdf master branch.

I will try to attach some valgrind/callgrind profiles.
2020-04-30 11:01:10 -06:00