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

Fix estimation of pack size of time axis.

parent 24fade1b
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -12,6 +12,7 @@
#include "taxis.h"
#include "pio_interface.h"
#include "pio_comm.h"
#include "pio_rpc.h"
#include "pio_util.h"
......@@ -50,13 +51,14 @@ computeClientStreamBufSize(int streamID, const struct collSpec *collector)
size_t chunkSize = (size_t) (xt_idxlist_get_num_indices(partDesc[varID]));
rmaSizeSpec.numDataRecords += 2;
size_t elemSize = cdiPioElemSizeInference(varID, conversion);
rmaSizeSpec.bufSize += chunkSize * elemSize
/* re-align chunk to multiple of double size */
+ elemSize
- 1
/* one header for data record, one for corresponding part
* descriptor*/
+ 2 * sizeof(struct winHeaderEntry);
size_t chunkBytes = chunkSize * elemSize
/* re-align chunk to multiple of double size */
+ elemSize
- 1
/* one header for data record, one for corresponding part
* descriptor*/
+ 2 * sizeof(struct winHeaderEntry);
rmaSizeSpec.bufSize += chunkBytes;
}
}
else
......@@ -88,10 +90,12 @@ computeClientStreamBufSize(int streamID, const struct collSpec *collector)
// from one model process
if (collector->sendRPCData)
{
int taxisID = vlistInqTaxis(vlistID);
MPI_Comm comm = cdiPioInqInterComm();
rmaSizeSpec.numRPCRecords = numRPCFuncs;
rmaSizeSpec.bufSize += numRPCFuncs * sizeof(struct winHeaderEntry)
/* data part of streamDefTimestep */
+ (2 * CDI_MAX_NAME + sizeof(taxis_t));
+ (size_t) (reshResourceGetPackSize(taxisID, &taxisOps, &comm));
}
rmaSizeSpec.bufSize = roundUpToMultiple(rmaSizeSpec.bufSize, PIO_WIN_ALIGN);
return rmaSizeSpec;
......
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