mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Merge branch 'patch-1' of https://github.com/gsjaardema/netcdf-c into par-hang-fix
This commit is contained in:
commit
98c169aa9a
@ -241,12 +241,19 @@ NCDEFAULT_put_vars(int ncid, int varid, const size_t * start,
|
||||
if(mystride[i] != 1) isstride1 = 0;
|
||||
nels *= myedges[i];
|
||||
}
|
||||
if(nels == 0)
|
||||
return NC_NOERR; /* cannot write anything */
|
||||
|
||||
if(isstride1) {
|
||||
return NC_put_vara(ncid, varid, mystart, myedges, value, memtype);
|
||||
}
|
||||
|
||||
if(nels == 0) {
|
||||
/* This should be here instead of before NC_put_vara call to
|
||||
* avoid hang in parallel write for single stride.
|
||||
* Still issue with parallel hang if stride > 1
|
||||
*/
|
||||
return NC_NOERR; /* cannot write anything */
|
||||
}
|
||||
|
||||
/* Initial version uses and odometer to walk the variable
|
||||
and read each value one at a time. This can later be optimized
|
||||
to read larger chunks at a time.
|
||||
|
Loading…
Reference in New Issue
Block a user