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

Fix problem with hangs in parallel collective output #449

Merged
merged 3 commits into from
Oct 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions libdispatch/dvarput.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down