Skip to content

Commit

Permalink
Merge pull request #2499 from eisenhauer/FFSRestructure
Browse files Browse the repository at this point in the history
FFS marshal restructure
  • Loading branch information
eisenhauer authored Nov 4, 2020
2 parents e711561 + 8356628 commit e2a40b8
Show file tree
Hide file tree
Showing 7 changed files with 256 additions and 141 deletions.
4 changes: 2 additions & 2 deletions source/adios2/toolkit/sst/cp/cp_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ static FMField MetaDataPlusDPInfoList[] = {
static FMField FFSFormatBlockList[] = {
{"FormatServerRep", "char[FormatServerRepLen]", 1,
FMOffset(struct FFSFormatBlock *, FormatServerRep)},
{"FormatServerRepLen", "integer", sizeof(int),
{"FormatServerRepLen", "integer", sizeof(size_t),
FMOffset(struct FFSFormatBlock *, FormatServerRepLen)},
{"FormatIDRep", "char[FormatIDRepLen]", 1,
FMOffset(struct FFSFormatBlock *, FormatIDRep)},
{"FormatIDRepLen", "integer", sizeof(int),
{"FormatIDRepLen", "integer", sizeof(size_t),
FMOffset(struct FFSFormatBlock *, FormatIDRepLen)},
{"Next", "*FFSFormatBlock", sizeof(struct FFSFormatBlock),
FMOffset(struct FFSFormatBlock *, Next)},
Expand Down
4 changes: 2 additions & 2 deletions source/adios2/toolkit/sst/cp/cp_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ struct _CP_DP_PairInfo
struct FFSFormatBlock
{
char *FormatServerRep;
int FormatServerRepLen;
size_t FormatServerRepLen;
char *FormatIDRep;
int FormatIDRepLen;
size_t FormatIDRepLen;
struct FFSFormatBlock *Next;
};

Expand Down
12 changes: 7 additions & 5 deletions source/adios2/toolkit/sst/cp/cp_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,7 @@ static SstStatusValue SstAdvanceStepPeer(SstStream Stream, SstStepMode mode,

if (Stream->WriterConfigParams->MarshalMethod == SstMarshalFFS)
{
static int count = 0;
TAU_START("FFS marshaling case");
FFSMarshalInstallMetadata(Stream, Entry->MetadataMsg);
TAU_STOP("FFS marshaling case");
Expand Down Expand Up @@ -1978,6 +1979,7 @@ static SstStatusValue SstAdvanceStepMin(SstStream Stream, SstStepMode mode,
if ((Stream->WriterConfigParams->MarshalMethod == SstMarshalFFS) &&
(ReturnData->TSmsg))
{
int count = 0;
CP_verbose(
Stream, PerRankVerbose,
"SstAdvanceStep installing precious metadata before exiting\n");
Expand Down Expand Up @@ -2008,15 +2010,15 @@ static SstStatusValue SstAdvanceStepMin(SstStream Stream, SstStepMode mode,
{
NotifyDPArrivedMetadata(Stream, MetadataMsg);

Stream->ReaderTimestep = MetadataMsg->Timestep;
if (Stream->WriterConfigParams->MarshalMethod == SstMarshalFFS)
{
CP_verbose(
Stream, TraceVerbose,
"Calling install precious metadata from metadata block %p\n",
MetadataMsg);
static int count = 0;
CP_verbose(Stream, TraceVerbose,
"Calling install metadata from metadata block %p\n",
MetadataMsg);
FFSMarshalInstallMetadata(Stream, MetadataMsg);
}
Stream->ReaderTimestep = MetadataMsg->Timestep;
SstFullMetadata Mdata = malloc(sizeof(struct _SstFullMetadata));
memset(Mdata, 0, sizeof(struct _SstFullMetadata));
Mdata->WriterCohortSize = MetadataMsg->CohortSize;
Expand Down
8 changes: 8 additions & 0 deletions source/adios2/toolkit/sst/cp/cp_writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2121,6 +2121,14 @@ extern void SstInternalProvideTimestep(
Stream->DP_Interface->provideTimestep(&Svcs, Stream->DP_Stream, Data,
LocalMetadata, Timestep,
&DP_TimestepInfo);
if (Formats)
{
FFSFormatList tmp = Formats;
while (tmp)
{
tmp = tmp->Next;
}
}
STREAM_MUTEX_LOCK(Stream);

/* Md is the local contribution to MetaData */
Expand Down
Loading

0 comments on commit e2a40b8

Please sign in to comment.