Skip to content
Snippets Groups Projects

Consolidation with CDI-PIO (develop)

Merged Sergey Kosukhin requested to merge m300488/develop-rebase into develop
1 file
+ 21
4
Compare changes
  • Side-by-side
  • Inline
+ 21
4
@@ -1274,12 +1274,22 @@ planPasses(const struct streamMapping *mapping, const struct cdiPioConf *conf, s
* recordAggLim data bytes, but use at least one, unless none
* remain */
size_t firstRecordOfPass = 0, curRecord;
#if defined(__PGI) && __PGIC__ == 20
/* we need the following workaround because pggpp2 fails to produce
* LLVM IR assembly file with -O2 optimization level */
struct passPlan *passes = NULL;
#else
struct passPlan(*passes)[collSize] = NULL;
#endif
do
{
size_t taskBegin = firstRecordOfPass;
curRecord = firstRecordOfPass - 1;
#if defined(__PGI) && __PGIC__ == 20
passes = Realloc(passes, sizeof(*passes) * collSize * (numPasses + 1));
#else
passes = Realloc(passes, sizeof(*passes) * (numPasses + 1));
#endif
for (size_t rank = 0; rank < collSize; ++rank)
{
size_t recordAggBufSize = 0;
@@ -1287,18 +1297,25 @@ planPasses(const struct streamMapping *mapping, const struct cdiPioConf *conf, s
&& ((recordAggBufSize + writtenRecords[curRecord + 1].dataSize) < recordAggBufLim))
recordAggBufSize += writtenRecords[++curRecord].dataSize;
if (curRecord == taskBegin - 1 && curRecord + 1 < numWrittenRecords) ++curRecord;
#if defined(__PGI) && __PGIC__ == 20
passes[collSize * numPasses + rank] = (struct passPlan)
{
#else
passes[numPasses][rank] = (struct passPlan){
.recordAggStart = (unsigned) taskBegin,
.recordAggEnd = (unsigned) curRecord,
.varStart = writtenRecords[taskBegin].varID,
.varEnd = writtenRecords[curRecord].varID,
#endif
.recordAggStart = (unsigned) taskBegin, .recordAggEnd = (unsigned) curRecord,
.varStart = writtenRecords[taskBegin].varID, .varEnd = writtenRecords[curRecord].varID,
};
taskBegin = curRecord + 1;
}
++numPasses, firstRecordOfPass = curRecord + 1;
}
while (curRecord + 1 < numWrittenRecords);
#if defined(__PGI) && __PGIC__ == 20
*passes_ = (struct passPlan(*)[]) passes;
#else
*passes_ = passes;
#endif
}
Free(recordDataSizePfxSums);
return numPasses;
Loading