Skip to content
Snippets Groups Projects
Commit 005999d0 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel: Committed by Sergey Kosukhin
Browse files

Fix incorrect preprocessor conditional and variable scope.

parent a606fea8
No related branches found
No related tags found
No related merge requests found
......@@ -1810,8 +1810,9 @@ cdiPioServerStreamClose(stream_t *streamptr, int recordBufIsToBeDeleted)
void (*streamCloseCallBack)(int streamID) = (void (*)(int)) conf->callbacks[CDIPIO_CALLBACK_POSTSTREAMCLOSE];
streamCloseCallBack(streamptr->self);
}
#if defined HAVE_NC4HDF5 && defined HAVE_PARALLEL_NC4
bool parH5ZeroCountProblem = false;
static bool parH5ZeroCountProblem = false;
#endif
#ifdef HAVE_LIBNETCDF
......@@ -1820,7 +1821,13 @@ cdiPioCdfDefTimestep(stream_t *streamptr, int tsID, size_t valCount)
{
int streamID = streamptr->self, rankOpen = cdiPioStream2Owner(streamID);
#ifdef HAVE_PARALLEL_NC4
valCount = rankOpen != CDI_PIO_COLLECTIVE_OPEN || parH5ZeroCountProblem || commInqRankColl() == 0;
valCount = rankOpen != CDI_PIO_COLLECTIVE_OPEN
#if defined HAVE_NC4HDF5
|| (parH5ZeroCountProblem && streamptr->filetype == CDI_FILETYPE_NC4)
#else
|| streamptr->filetype == CDI_FILETYPE_NC4
#endif
|| commInqRankColl() == 0;
#endif
if (commInqIOMode() == PIO_NONE
#ifdef HAVE_PARALLEL_NC4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment