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

V4.6.2 release branch.wif #1191

Merged
merged 55 commits into from Nov 12, 2018
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
9929e7a
moving att HDF5 stuff to libhdf5
edhartnett Nov 7, 2018
11d725f
allocating and freeing memory for hdf5-specific attribute info
edhartnett Nov 7, 2018
6f4b4ac
moving attribute HDF5 stuff to libhdf5
edhartnett Nov 7, 2018
8d31f5b
clean up
edhartnett Nov 7, 2018
7e4138a
comment
edhartnett Nov 7, 2018
a5bb5fe
Merge branch 'master' into ejh_next_2
edhartnett Nov 7, 2018
de17520
merged ejh_next_2
edhartnett Nov 8, 2018
8aabd20
moving HDF5 dim fields to hdf5internal.h from nc4internal.h
edhartnett Nov 8, 2018
9373989
allocating and freeing space for HDF5-specific dim info
edhartnett Nov 8, 2018
008d4ee
starting to find HDF5 specific dim info
edhartnett Nov 8, 2018
3e80723
continuing to find HDF5 specific dim info
edhartnett Nov 8, 2018
e89ad03
more looking up HDF5-specific dim info
edhartnett Nov 8, 2018
b85eec1
starting to set hdf5-specific dim info struct
edhartnett Nov 8, 2018
92dc85b
continuing to set hdf5-specific dim info struct
edhartnett Nov 8, 2018
dab52a9
more looking up of HDF5 dim info
edhartnett Nov 8, 2018
bff06f2
starting to use HDF5-specific dim info
edhartnett Nov 8, 2018
0ef97a8
cleanup
edhartnett Nov 8, 2018
30da28e
using hdf5-specific dim info
edhartnett Nov 8, 2018
7ab71a6
more use of HDF5-specific dim info
edhartnett Nov 8, 2018
1dd9004
more use of HDF5-specific dim info
edhartnett Nov 8, 2018
cc02ec3
more use of HDF5-specific dim info
edhartnett Nov 8, 2018
856e4ea
moved hdf_dimscaleid to hdf5-specific dim info
edhartnett Nov 8, 2018
e88b98d
moving hdf5_objid field to hdf5-specific dim info
edhartnett Nov 8, 2018
7534cb2
cleanup
edhartnett Nov 8, 2018
8b75fbb
Corrected VS2010 compilation issue in support of https://github.com/U…
WardF Nov 8, 2018
504c851
Merge branch 'ejh_next_2' of https://github.com/NetCDF-World-Dominati…
WardF Nov 8, 2018
e3f2c68
fixed dap configure issue
edhartnett Nov 9, 2018
50bda41
fixed dap configure issue
edhartnett Nov 9, 2018
aff2aa9
added release notes
edhartnett Nov 9, 2018
aac0d6c
minor doc change
edhartnett Nov 9, 2018
a33655d
fixed typo
edhartnett Nov 9, 2018
558c99a
Merge branch 'ejh_release_announcements' of https://github.com/NetCDF…
WardF Nov 9, 2018
807f793
Merge branch 'ejh_install_docs' of https://github.com/NetCDF-World-Do…
WardF Nov 9, 2018
77be69e
Merge branch 'ejh_config' of https://github.com/NetCDF-World-Dominati…
WardF Nov 9, 2018
c35aa3c
changed header files to separate HDF5-specific grp info
edhartnett Nov 12, 2018
9364157
allocating and freeing memory for HDF5-specific group info
edhartnett Nov 12, 2018
6b75bb4
allocating HDF5-specific group info struct for root group
edhartnett Nov 12, 2018
17552b7
HDF5-specific group changes
edhartnett Nov 12, 2018
d6c5e1f
HDF5-specific group changes
edhartnett Nov 12, 2018
65bde48
HDF5-specific group changes
edhartnett Nov 12, 2018
c59d693
HDF5-specific group changes
edhartnett Nov 12, 2018
e74009c
HDF5-specific group changes
edhartnett Nov 12, 2018
5c7fc1f
HDF5-specific group changes
edhartnett Nov 12, 2018
3ad02fe
Fix failure in the nccopy -c option
DennisHeimbigner Nov 12, 2018
9c3a8cb
hdf5-specific group stuff in hdf5var.c
edhartnett Nov 12, 2018
261c7fb
hdf5-specific group info for nc4info.c
edhartnett Nov 12, 2018
902ee64
hdf5-specific group stuff for hdf5attr.c
edhartnett Nov 12, 2018
766f1d0
hdf5-specific changes for hdf5grp.c
edhartnett Nov 12, 2018
971b16c
hdf5 specific changes for hdf5open.c
edhartnett Nov 12, 2018
79c2f84
rest of hdf5 specific group changes
edhartnett Nov 12, 2018
825047b
rest of moving HDF5 specific group info to libhdf5
edhartnett Nov 12, 2018
129e874
Merge branch 'gh1182.wif' into v4.6.2-release-branch.wif
WardF Nov 12, 2018
447e37a
Merge remote-tracking branch 'origin/gh1183.dmh' into v4.6.2-release-…
WardF Nov 12, 2018
da09e13
Merge branch 'ejh_next_6' of https://github.com/NetCDF-World-Dominati…
WardF Nov 12, 2018
ff7a461
Triggering re-run of TravisCI
WardF Nov 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Expand Up @@ -7,6 +7,9 @@ This file contains a high-level description of this package's evolution. Release

## 4.6.2 - TBD

* [Enhancement] Lazy att read - only read atts when user requests one of them. See [GitHub #857](https://github.com/Unidata/netcdf-c/issues/857).
* [Enhancement] Fast global att read - when global atts are read, they are read much more quickly. See [GitHub #857](https://github.com/Unidata/netcdf-c/issues/857).

## 4.6.2-rc2 November 1, 2018


Expand Down
31 changes: 6 additions & 25 deletions configure.ac
Expand Up @@ -349,34 +349,15 @@ AC_ARG_ENABLE([dap],
test "x$enable_dap" = xno || enable_dap=yes
AC_MSG_RESULT($enable_dap)

# --enable-dap => enable-dap4
enable_dap4=$enable_dap

# Curl support is required if and only if any of these flags are set:
# 1. --enable-dap

if test "x$enable_dap" = "xyes" ; then
require_curl=yes
else
require_curl=no
fi

# See if the user provided us with a curl library
# Do an initial lib test for curl, but suppress the default action
# We need curl for DAP.
AC_CHECK_LIB([curl],[curl_easy_setopt],[found_curl=yes],[found_curl=no])
# If curl is required but there is no curl, then complain
if test $require_curl = yes ; then
if test $found_curl = no ; then
AC_MSG_NOTICE([libcurl not found; disabling remote protocol(s) support])
enable_dap=no
enable_dap4=no
elif test $found_curl = yes ; then
# Redo the check lib to actually add -lcurl
#AC_CHECK_LIB([curl], [curl_easy_setopt])
AC_SEARCH_LIBS([curl_easy_setopt],[curl curl.dll], [], [])
fi
if test "x$enable_dap" = "xyes" ; then
AC_SEARCH_LIBS([curl_easy_setopt],[curl curl.dll], [],
[AC_MSG_ERROR([curl required for remote access. Install curl or build with --disable-dap.])])
fi

# --enable-dap => enable-dap4
enable_dap4=$enable_dap
# Default is now to always do the short remote tests
AC_MSG_CHECKING([whether dap remote testing should be enabled (default on)])
AC_ARG_ENABLE([dap-remote-tests],
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Expand Up @@ -150,7 +150,7 @@ Indicate where you want to install netCDF in another shell variable, for example
~~~~{.py}
$ # Build and install netCDF-4
$ NCDIR=/usr/local
$ CPPFLAGS=-I${H5DIR}/include LDFLAGS=-L${H5DIR}/lib ./configure --prefix=${NCDIR}
$ CPPFLAGS='-I${H5DIR}/include -I${ZDIR}/include' LDFLAGS='-L${H5DIR}/lib -L${ZDIR}/lib' ./configure --prefix=${NCDIR}
$ make check
$ make install # or sudo make install
~~~~
Expand Down
9 changes: 6 additions & 3 deletions libdispatch/drc.c
Expand Up @@ -367,9 +367,12 @@ rclocate(const char* key, const char* hostport)
if(hostport == NULL) hostport = "";

for(found=0,i=0;i<nclistlength(rc);i++) {
triple = (NCTriple*)nclistget(rc,i);
size_t hplen = (triple->host == NULL ? 0 : strlen(triple->host));
int t;
int t;
size_t hplen;
triple = (NCTriple*)nclistget(rc,i);

hplen = (triple->host == NULL ? 0 : strlen(triple->host));

if(strcmp(key,triple->key) != 0) continue; /* keys do not match */
/* If the triple entry has no url, then use it
(because we have checked all other cases)*/
Expand Down
56 changes: 30 additions & 26 deletions libdispatch/nchashmap.c
Expand Up @@ -108,7 +108,7 @@ rehash(NC_hashmap* hm)
/* Locate where given object is or should be placed in indexp.
if fail to find spot return 0 else 1.
If deletok then a deleted slot is ok to return;
return invariant: return == 0 || *indexp is defined
return invariant: return == 0 || *indexp is defined
*/
static int
locate(NC_hashmap* hash, unsigned int hashkey, const char* key, size_t keysize, size_t* indexp, int deletedok)
Expand All @@ -118,15 +118,15 @@ locate(NC_hashmap* hash, unsigned int hashkey, const char* key, size_t keysize,
size_t step = 1; /* simple linear probe */
int deletefound = 0;
size_t deletedindex = 0; /* first deleted entry encountered */

NC_hentry* entry;
TRACE("locate");
/* Compute starting point */
index = (size_t)(hashkey % hash->alloc);

/* Search table using linear probing */
for (i = 0; i < hash->alloc; i++) {
NC_hentry* entry = &hash->table[index];
if(entry->flags & ACTIVE) {
entry = &hash->table[index];
if(entry->flags & ACTIVE) {
if(indexp) *indexp = index; /* assume a match */
if(entry->hashkey == hashkey && entry->keysize == keysize) {
/* Check content */
Expand All @@ -148,7 +148,7 @@ locate(NC_hashmap* hash, unsigned int hashkey, const char* key, size_t keysize,
index = (index + step) % hash->alloc;
}
if(deletedok && deletefound) {
if(indexp) *indexp = deletedindex;
if(indexp) *indexp = deletedindex;
return 1;
}
return 0;
Expand Down Expand Up @@ -187,12 +187,13 @@ NC_hashmapnew(size_t startsize)
int
NC_hashmapadd(NC_hashmap* hash, uintptr_t data, const char* key, size_t keysize)
{
unsigned int hashkey;
NC_hentry* entry;
unsigned int hashkey;

TRACE("NC_hashmapadd");

if(key == NULL || keysize == 0)
return 0;
return 0;
hashkey = NC_crc32(0,(unsigned char*)key,(unsigned int)keysize);

if(hash->alloc*3/4 <= hash->active)
Expand All @@ -203,7 +204,7 @@ NC_hashmapadd(NC_hashmap* hash, uintptr_t data, const char* key, size_t keysize)
rehash(hash);
continue; /* try on larger table */
}
NC_hentry* entry = &hash->table[index];
entry = &hash->table[index];
if(entry->flags & ACTIVE) {
/* key already exists in table => overwrite data */
entry->data = data;
Expand Down Expand Up @@ -264,13 +265,13 @@ NC_hashmapget(NC_hashmap* hash, const char* key, size_t keysize, uintptr_t* data
return 0;
hashkey = NC_crc32(0,(unsigned char*)key,(unsigned int)keysize);
if(hash->active) {
size_t index;
NC_hentry* h;
if(!locate(hash,hashkey,key,keysize,&index,0))
size_t index;
NC_hentry* h;
if(!locate(hash,hashkey,key,keysize,&index,0))
return 0; /* not present */
h = &hash->table[index];
h = &hash->table[index];
if(h->flags & ACTIVE) {
if(datap) *datap = h->data;
if(datap) *datap = h->data;
return 1;
} else /* Not found */
return 0;
Expand Down Expand Up @@ -300,7 +301,7 @@ NC_hashmapsetdata(NC_hashmap* hash, const char* key, size_t keysize, uintptr_t n
h = &hash->table[index];
assert((h->flags & ACTIVE) == ACTIVE);
h->data = newdata;
return 1;
return 1;
}

size_t
Expand Down Expand Up @@ -339,7 +340,7 @@ Allows a hack by ncindex.
int
NC_hashmapdeactivate(NC_hashmap* map, uintptr_t data)
{
size_t i;
size_t i;
NC_hentry* h;
for(h=map->table,i=0;i<map->alloc;i++,h++) {
if((h->flags & ACTIVE) && h->data == data) {
Expand Down Expand Up @@ -370,21 +371,23 @@ findPrimeGreaterThan(size_t val)
int L = 1; /* skip leading flag number */
int R = (n - 2); /* skip trailing flag */
unsigned int v = 0;
int m;

if(val >= 0xFFFFFFFF)
return 0; /* Too big */
return 0; /* Too big */
v = (unsigned int)val;

for(;;) {
if(L >= R) break;
int m = (L + R) / 2;
/* is this an acceptable prime? */
if(NC_primes[m-1] < v && NC_primes[m] >= v)
return NC_primes[m]; /* acceptable*/
else if(NC_primes[m-1] >= v)
R = m;
else if(NC_primes[m] < v)
L = m;
if(L >= R) break;

m = (L + R) / 2;
/* is this an acceptable prime? */
if(NC_primes[m-1] < v && NC_primes[m] >= v)
return NC_primes[m]; /* acceptable*/
else if(NC_primes[m-1] >= v)
R = m;
else if(NC_primes[m] < v)
L = m;
}
return 0;
}
Expand Down Expand Up @@ -2046,6 +2049,7 @@ static unsigned int NC_nprimes = (sizeof(NC_primes) / sizeof(unsigned int));
void
printhashmapstats(NC_hashmap* hm)
{

size_t n,i;
size_t step = 1;
size_t maxchain = 0;
Expand All @@ -2061,7 +2065,7 @@ printhashmapstats(NC_hashmap* hm)
default: /* empty slot, stop walking */
if(chainlen > maxchain) maxchain = chainlen;
goto next;
}
}
/* linear probe */
index = (index + step) % hm->alloc;
}
Expand Down