Skip to content

Commit

Permalink
Merge pull request #1007 from eisenhauer/SstParamVerbosity
Browse files Browse the repository at this point in the history
Be more verbose about Sst Engine parameters
  • Loading branch information
eisenhauer committed Nov 20, 2018
2 parents de5f338 + 6850a4c commit af798b2
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
32 changes: 32 additions & 0 deletions source/adios2/toolkit/sst/cp/cp_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,38 @@ void CP_validateParams(SstStream Stream, SstParams Params, int Writer)
Params->ControlTransport);
}

static char *SstRegStr[] = {"File", "Screen", "Cloud"};
static char *SstMarshalStr[] = {"FFS", "BP"};
static char *SstQueueFullStr[] = {"Block", "Discard"};
static char *SstCompressStr[] = {"None", "ZFP"};

extern void CP_dumpParams(SstStream Stream, struct _SstParams *Params)
{
if (!Stream->Verbose)
return;

fprintf(stderr, "Param - MarshalMethod:%s\n",
SstMarshalStr[Params->MarshalMethod]);
fprintf(stderr, "Param - RegistrationMethod:%s\n",
SstRegStr[Params->RegistrationMethod]);
fprintf(stderr, "Param - DataTransport:%s\n",
Params->DataTransport ? Params->DataTransport : "");
fprintf(stderr, "Param - RendezvousReaderCount:%d\n",
Params->RendezvousReaderCount);
fprintf(stderr, "Param - QueueLimit:%d %s\n", Params->QueueLimit,
(Params->QueueLimit == 0) ? "(unlimited)" : "");
fprintf(stderr, "Param - QueueFullPolicy:%s\n",
SstQueueFullStr[Params->QueueFullPolicy]);
fprintf(stderr, "Param - IsRowMajor:%d (not user settable) \n",
Params->IsRowMajor);
fprintf(stderr, "Param - ControlTransport:%s\n",
Params->ControlTransport);
fprintf(stderr, "Param - NetworkInterface:%s\n",
Params->NetworkInterface ? Params->NetworkInterface : "");
fprintf(stderr, "Param - CompressionMethod:%s\n",
SstCompressStr[Params->CompressionMethod]);
}

static FMField CP_SstParamsList_RAW[] = {
#define declare_field(Param, Type, Typedecl, Default) \
{#Param, #Typedecl, sizeof(Typedecl), FMOffset(struct _SstParams *, Param)},
Expand Down
1 change: 1 addition & 0 deletions source/adios2/toolkit/sst/cp/cp_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,4 @@ extern void AddToLastCallFreeList(void *Block);
extern void CP_verbose(SstStream Stream, char *Format, ...);
extern void CP_error(SstStream Stream, char *Format, ...);
extern struct _CP_Services Svcs;
extern void CP_dumpParams(SstStream Stream, struct _SstParams *Params);
7 changes: 7 additions & 0 deletions source/adios2/toolkit/sst/cp/cp_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ SstStream SstReaderOpen(const char *Name, SstParams Params, MPI_Comm comm)
return NULL;
}

if (Stream->Rank == 0)
{
CP_verbose(Stream,
"Opening Reader Stream. Writer stream params are:\n");
CP_dumpParams(Stream, ReturnData->WriterConfigParams);
}

// printf("I am reader rank %d, my info on writers is:\n", Stream->Rank);
// FMdump_data(FMFormat_of_original(Stream->CPInfo->combined_writer_Format),
// ReturnData, 1024000);
Expand Down
6 changes: 6 additions & 0 deletions source/adios2/toolkit/sst/cp/cp_writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,12 @@ SstStream SstWriterOpen(const char *Name, SstParams Params, MPI_Comm comm)

CP_verbose(Stream, "Opening Stream \"%s\"\n", Filename);

if (Stream->Rank == 0)
{
CP_verbose(Stream, "Writer stream params are:\n");
CP_dumpParams(Stream, Stream->ConfigParams);
}

while (Stream->RendezvousReaderCount > 0)
{
WS_ReaderInfo reader;
Expand Down

0 comments on commit af798b2

Please sign in to comment.